Upgrade to Pro — share decks privately, control downloads, hide ads and more …

すべては「サクサク感」のために! QUICで早くなる?インターネットの世界と,周辺プロトコルの話

Hironao Namba
September 01, 2018

すべては「サクサク感」のために! QUICで早くなる?インターネットの世界と,周辺プロトコルの話

すべては「サクサク感」のために!
QUICで早くなる?インターネットの世界と,周辺プロトコルの話
南波 寛直 (@brownbro)
iOSDC Japan 2018 (Sep. 1st)

Hironao Namba

September 01, 2018
Tweet

Other Decks in Technology

Transcript

  1. 27

  2. DNS • Domain Name System • αʔόʔͷυϝΠϯ໊͔ΒIPΞυϨεΛऔಘ͠·͢ $ nslookup iosdc.jp

    Server: 240b:10:3c0:3b10::cafe:1 Address: 240b:10:3c0:3b10::cafe:1#53 Non-authoritative answer: Name: iosdc.jp Address: 160.16.207.67 30
  3. TCP • Transmission Control Protocol • (IPΞυϨε/ϙʔτͷ4ͭ૊Ͱࣝผ͞ΕΔ)2ͭͷ ΤϯυϙΠϯτ͕ɺॱং੍ޚ͞ΕͨόΠτྻΛ ૹड৴Ͱ͖ΔػೳΛఏڙ͢Δϓϩτίϧ •

    σʔλͷ΍ΓͱΓͷ։࢝લͷίωΫγϣϯͷཱ֬ ͷͨΊʹɺ1ԟ෮ͷ΍ΓͱΓͱ࣌ؒ(1-RTT; Round Trip Time)͕ඞཁ • "3-way handshake" ͷ໊લ΋༗໊ • ʢը૾͸WikipediaΑΓҾ༻5ʣ 5 h$ps:/ /commons.wikimedia.org/wiki/File:Tcp_normal.png (Author: Dake, CC BY-SA 2.5) 31
  4. TLS • Transport Layer Security • ೝূɺ҉߸Խɺ׬શੑΛఏڙ͢Δϓ ϩτίϧ • ωΰγΤʔγϣϯʢ҉߸伴ͷڞ༗ͳ

    ͲʣͷͨΊʹɺ2-RTT͕ඞཁ • ʢը૾͸O'ReillyΑΓҾ༻6ʣ 6 h$ps:/ /hpbn.co/transport-layer-security-tls/ (Figure 4-2. TLS handshake protocol) 32
  5. HTTP • Hypertext Transfer Protocol • HTMLͳͲͷίϯςϯπͷૹड৴ʹ ༻͍ΒΕΔϓϩτίϧ • ʢURI಺ͷHTTPS͸HTTP

    over TLSΛ ҙຯ͠·͢ʣ • ϔομʔ͓ΑͼϑΝΠϧ಺ͷσʔλΛ ઌ಄͔Βॱʹऔಘ 33
  6. ϖʔδ͕ෳ਺ϑΝΠϧ͔Βߏ੒͞ΕΔ৔߹ |---index.html---| |--- app.js (too large) ---| |---a.png---| • TCPίωΫγϣϯͷதͰɺϑΝΠϧΛॱ൪ʹऔಘʢHTTP

    ϦΫΤετʗ Ϩεϙϯεʣ • ڊେͳϑΝΠϧ͕͋Δ৔߹ɺͦͷϑΝΠϧͷసૹ͕׬ྃ͢Δ·ͰҎ ߱ͷϑΝΠϧͷసૹΛ։࢝Ͱ͖ͳ͍ • Head of Line Blocking; HoLϒϩοΩϯά 34
  7. UDP • User Datagram Protocol • ʮσʔλάϥϜʯͱݺ͹ΕΔ୯ҰͷϝοηʔδΛૹड৴͢ΔͨΊͷϓ ϩτίϧ • TCPͱಉ͡ϨΠϠʔʢτϥϯεϙʔτ૚ʣʹଐ͢Δ͕ɺίωΫγϣϯΛ

    ੜ੒ͤͣɺॱং੍ޚͳͲͷ෇ՃػೳΛʮԿ΋ఏڙ͠ͳ͍ʯͷ͕ಛ௃ • WebRTCΛ༻͍ͨετϦʔϛϯάͳͲɺଟগͷσʔλܽଛΑΓ΋஗Ԇʹහ ײͳΞϓϦέʔγϣϯ༻ͷϓϩτίϧʢͷԼճΓʣͱͯ͠ར༻͞Ε͍ͯΔ 40
  8. QUICؔ࿈χϡʔε • ʮOCN ϞόΠϧ ONEʯͷ௨৴඼࣭޲্ʹΉ͚ͨऔΓ૊Έ • "ʮQUIC௨৴ͷྲྀྔίϯτϩʔϧʯΛద༻͠ɺʮOCN ϞόΠϧ ONEʯ͝ར༻ऀશମͷ௨৴඼ ࣭վળΛਤΓ·͢ɻ"

    • Google CloudͷHTTPSϩʔυόϥϯαʔ͕QUICϓϩτίϧʹରԠ • The Road to QUIC • "The IETF working group is currently set to deliver the first version of the QUIC specificaGons by the end of the year" • QUIC Version 44 and IETF QUIC • "the Google QUIC team has started the transiGon to IETF QUIC" 43
  9. ͨͩ͠ɺWi-Fi͔ΒϞόΠϧω οτϫʔΫ΁੾ΓସΘͬͨ • ϞόΠϧσόΠεʹΑ͋͘Δέʔε • ը૾͸Googleࢿྉ10ΑΓҾ༻ • ͲΜͳڍಈʹͳΔʁ • (DNSͱHTTP͸লུ)

    10 h%ps:/ /docs.google.com/presenta6on/d/13LSNCCvBijabnn1S4- Bb6wRlm79gN6hnPFHByEXXptk/present?slide=id.g2a9e7f5ea_194 46
  10. QUICͩͱʁ • ίωΫγϣϯҠߦ(Connec(on Migra(on)ͷ࢓૊Έ͕ଘࡏ • αʔόʔʗΫϥΠΞϯτͦΕͧΕ͕࣋ͭ Connection ID ͷ૊Έ߹Θ͕ͤίωΫ γϣϯͷࣝผࢠͱͳΔ

    • ͢ͳΘͪɺIPΞυϨε΍ϙʔτͷ৘ใʹґଘ͍ͯ͠ͳ͍ • Ҡಈͨ͠ઌͷૹ৴ݩΞυϨε͔Β΋ಉ͡ Connection ID Λ༻͍ͯσʔλΛૹ৴Մ ೳ • ʢͨͩ͠ɺِ૷ʹΑΔDoS߈ܸͷϦεΫ͸͋ΔͨΊɼࣄޙʹ௥Ճͷखଓ͖͸ඞཁʣ 49
  11. ؔ࿈ʢʁʣτʔΫ • WebSocketΛiOSʹ࣋ͪࠐΜͰਏ͍ࢥ͍Λͨ͠ܦݧ͕͋Γ·͔͢ʂʁ (9/1 16:00- @Track C) • ͋͑ͯWebΤϯδχΞҎ֎ͷਓʹฉ͍ͯ΄͍͠WebRTCͷ࿩ (9/2

    15:10- @Track D) • ΠϯυͷΠϯλʔωοτ؀ڥͱͷઓ͍ํ (9/2 LT) • WebSocketʹΑΔϏσΦ௨࿩ (9/2 LT) ָ͠Έʹ͍ͯ͠·͢ʂʂ ! 56
  12. ࢀߟࢿྉ • ϋΠύϑΥʔϚϯε ϒϥ΢βωοτϫʔΩϯά • TCP / UDP / HTTP/2ͷ࿩͸͜ͷຊ1࡭ͰOK

    • QUIC: A UDP-Based Mul;plexed and Secure Transport (draE-13) • draE-14͕ग़ͯͨ͜ͱΛઌ೔஌Γ·͕ͨ͠·ͩಡΊͯ·ͤΜɻɻ • IETFʹ͓͚Δ௨৴ίωΫγϣϯվળʹؔ͢Δࠃࡍඪ४Խಈ޲ௐࠪใࠂॻ (pdf) • Head of Line Blocking - High Performance Web 2015 • ֤छWikipediaϖʔδ 57