ASGI
Asynchronous Server Gateway Interface
ELI5 — The Vibe Check
ASGI is WSGI's younger, cooler sibling that can handle async stuff. While WSGI can only deal with one request-response at a time per worker, ASGI handles WebSockets, long-polling, and thousands of concurrent connections. It's the standard that makes modern async Python frameworks possible.
Real Talk
ASGI is a specification for Python asynchronous web servers and applications. It extends WSGI to support async/await, WebSockets, HTTP/2, and long-lived connections. ASGI applications can handle multiple requests concurrently within a single process, making them more efficient for I/O-bound workloads.
When You'll Hear This
"FastAPI uses ASGI, which is why it handles WebSockets natively." / "We need an ASGI server like Uvicorn or Daphne for our async Django channels."
Related Terms
FastAPI
FastAPI is a Python framework that's both blazing fast and auto-generates documentation for your API.
Uvicorn
Uvicorn is the lightning-fast ASGI server that runs your FastAPI and Starlette apps. Think of it as the engine under FastAPI's hood.
WebSocket
WebSocket is like upgrading a walkie-talkie from push-to-talk to a full phone call.
WSGI (Web Server Gateway Interface)
WSGI is the OG standard for Python web apps talking to web servers. It's been around since 2003 and it's how Django and Flask work under the hood.