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

Down the HTTP/3 rabbithole

Down the HTTP/3 rabbithole

Lightning talk at DjangoCon Europe 2022 about HTTP/3 and the Python ecosystem.

Jeremy Lainé

September 22, 2022
Tweet

Other Decks in Programming

Transcript

  1. About me • Using Python + Django since 2007 •

    CTO at • Author of several free software libraries ◦ aiortc - a Python implementation of WebRTC https://github.com/aiortc/aiortc ◦ aioquic - a Python implementation of QUIC and HTTP/3 https://github.com/aiortc/aioquic @JeremyLaine
  2. HTTP - seen from a Python web application HTTP server

    Django App HTTP/1.1 HTTP/2 HTTP/3 WSGI ASGI Browser @JeremyLaine gunicorn uvicorn hypercorn
  3. HTTP - seen from a Python client HTTP client library

    HTTP server HTTP/1.1 HTTP/2 HTTP/3 Your Python code API @JeremyLaine requests httpx
  4. Why QUIC + HTTP/3 ? • Stream multiplexing without head-of-line

    blocking • Reduce round-trips for connection establishment • Mandatory encryption • Allow different congestion control algorithms • Shiny new APIs accessible from the browser, e.g. WebTransport @JeremyLaine
  5. HTTP/3 what’s the deal? IPv4 / IPv6 TCP TLS HTTP/1

    or HTTP/2 IPv4 / IPv6 UDP QUIC HTTP/3 Provided “for free” by OS Encryption Reliability RFC 9114 - Jul 22 RFC 9000 - May 21 @JeremyLaine
  6. HTTP/3 why should you care? • A large, complex protocol

    stack has been shoved into userspace ◦ Ecosystem fragmentation? ◦ Dependency vulnerability? ◦ Package size? • State of the Python ecosystem ◦ One ASGI / HTTP/3 server leveraging aioquic : hypercorn ◦ Zero Python client libraries speaking HTTP/3 • Beyond the request / response paradigm ◦ WebTransport introduces streams (~WebSocket) and datagrams (~UDP) ◦ How does this fit within the ASGI protocol? ◦ How do we leverage these capabilities in web apps? ◦ How about client side? @JeremyLaine