The Asynchronous Server Gateway Interface, or ASGI, is the async successor to WSGI. It defines how Python web servers and apps communicate in a way that supports async code, so a single process can handle many concurrent connections, including WebSockets and streaming responses.

It matters when an app spends much of its time waiting, for example on database queries, calls to other services or open connections to many clients. Instead of tying up a worker for each wait, the server switches to other work, which can raise how many users one process can serve.

ASGI does not make code faster by itself. A blocking call inside an async app can still stall the event loop and every request on it, and CPU-heavy work gains little. Many ASGI frameworks can also run synchronous code, usually by moving it to a thread, which has its own costs.

To use it well, choose async-aware libraries, keep blocking work out of the event loop, test under realistic concurrent load, and check which server and framework versions you depend on, since the ecosystem keeps changing.