Q69: What are the differences between WSGI and ASGI application server standards?

  • WSGI (Web Server Gateway Interface - PEP 3333): Synchronous interface standard (gunicorn, uWSGI) designed for frameworks like Flask and Django.
  • ASGI (Asynchronous Server Gateway Interface): Async successor (uvicorn) supporting asyncio, WebSockets, and long-polling for modern frameworks like FastAPI.
Key Takeaways
  • WSGI: Synchronous web server interface (Flask/Django). ASGI: Asynchronous interface supporting WebSockets and asyncio (FastAPI).
Knowledge Check

Which application server specification supports async coroutines and WebSockets natively?