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

HTTPとASGI Webサーバの関係

jrfk
February 20, 2021

HTTPとASGI Webサーバの関係

Python Charity Talks in Japan 2021.02 の登壇資料です。

jrfk

February 20, 2021
Tweet

More Decks by jrfk

Other Decks in Technology

Transcript

  1. HTTP/ とASGI Webサーバの関係 Junya Fukuda Python Charity Talks in Japan

    2021.02 - Hypercornを例に 2
  2. HTTP/ とASGI Webサーバの関係 Junya Fukuda Python Charity Talks in Japan

    2021.02 - Hypercornを例に 3🤔
  3. •෱ా ൏໵ʢJunya Fukudaʣʢ@JunyaFffʣ •גࣜձࣾ೔ຊγεςϜٕݚʢJSLʣॴଐ ௕໺ݝͷձࣾ •GEEKLAB.NAGANO - ίϛϡχςΟεϖʔεӡӦ •Effective Python

    ͷಡॻձ΍ͬͯ·͢ʙ •ʢ͓͠͝ͱͰʣόϦϡʔϒοΫε •ຊ޷͖ʹѪ͞ΕΔαʔϏεΛ໨ࢦͯ͠ʢݹຊങऔɾൢചʣ ΪʔΫϥϘ௕໺ಡॻձ
  4. 本 流 •ASGIͬͯͳʹʁ •HTTP/2ͬͯͳʹʁ •Hypercorn×FastAPIͰετϦʔϜ •Hypercorn×FastAPIΛ࢖ͬͨHTTP/1.1 HTTP/2ੑೳଌఆ

  5. 本 流 •ASGIͬͯͳʹʁ •HTTP/2ͬͯͳʹʁ •Hypercorn×FastAPIͰετϦʔϜ •Hypercorn×FastAPIΛ࢖ͬͨHTTP/1.1 HTTP/2ੑೳଌఆ •HTTP/3ͱPython

  6. Python Web で HTTP/2を意識したこと ありますか?

  7. •HTTP/2Λҙࣝͨ͜͠ͱ͸͋·Γͳ͍ •σϓϩΠ؀ڥʹ͸ϦόʔεϓϩΩγ͍Δ͠ɺHTTP/2ؾʹ͢Δͷ͸ͦ͘͜Β͍

  8. •HTTP/2Λҙࣝͨ͜͠ͱ͸͋·Γͳ͍ •σϓϩΠ؀ڥʹ͸ϦόʔεϓϩΩγ͍Δ͠ɺHTTP/2ؾʹ͢Δͷ͸ͦ͘͜Β͍ •ϩʔυόϥϯαʔ ͷ಺ଆ͸HTTP/1.1Ͱे෼

  9. •HTTP/2Λҙࣝͨ͜͠ͱ͸͋·Γͳ͍ •σϓϩΠ؀ڥʹ͸ϦόʔεϓϩΩγ͍Δ͠ɺHTTP/2ؾʹ͢Δͷ͸ͦ͘͜Β͍ •ϩʔυόϥϯαʔ ͷ಺ଆ͸HTTP/1.1Ͱे෼ •ʢPure Python ͷWebαʔόͳΜͯʣ

  10. •HTTP/2Λҙࣝͨ͜͠ͱ͸͋·Γͳ͍ •σϓϩΠ؀ڥʹ͸ϦόʔεϓϩΩγ͍Δ͠ɺHTTP/2ؾʹ͢Δͷ͸ͦ͘͜Β͍ •ϩʔυόϥϯαʔ ͷ಺ଆ͸HTTP/1.1Ͱे෼ •ͦΜͳͳ͔ɺASGIͱHypercornͱग़ձͬͨ •Python WebͰHTTP/2ʹ͢Δͱͳʹ͕͓͍͍͠ͷʁ •ʢPure Python ͷWebαʔόͳΜͯʣ

  11. •HTTP/2Λҙࣝͨ͜͠ͱ͸͋·Γͳ͍ •σϓϩΠ؀ڥʹ͸ϦόʔεϓϩΩγ͍Δ͠ɺHTTP/2ؾʹ͢Δͷ͸ͦ͘͜Β͍ •ϩʔυόϥϯαʔ ͷ಺ଆ͸HTTP/1.1Ͱे෼ •ͦΜͳͳ͔ɺASGIͱHypercornͱग़ձͬͨ •Python WebͰHTTP/2ʹ͢Δͱͳʹ͕͓͍͍͠ͷʁ •ʢPure Python ͷWebαʔόͳΜͯʣ

    •HTTP/3 ௒໨લɻ࠷ޙʂʁͷHTTP/2ωλ
  12. ASGIってなに?

  13. ASGI •Asynchronous Server Gateway Interface ͷུ •WSGIͷޙܧ •WebαʔόͱΞϓϦέʔγϣϯͷΠϯλʔϑΣʔεͷ࢓༷

  14. ASGI •Asynchronous Server Gateway Interface ͷུ •Webαʔό͕ΞϓϦέʔγϣϯͷ async/await ʹରԠ •WSGIͷޙܧ

    •WebαʔόͱΞϓϦέʔγϣϯͷΠϯλʔϑΣʔεͷ࢓༷
  15. ASGI •Asynchronous Server Gateway Interface ͷུ •Webαʔό͕ΞϓϦέʔγϣϯͷ async/await ʹରԠ •WSGIͷޙܧ

    •WebαʔόͱΞϓϦέʔγϣϯͷΠϯλʔϑΣʔεͷ࢓༷ https://www.youtube.com/watch?v=EwG5EWKu8nw ASGIʢඇಉظαʔόήʔτ΢ΣΠΠϯλʔϑΣʔεʣͷ֓ཁ (Junya Fukuda) [PyCon JP 2020]
  16. ASGI •Asynchronous Server Gateway Interface ͷུ •Webαʔό͕ΞϓϦέʔγϣϯͷ async/await ʹରԠ •WSGIͷޙܧ

    •WebαʔόͱΞϓϦέʔγϣϯͷΠϯλʔϑΣʔεͷ࢓༷ https://www.youtube.com/watch?v=EwG5EWKu8nw ASGIʢඇಉظαʔόήʔτ΢ΣΠΠϯλʔϑΣʔεʣͷ֓ཁ (Junya Fukuda) [PyCon JP 2020] •ෳ਺ͷҰൠతͳϓϩτίϧΛॲཧՄೳʮHTTP/1.1ʯʮHTTP/2ʯʮWebsocketʯ
  17. ASGI •୅දతͳASGIؔ࿈ͷαʔόͱϑϨʔϜϫʔΫ

  18. HTTP/2ってなに?

  19. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •଎౓վળΛ໨తͱͨ͠࢓༷

  20. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •αʔόϓογϡ •ϔομʔͷѹॖ •ετϦʔϜʢϦΫΤετͷଟॏԽʣ •଎౓վળΛ໨తͱͨ͠࢓༷

  21. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •αʔόϓογϡ •ϔομʔͷѹॖ •ετϦʔϜʢϦΫΤετͷଟॏԽʣ •଎౓վળΛ໨తͱͨ͠࢓༷

  22. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •αʔόϓογϡ •ϔομʔͷѹॖ •ετϦʔϜʢϦΫΤετͷଟॏԽʣ •଎౓վળΛ໨తͱͨ͠࢓༷ IUUQTHSPVQTHPPHMFDPNBDISPNJVNPSHHCMJOLEFWD,S:-WN26#:NW08#,;(P"2"+ QMJ *OUFOUUP3FNPWF)551BOEH26*$TFSWFSQVTI

  23. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •αʔόϓογϡ •ϔομʔͷѹॖ •ετϦʔϜʢϦΫΤετͷଟॏԽʣ •଎౓վળΛ໨తͱͨ͠࢓༷ IUUQTHSPVQTHPPHMFDPNBDISPNJVNPSHHCMJOLEFWD,S:-WN26#:NW08#,;(P"2"+ QMJ *OUFOUUP3FNPWF)551BOEH26*$TFSWFSQVTI →ɹ103

    Early Hints
  24. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •αʔόϓογϡ •ϔομʔͷѹॖ •ετϦʔϜʢϦΫΤετͷଟॏԽʣ •଎౓վળΛ໨తͱͨ͠࢓༷

  25. HTTP/2 •ετϦʔϜ

  26. HTTP/2 •ετϦʔϜ ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊

  27. HTTP/2 •ετϦʔϜ ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊

  28. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

  29. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

  30. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

  31. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

  32. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

  33. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ HTTP/̍.1ͷϦΫΤετ-Ϩεϙ ϯε͸ɺৗʹॱ൪Λอͪಉظత

    ʹߦΘΕΔඞཁ͕͋Δ
  34. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ HTTP/̍.1ͷϦΫΤετ-Ϩεϙ ϯε͸ɺৗʹॱ൪Λอͪಉظత

    ʹߦΘΕΔඞཁ͕͋Δ WebγεςϜͰ͸ ը໘දࣔ࣌ʹ80ϦΫΤετ
  35. HTTP/2 ‣ ྫ͑͹օ͞Μ͕࢖͍ͬͯΔGmail

  36. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ ‣ TCP

    × 6ຊ
  37. HTTP/2 ‣ HTTP/̍.1ͷ໰୊఺Λղܾ͢ΔͨΊͷ࢓༷ •1ͭͷϦΫΤετ͕׬ྃ͢Δ·Ͱݪଇɺ࣍ͷϦΫΤετΛૹΕͳ͍໰୊ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

  38. HTTP/2 •ετϦʔϜ ‣ ΫϥΠΞϯτ ‣ αʔόʔ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

    HTTP/1.1 HTTP/2
  39. HTTP/2 •ετϦʔϜ ‣ ΫϥΠΞϯτ ‣ αʔόʔ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

    HTTP/1.1 HTTP/2
  40. HTTP/2 •ετϦʔϜ ‣ ΫϥΠΞϯτ ‣ αʔόʔ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

    ‣ 1ͭͷTCPͷίωΫγϣϯͷதͰॱ൪଴ͪΛ͢Δ͜ͱͳ͘ɺฒྻʹॲཧ HTTP/1.1 HTTP/2 ฒྻʹॲཧ
  41. HTTP/2 •ετϦʔϜ ‣ ΫϥΠΞϯτ ‣ αʔόʔ ‣ ΫϥΠΞϯτ ‣ αʔόʔ

    HTTP/1.1 HTTP/2 ฒྻʹॲཧ ‣ 1ͭͷTCPͷίωΫγϣϯͷதͰॱ൪଴ͪΛ͢Δ͜ͱͳ͘ɺฒྻʹॲཧ
  42. HTTP/2 対応 ASGI Web Server •ASGI Web ServerͷҰཡ Daphne Mangum

    IUUQTHJUIVCDPN fl PSJNPOENBODBBXFTPNFBTHJ
  43. HTTP/2 対応 ASGI Web Server •ASGI Web ServerͷҰཡ Daphne Mangum

    IUUQTHJUIVCDPN fl PSJNPOENBODBBXFTPNFBTHJ
  44. HTTP/2 対応 ASGI Web Server •ASGI WebServer ͱ͍͑͹ Uvicorn •·ͩHTTP/2ະରԠ

    ʢରԠ༧ఆ͋Γʣ Uvicorn currently supports HTTP/1.1 and WebSockets. Support for HTTP/2 is planned. Uvicorn͸ݱࡏɺHTTP/1.1ͱWebSocketsΛαϙʔτ͍ͯ͠·͢ɻ HTTP/2ͷαϙʔτ͕༧ఆ͞Ε͍ͯ·͢ɻ IUUQTXXXVWJDPSOPSH
  45. HTTP/2 対応 ASGI Web Server •ASGI࢓༷ͷରԠঢ়گ Framework HTTP WebSockets Server

    Push WebSocket HTTP Hypercorn 1 ◦ 2 ◦ 1 ◦ 2 ◦ ◦ ◦ Uvicorn 1 ◦ 2 × 1 ◦ 2 × × × Daphne 1 ◦ 2 ◦ 1 ◦ 2 × × × Mangum 1 ◦ 2 × 1 ◦ 2 × × ×
  46. HTTP/2 対応 ASGI Web Server •ASGI࢓༷ͷରԠঢ়گ Framework HTTP WebSockets Server

    Push WebSocket HTTP Hypercorn 1 ◦ 2 ◦ 1 ◦ 2 ◦ ◦ ◦ Uvicorn 1 ◦ 2 × 1 ◦ 2 × × × Daphne 1 ◦ 2 ◦ 1 ◦ 2 × × × Mangum 1 ◦ 2 × 1 ◦ 2 × × ×
  47. HTTP/2 対応 ASGI Web Server •ϋΠύʔίʔϯͱಡΈ·͢ •WSGI Web αʔόͷGunicornʹΠϯεύΠΞ͞Ε͍ͯΔ •HTTP

    / 1ɺHTTP / 2ɺWebSocketʢHTTP / 1͓ΑͼHTTP / 2ܦ༝ʣαϙʔτ •worker ͷλΠϓʹ asyncio,uvloop,trio ΛࢦఆՄೳ •worker ਺ΛࢦఆՄೳ
  48. 本 HTTP/2 使 道 •HTTP/2αʔόͱΞϓϦέʔγϣϯͷϦΫΤετɾϨεϙϯεʹண໨ •੩తϑΝΠϧͷ഑৴͸ผͰɻΦϒδΣΫτετϨʔδ΍CDNͰ

  49. 本 HTTP/2 使 道 ೥୅ͷίϯςφ࣌୅ͷ1ZUIPOΞʔΩςΫνϟσϓϩΠ TIJCVLBXB <1Z$PO+1> IUUQTXXXZPVUVCFDPNXBUDI W0Y3O%-6OP*TUBSU •HTTP/2αʔόͱΞϓϦέʔγϣϯͷϦΫΤετɾϨεϙϯεʹண໨

    •੩తϑΝΠϧͷ഑৴͸ผͰɻΦϒδΣΫτετϨʔδ΍CDNͰ
  50. Hypercornを例に ストリーム(多重化)を

  51. Hypercorn •؆୯ͳWebΞϓϦέʔγϣϯΛHypercornͰಈ͔͢ •ϒϥ΢β͔ΒJavascriptͰΞΫηε •WebΞϓϦέʔγϣϯͷίʔυ͸ಉ͡ •HTTP/1.1ͱHTTP/2ͷҧ͍ΛɺΈͯΈ·͠ΐ͏

  52. ؀ڥ •Hypercorn •fastapi 0.61.1 0.11.0 Webαʔό Web Framework ⁶ ⁶

    ʢASGIʣ ʢHTTP/2ʣ ʢHTTP/1.1ʣ Hypercorn
  53. ؀ڥ •Hypercorn •fastapi 0.61.1 0.11.0 Webαʔό Web Framework ⁶ ⁶

    ʢASGIʣ ʢHTTP/2ʣ ʢHTTP/1.1ʣ Hypercorn
  54. 処理 @app.get("/message/{id}") async def get_message(id:str): await asyncio.sleep(3) return {"text": f"spam,

    egg, spam and spam!, {id}!"}
  55. 処理 requestButton.onclick = async function() { result = []; for

    (let i = 0; i < 24; i++) { result.push(fetch(`/message/${i}/`)); } await Promise.all(result); }
  56. HTTP/1.1 場合

  57. HTTP/1.1 場合

  58. HTTP/1.1 場合

  59. HTTP/1.1 場合 TFDˎຊ

  60. HTTP/1.1 場合 TFDˎຊ TFDˎຊ

  61. HTTP/1.1 場合 TFDˎຊ TFDˎຊ TFDˎຊ

  62. HTTP/1.1 場合 TFDˎຊ TFDˎຊ TFDˎຊ TFDˎຊ

  63. HTTP/1.1 場合 TFDˎຊ TFDˎຊ TFDˎຊ TFDˎຊ τʔλϧTFD

  64. HTTP/2 場合

  65. HTTP/2 場合

  66. HTTP/2 場合 TFDˎຊ

  67. HTTP/2 場合 TFDˎຊ τʔλϧTFD

  68. HTTP/2とHTTP/1.1 性能を⽐較

  69. HTTP/1.1 HTTP/2 ⽐較 •࣮ߦ؀ڥ͸ϩʔΧϧϚγϯ •ࢦඪ͸ɺॲཧͷऴྃ·Ͱʹ͔͔ͬͨ࣌ؒʗ1ඵ͋ͨΓʹࡹ͚ΔϦΫΤετ਺ •ੑೳଌఆπʔϧͱͯ͠ɺh2load ίϚϯυΛ࢖༻͢Δ •؆୯ͳWebΞϓϦέʔγϣϯΛHypercornͰಈ͔͢

  70. HTTP/1.1 HTTP/2 ⽐較 •࣮ߦ؀ڥ͸ϩʔΧϧϚγϯ •ࢦඪ͸ɺॲཧͷऴྃ·Ͱʹ͔͔ͬͨ࣌ؒʗ1ඵ͋ͨΓʹࡹ͚ΔϦΫΤετ਺ •ੑೳଌఆπʔϧͱͯ͠ɺh2load ίϚϯυΛ࢖༻͢Δ •؆୯ͳWebΞϓϦέʔγϣϯΛHypercornͰಈ͔͢

  71. HTTP/1.1 HTTP/2 ⽐較 •࣮ߦ؀ڥ͸ϩʔΧϧϚγϯ •ࢦඪ͸ɺॲཧͷऴྃ·Ͱʹ͔͔ͬͨ࣌ؒʗ1ඵ͋ͨΓʹࡹ͚ΔϦΫΤετ਺ •ੑೳଌఆπʔϧͱͯ͠ɺh2load ίϚϯυΛ࢖༻͢Δ •؆୯ͳWebΞϓϦέʔγϣϯΛHypercornͰಈ͔͢

  72. HTTP/1.1 HTTP/2 ⽐較 αʔό HTTP/1.1 HTTP/2 •Hypercorn •fastapi 0.61.1 0.11.0

    Webαʔό Web Framework ⁶ ⁶ ʢASGIʣ ʢHTTP/2ʣ ʢHTTP/1.1ʣ
  73. HTTP/1.1 HTTP/2 ⽐較 αʔό HTTP/1.1 HTTP/2 •Hypercorn •fastapi 0.61.1 0.11.0

    Webαʔό Web Framework ⁶ ⁶ ʢASGIʣ ʢHTTP/2ʣ ʢHTTP/1.1ʣ
  74. ϋʔυ΢ΣΞ؀ڥ •Macbook Pro •2.6 GHz 6ίΞ Intel Core i7 •ϝϞϦ

    16GB HTTP/1.1 HTTP/2 ⽐較
  75. HTTP/1.1 HTTP/2 ⽐較 •h2load ίϚϯυ Φϓγϣϯ ҙຯ -n ૯ϦΫΤετ਺ -c

    ΫϥΠΞϯτ਺ɻಉ࣌ΞΫηε਺ -p ϓϩτίϧʢࣗಈ൑ผʣ •h2load -c 100 -n 10000 https://127.0.0.1:8000/query
  76. HTTP/1.1 HTTP/2 ⽐較 ҎԼ3ͭ৚݅ •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100 •ΫϥΠΞϯτಉ࣌઀ଓ 50,

    ϦΫΤετ਺ 5000 •ΫϥΠΞϯτಉ࣌઀ଓ 100, ϦΫΤετ਺ 10000
  77. HTTP/1.1 HTTP/2 ⽐較 ҎԼ3ͭ৚݅ •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100 •ΫϥΠΞϯτಉ࣌઀ଓ 50,

    ϦΫΤετ਺ 5000 •ΫϥΠΞϯτಉ࣌઀ଓ 100, ϦΫΤετ਺ 10000 ࢦඪ •ॲཧͷऴྃ·Ͱʹ͔͔ͬͨ࣌ؒ •1ඵ͋ͨΓͷॲཧͨ͠ϦΫΤετ਺
  78. HTTP/1.1 HTTP/2 ⽐較 ҎԼ3ͭ৚݅ •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100 •ΫϥΠΞϯτಉ࣌઀ଓ 50,

    ϦΫΤετ਺ 5000 •ΫϥΠΞϯτಉ࣌઀ଓ 100, ϦΫΤετ਺ 10000 ࢦඪ •ॲཧͷऴྃ·Ͱʹ͔͔ͬͨ࣌ؒ •1ඵ͋ͨΓͷॲཧͨ͠ϦΫΤετ਺ → ୹͍ͱྑ͍ → ଟ͍ͱྑ͍
  79. HTTP/1.1 HTTP/2 ⽐較 •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100

  80. HTTP/1.1 HTTP/2 ⽐較 ऴྃ࣌ؒ [s]     

    •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100
  81. HTTP/1.1 HTTP/2 ⽐較 ऴྃ࣌ؒ [s]     

    •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100      ϦΫΤετ [s]
  82. HTTP/1.1 HTTP/2 ⽐較 ऴྃ࣌ؒ [s]     

    •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100      ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  83. 🤔

  84. HTTP/1.1 HTTP/2 ⽐較 ऴྃ࣌ؒ [s]     

    •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100      ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  85. HTTP/1.1 HTTP/2 ⽐較      •ΫϥΠΞϯτಉ࣌઀ଓ 50,

    ϦΫΤετ਺ 5000      ऴྃ࣌ؒ [s] ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  86. HTTP/1.1 HTTP/2 ⽐較      •ΫϥΠΞϯτಉ࣌઀ଓ 100,

    ϦΫΤετ਺ 10000      ऴྃ࣌ؒ [s] ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  87. 🤔

  88. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •αʔόϓογϡ •ϔομʔͷѹॖ •ετϦʔϜʢϦΫΤετͷଟॏԽʣ •଎౓վળΛ໨తʹͨ͠࢓༷

  89. HTTP/2 •HTTP/̍.1͔Β16೥ͷࡀ݄Λܦͯɺ2015೥ʹRFC •αʔόϓογϡ •ϔομʔͷѹॖ •ετϦʔϜʢϦΫΤετͷଟॏԽʣ •଎౓վળΛ໨తʹͨ͠࢓༷

  90. HTTP/1.1 HTTP/2 ⽐較 •h2load — help Max concurrent streams to

    issue per session. When http/1.1 is used, this speci fi es the number of HTTP pipelining requests in- fl ight. ηογϣϯ͝ͱʹൃߦ͢Δ࠷େಉ࣌ετϦʔϜ਺ɻ http/1.1 Λ࢖༻͢Δ৔߹ɺ HTTP ύΠϓϥΠϯϦΫΤετ ͷ਺Λࢦఆ͠·͢ɻ -m, --max-concurrent-streams=<N>
  91. HTTP/1.1 HTTP/2 ⽐較 •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100, ετϦʔϜ 5

  92. HTTP/1.1 HTTP/2 ⽐較 ऴྃ࣌ؒ [s]     

    •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100, ετϦʔϜ 5
  93. HTTP/1.1 HTTP/2 ⽐較 ऴྃ࣌ؒ [s]     

    •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100, ετϦʔϜ 5      ϦΫΤετ [s]
  94. HTTP/1.1 HTTP/2 ⽐較 ऴྃ࣌ؒ [s]     

    •ΫϥΠΞϯτಉ࣌઀ଓ 10, ϦΫΤετ਺ 100, ετϦʔϜ 5      ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  95. HTTP/1.1 HTTP/2 ⽐較      •ΫϥΠΞϯτಉ࣌઀ଓ 50,

    ϦΫΤετ਺ 5000, ετϦʔϜ 5      ऴྃ࣌ؒ [s] ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  96. HTTP/1.1 HTTP/2 ⽐較      •ΫϥΠΞϯτಉ࣌઀ଓ 100,

    ϦΫΤετ਺ 10000, ετϦʔϜ 5      ऴྃ࣌ؒ [s] ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  97. HTTP/1.1 HTTP/2 ⽐較 ετϦʔϜͳ͠ ετϦʔϜ͋Γ     

    •ΫϥΠΞϯτಉ࣌઀ଓ 100, ϦΫΤετ਺ 10000, ετϦʔϜ 5 ετϦʔϜͳ͠ ετϦʔϜ͋Γ      ऴྃ࣌ؒ [s] ϦΫΤετ [s] HTTP/1.1 HTTP/2 HTTP/1.1 HTTP/2
  98. •ϦΫΤετͷଟॏԽ͕͞Ε͍ͯΔͱ͜ΖͰ͋Ε͹HTTP/2͸ɺ͸΍͍

  99. •WebαΠτ΁ͷ1ճͷΞΫηεͰɺෳ਺ճαʔό΁ϦΫΤετΛ৔߹ •ϦΫΤετͷଟॏԽ͕͞Ε͍ͯΔͱ͜ΖͰ͋Ε͹HTTP/2͸ɺ͸΍͍

  100. → γεςϜ؂ࢹμογϡϘʔυ •WebαΠτ΁ͷ1ճͷΞΫηεͰɺෳ਺ճαʔό΁ϦΫΤετΛ৔߹ → ϦΞϧλΠϜσʔλ → νϟοτΞϓϦ •ϦΫΤετͷଟॏԽ͕͞Ε͍ͯΔͱ͜ΖͰ͋Ε͹HTTP/2͸ɺ͸΍͍

  101. → γεςϜ؂ࢹμογϡϘʔυ •WebαΠτ΁ͷ1ճͷΞΫηεͰɺෳ਺ճαʔό΁ϦΫΤετΛ৔߹ → ϦΞϧλΠϜσʔλ → νϟοτΞϓϦ •طଘͷαΠτͰܧ͗଍͠ܧ͗଍͠ʹͳͬͯ͠·͍ͬͯΔ৔߹ʢ΍Ήͳ͘ʣ •ϦΫΤετͷଟॏԽ͕͞Ε͍ͯΔͱ͜ΖͰ͋Ε͹HTTP/2͸ɺ͸΍͍

  102. •HTTP/2Կ͕͓͍͍͠ͷʁ

  103. •HTTP/2Կ͕͓͍͍͠ͷʁ → ଎౓͕վળͷՄೳੑ

  104. •HTTP/2Կ͕͓͍͍͠ͷʁ •ࣗ͝਎ͷPython Web Application Λ͝ཡʹͳͬͯΈ͍ͯͩ͘͞ɻ •ϒϥ΢βͷσόοΨΛ։͍ͯϦϩʔυ → ଎౓͕վળͷՄೳੑ

  105. •HTTP/2Կ͕͓͍͍͠ͷʁ •ࣗ͝਎ͷPython Web Application Λ͝ཡʹͳͬͯΈ͍ͯͩ͘͞ɻ •ϒϥ΢βͷσόοΨΛ։͍ͯϦϩʔυ •Protocol=HTTP/1.1ʹͳ͍ͬͯΔʢLBͷ಺ଆ͕HTTP/1.1ͷՄೳੑ΋ʣ → ଎౓͕վળͷՄೳੑ

  106. •HTTP/2Կ͕͓͍͍͠ͷʁ •Typeʹ fetch ΍ xhr ͕ଟ͍ •ࣗ͝਎ͷPython Web Application Λ͝ཡʹͳͬͯΈ͍ͯͩ͘͞ɻ

    •ϒϥ΢βͷσόοΨΛ։͍ͯϦϩʔυ •Protocol=HTTP/1.1ʹͳ͍ͬͯΔʢLBͷ಺ଆ͕HTTP/1.1ͷՄೳੑ΋ʣ → ଎౓͕վળͷՄೳੑ
  107. •HTTP/2Կ͕͓͍͍͠ͷʁ •Typeʹ fetch ΍ xhr ͕ଟ͍ •ࣗ͝਎ͷPython Web Application Λ͝ཡʹͳͬͯΈ͍ͯͩ͘͞ɻ

    •ϒϥ΢βͷσόοΨΛ։͍ͯϦϩʔυ •Protocol=HTTP/1.1ʹͳ͍ͬͯΔʢLBͷ಺ଆ͕HTTP/1.1ͷՄೳੑ΋ʣ
  108. •HTTP/2Կ͕͓͍͍͠ͷʁ •HTTP/2ͷWebserver Hypercorn ʹ͢Δ͜ͱͰ଎౓վળ͕ΈΒΕΔ •Typeʹ fetch ΍ xhr ͕ଟ͍ •ࣗ͝਎ͷPython

    Web Application Λ͝ཡʹͳͬͯΈ͍ͯͩ͘͞ɻ •ϒϥ΢βͷσόοΨΛ։͍ͯϦϩʔυ •Protocol=HTTP/1.1ʹͳ͍ͬͯΔʢLBͷ಺ଆ͕HTTP/1.1ͷՄೳੑ΋ʣ → ଎౓͕վળͷՄೳੑ
  109. •HTTP/2Կ͕͓͍͍͠ͷʁ •Typeʹ fetch ΍ xhr ͕ଟ͍ •ࣗ͝਎ͷPython Web Application Λ͝ཡʹͳͬͯΈ͍ͯͩ͘͞ɻ

    •ϒϥ΢βͷσόοΨΛ։͍ͯϦϩʔυ •Protocol=HTTP/1.1ʹͳ͍ͬͯΔʢLBͷ಺ଆ͕HTTP/1.1ͷՄೳੑ΋ʣ ͔΋͠Ε·ͤΜ •HTTP/2ͷWebserver Hypercorn ʹ͢Δ͜ͱͰ଎౓վળ͕ΈΒΕΔ → ଎౓͕վળͷՄೳੑ
  110. •AWSͰσϓϩΠ͍ͯ͠Δ৔߹ •ALB ʹ ಺ଆ͸HTTP/2 ະରԠͷͨΊɺHTTP/̍.1 ϒϥ΢β ALB Web Server Web

    FW )551 )551 84(*"4(*
  111. •AWSͰσϓϩΠ͍ͯ͠Δ৔߹ •ALB ʹ ಺ଆ͸HTTP/2 ະରԠͷͨΊɺHTTP/̍.1 •NLB ʹ 2020೥6݄ʹ಺ଆHTTP/2ରԠ͍ͯ͠Δ ϒϥ΢β Ϧόʔε

    ϓϩΩγ Hyper corn Web FW )551 )551 "4(* IUUQTBXTBNB[PODPNKQBCPVUBXTXIBUTOFXOFUXPSLMPBECBMBODFSOPXTVQQPSUTUMTBMQOQPMJDJFT
  112. 2 •WSGIΞϓϦέʔγϣϯͷ৔߹ •HypercornʢASGI Webαʔό͸WSGIରԠ͍ͯ͠·͢ʣͰσϓϩΠՄೳ •ࢼͯ͠ΈΔՁ஋͕͋Δ͔΋ʂʁ •Django 2ܥ - wsgi.pyΛϥοϓ͢Δ͚ͩ from

    hypercorn.middleware import AsyncioWSGIMiddleware import sampleproject.wsgi as wsgi_app asyncio_app = AsyncioWSGIMiddleware(wsgi_app.application) https://github.com/jrfk/django2-hypercorn
  113. 選択肢 •GunicornˎWSGIϑϨʔϜϫʔΫ •GunicornˎmeinheldˎWSGIϑϨʔϜϫʔΫ •celeryˎGunicornˎWSGIϑϨʔϜϫʔΫ •UvicornˎASGIϑϨʔϜϫʔΫ

  114. 選択肢 •GunicornˎWSGIϑϨʔϜϫʔΫ •GunicornˎmeinheldˎWSGIϑϨʔϜϫʔΫ •celeryˎGunicornˎWSGIϑϨʔϜϫʔΫ •UvicornˎASGIϑϨʔϜϫʔΫ •HypercornˎASGIϑϨʔϜϫʔΫ/WSGIϑϨʔϜϫʔΫ

  115. 選択肢 •GunicornˎWSGIϑϨʔϜϫʔΫ •GunicornˎmeinheldˎWSGIϑϨʔϜϫʔΫ •celeryˎGunicornˎWSGIϑϨʔϜϫʔΫ •UvicornˎASGIϑϨʔϜϫʔΫ •HypercornˎASGIϑϨʔϜϫʔΫ/WSGIϑϨʔϜϫʔΫ

  116. 参考資料 •How to serve HTTP/2 using Python IUUQTNFEJVNDPNQZUIPOQBOEFNPOJVNIPXUPTFSWFIUUQVTJOHQZUIPOFCCEF ff 

    •HTTP/1 should die IUUQTNFEJVNDPN!QHKPOFTIUUQTIPVMEEJFCEF •Hypercorn IUUQTQHKPOFTHJUMBCJPIZQFSDPSOJOEFYIUNM •jrfk / fastapi-hypercorn_Performance-measurement IUUQTHJUIVCDPNKSGLGBTUBQJIZQFSDPSO@1FSGPSNBODFNFBTVSFNFOU
  117. HTTP/ とASGI Webサーバの関係 Junya Fukuda Python Charity Talks in Japan

    2021.02 - Hypercornを例に 2
  118. HTTP/ とASGI Webサーバの関係 Junya Fukuda Python Charity Talks in Japan

    2021.02 - Hypercornを例に 3🎉
  119. HTTP/3とPython

  120. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨

  121. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ

  122. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ

  123. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ

  124. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔

  125. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔ HTTP/1.0

    HTTP/2 1990 2000 2010 HTTP/0.9 HTTP/1.1 1997 1999 2015
  126. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔ HTTP/1.0

    HTTP/2 1990 2000 2010 2021 HTTP/0.9 HTTP/1.1 1997 1999 2015
  127. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔ HTTP/1.0

    HTTP/2 1990 2000 2010 2021 HTTP/0.9 HTTP/1.1 1997 1999 2015 HTTP/3 QUIC
  128. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔ •ͦΕ͸΋ͪΖΜɺHTTP/2ʹ΋՝୊͕͔͋ͬͨΒ

  129. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔ •ͦΕ͸΋ͪΖΜɺHTTP/2ʹ΋՝୊͕͔͋ͬͨΒ

    •՝୊…ͦΕ͸…
  130. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔ •ͦΕ͸΋ͪΖΜɺHTTP/2ʹ΋՝୊͕͔͋ͬͨΒ

    •՝୊... 🙏
  131. HTTP/3 •HTTP/2ʹ͙࣍৽͍͠HTTPͷن֨ •TCP→UDPʹ QUIC - UDPͷసૹϓϩτίϧ •HTTP/2 ͔Β5೥ ͳͥͰͰ͖ͯͨͷ͔ •ͦΕ͸΋ͪΖΜɺHTTP/2ʹ΋՝୊͕͔͋ͬͨΒ

    •՝୊... 🙏 HTTP/3 explained - https://http3-explained.haxx.se/ja - ʢ೔ຊޠ 🎉ʣ
  132. HTTP/3 現在 •IETF QUIC WGͰٞ࿦ → ͍Α͍Α RFC ΁

  133. HTTP/3 現在 •IETF QUIC WGͰٞ࿦ → ͍Α͍Α RFC ΁ •ͦͯ͠…

  134. HTTP/3 現在 •IETF QUIC WGͰٞ࿦ → ͍Α͍Α RFC ΁ •ͦͯ͠…

    •2021೥2݄18೔ 16:06 (UTC)
  135. HTTP/3 現在 IUUQTNBJMBSDIJWFJFUGPSHBSDINTHJFUGBOOPVODFQWHCH,MX7'D-.1R-FJNC'[H

  136. HTTP/3 現在 IUUQTNBJMBSDIJWFJFUGPSHBSDINTHJFUGBOOPVODFQWHCH,MX7'D-.1R-FJNC'[H

  137. HTTP/3 現在 IETFʹঝೝ͞Ε·ͨ͠ 🎉🎉🎉🎉🎉

  138. HTTP/3 現在 •IETF QUIC WGͰٞ࿦ → ͍Α͍Α RFC ΁ •HTTP/3

    QUIC ঝೝ •RFC ൃߦ४උஈ֊ - ผͷHTTPηϚϯςΟΫε࢓༷ʹґଘ͍ͯ͠ΔͨΊ •࣮ͦͯ͠૷΁…
  139. HTTP/3 Python •quicwg ͷ GithubϦϙδτϦ Wiki - Implementations

  140. HTTP/3 Python •quicwg ͷ GithubϦϙδτϦ Wiki - Implementations •aioquic -

    QUIC implementation using Python and asyncio.
  141. HTTP/3 Python •quicwg ͷ GithubϦϙδτϦ Wiki - Implementations •aioquic -

    QUIC implementation using Python and asyncio. •ASGI͸… HTTP/3 ʹؔͯ͠ͷϊʔλον
  142. HTTP/3 Python •quicwg ͷ GithubϦϙδτϦ Wiki - Implementations •aioquic -

    QUIC implementation using Python and asyncio. •ASGI͸… HTTP/3 ʹؔͯ͠ͷϊʔλον ͕͔ͩ͠͠…
  143. HTTP/3 Python •quicwg ͷ GithubϦϙδτϦ Wiki - Implementations •aioquic -

    QUIC implementation using Python and asyncio. •ASGI͸… HTTP/3 ʹؔͯ͠ͷϊʔλον ͕͔ͩ͠͠…
  144. HTTP/3 Python •quicwg ͷ GithubϦϙδτϦ Wiki - Implementations •aioquic -

    QUIC implementation using Python and asyncio. •ASGI͸… HTTP/3 ʹؔͯ͠ͷϊʔλον ͕͔ͩ͠͠… Hypercorn can optionally serve the current draft of the HTTP/3 speci fi cation using the aioquic library.
  145. Hypercorn aioquic •ಈ͔͢લʹͲ͏ಈ͍͍ͯͨΒਖ਼͍͠ͷ͔ h3spec

  146. Hypercorn aioquic •ಈ͔͢લʹͲ͏ಈ͍͍ͯͨΒਖ਼͍͠ͷ͔ •http/2ʹ͸ h2spec ͱ͍͏πʔϧ͕͋Γ - moto ishizawa h3spec

  147. Hypercorn aioquic •ಈ͔͢લʹͲ͏ಈ͍͍ͯͨΒਖ਼͍͠ͷ͔ •http/2ʹ͸ h2spec ͱ͍͏πʔϧ͕͋Γ - moto ishizawa h3spec

    •http/3ʹ͸ h3spec ͱ͍͏πʔϧ͕͋Γʂ
  148. Hypercorn aioquic •ಈ͔͢લʹͲ͏ಈ͍͍ͯͨΒਖ਼͍͠ͷ͔ •http/2ʹ͸ h2spec ͱ͍͏πʔϧ͕͋Γ - moto ishizawa h3spec

    •http/3ʹ͸ h3spec ͱ͍͏πʔϧ͕͋Γʂ •h3spec Ͱద߹ੑΛνΣοΫʂ
  149. Hypercorn aioquic •४උ 🍽 h3spec

  150. Hypercorn aioquic •४උ 🍽 h3spec w1ZUIPO wQJQJOTUBMM`IZQFSDPSO<I>` w44-ূ໌ॻ wTBNQMFBQQGBTUBQJlIFMMPXPSMEz wITQFD

    wDISPNJVN 🌽
  151. Hypercorn aioquic •४උ 🍽 h3spec w1ZUIPO wQJQJOTUBMM`IZQFSDPSO<I>` w44-ূ໌ॻ wTBNQMFBQQGBTUBQJlIFMMPXPSMEz wITQFD

    wDISPNJVN 🌽 ͍͍ͩͨ͜Μͳײ͡Ͱ͢ʢ֮͑ͳ͍͍ͯ͘Ͱ͢ʣ
  152. Hypercorn aioquic Ͱ͸࣮ࡍʹಈ͔ͯ͠Έ·͠ΐ͏ h3spec w IZQFSDPSORVJDCJOEMPDBMIPTUDFSU fi MFDFSUQFNLFZ fi MF

    LFZQFNCJOEMPDBMIPTUTJNQMFGBTUBQJBQQ
  153. Hypercorn aioquic Ͱ͸࣮ࡍʹಈ͔ͯ͠Έ·͠ΐ͏ h3spec w IZQFSDPSORVJDCJOEMPDBMIPTUDFSU fi MFDFSUQFNLFZ fi MF

    LFZQFNCJOEMPDBMIPTUTJNQMFGBTUBQJBQQ w ଓ͍ͯITQFDͰ͢
  154. Hypercorn aioquic Ͱ͸࣮ࡍʹಈ͔ͯ͠Έ·͠ΐ͏ h3spec

  155. Hypercorn aioquic Ͱ͸࣮ࡍʹಈ͔ͯ͠Έ·͠ΐ͏ h3spec w IZQFSDPSORVJDCJOEMPDBMIPTUDFSU fi MFDFSUQFNLFZ fi MF

    LFZQFNCJOEMPDBMIPTUTJNQMFGBTUBQJBQQ w ଓ͍ͯITQFDͰ͢ w ਅͬ੺Ͱͨ͠ʜ
  156. Hypercorn aioquic Ͱ͸࣮ࡍʹಈ͔ͯ͠Έ·͠ΐ͏ h3spec w IZQFSDPSORVJDCJOEMPDBMIPTUDFSU fi MFDFSUQFNLFZ fi MF

    LFZQFNCJOEMPDBMIPTUTJNQMFGBTUBQJBQQ w ଓ͍ͯITQFDͰ͢ w ਅͬ੺Ͱͨ͠ʜ w )ZQFSDPSOͰ࢖༻͍ͯ͠ΔBJPRVJDͰ΋ಉ༷ʹਅͬ੺Ͱͨ͠
  157. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ

  158. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ •pythonͷasyncioʹ͸τϥϯεϙʔτ૚ʢUDP΋ʣΛѻ͏API͕༻ҙ͞Ε͍ͯΔ

  159. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ •pythonͷasyncioʹ͸τϥϯεϙʔτ૚ʢUDP΋ʣΛѻ͏API͕༻ҙ͞Ε͍ͯΔ •ASGIͰ͸HTTP/3 QUICͰ͸ٞ࿦͸࢝·͍ͬͯ·ͤΜ͕ɺ

  160. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ •pythonͷasyncioʹ͸τϥϯεϙʔτ૚ʢUDP΋ʣΛѻ͏API͕༻ҙ͞Ε͍ͯΔ •HTTP/3 QUICͱasyncioͰASGIΛ͞ΒʹҰาઌ΁ •ASGIͰ͸HTTP/3

    QUICͰ͸ٞ࿦͸࢝·͍ͬͯ·ͤΜ͕ɺ
  161. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ •pythonͷasyncioʹ͸τϥϯεϙʔτ૚ʢUDP΋ʣΛѻ͏API͕༻ҙ͞Ε͍ͯΔ •HTTP/3 QUICͱasyncioͰASGIΛ͞ΒʹҰาઌ΁ •ASGIͰ͸HTTP/3

    QUICͰ͸ٞ࿦͸࢝·͍ͬͯ·ͤΜ͕ɺ •·ͣ͸Ұาͣͭ
  162. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ •pythonͷasyncioʹ͸τϥϯεϙʔτ૚ʢUDP΋ʣΛѻ͏API͕༻ҙ͞Ε͍ͯΔ •Hypercorn΋aioquic΋։ൃ͸׆ൃ •HTTP/3 QUICͱasyncioͰASGIΛ͞ΒʹҰาઌ΁

    •ASGIͰ͸HTTP/3 QUICͰ͸ٞ࿦͸࢝·͍ͬͯ·ͤΜ͕ɺ •·ͣ͸Ұาͣͭ
  163. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ •pythonͷasyncioʹ͸τϥϯεϙʔτ૚ʢUDP΋ʣΛѻ͏API͕༻ҙ͞Ε͍ͯΔ •Hypercorn΋aioquic΋։ൃ͸׆ൃ •HTTP/3 QUICͱasyncioͰASGIΛ͞ΒʹҰาઌ΁

    •ASGIͰ͸HTTP/3 QUICͰ͸ٞ࿦͸࢝·͍ͬͯ·ͤΜ͕ɺ •·ͣ͸Ұาͣͭ •ΠγϡʔΛͷ͍ͧͯΈΔͱ͜Ζ͔Β͸͡ΊͯΈͯ͸ 👀
  164. - HTTP/3 Python実装 現状 •Python HTTP/3͸͜Ε͔Βʂ •pythonͷasyncioʹ͸τϥϯεϙʔτ૚ʢUDP΋ʣΛѻ͏API͕༻ҙ͞Ε͍ͯΔ •Hypercorn΋aioquic΋։ൃ͸׆ൃ •HTTP/3 QUICͱasyncioͰASGIΛ͞ΒʹҰาઌ΁

    •ASGIͰ͸HTTP/3 QUICͰ͸ٞ࿦͸࢝·͍ͬͯ·ͤΜ͕ɺ •·ͣ͸Ұาͣͭ •ΠγϡʔΛͷ͍ͧͯΈΔͱ͜Ζ͔Β͸͡ΊͯΈͯ͸ 👀 •Hypercornͷissueʹίϝϯτͯ͠Έ·ͨ͠
  165. 参考資料 •HTTP/3 explained IUUQTIUUQFYQMBJOFEIBYYTFKB •Fastly : Making the Web faster

    with HTTP/3 - kazuho oku 8FCΛՃ଎͢Δ)551 •http3-note IUUQTHJUIVCDPN fl BOPZVLJIUUQOPUF •Playing with QUIC - The Chromium Projects IUUQTXXXDISPNJVNPSHRVJDQMBZJOHXJUIRVJD