Jump to: navigation, search

SGI-servers-comparison

WSGI/ASGI servers serve as an essential gateway between Python web applications and web servers, ensuring smooth and efficient communication. They provide a standardized interface, facilitate request and response management, enhance the performance and scalability of applications, and allow developers to concentrate on feature development without dealing with the low-level aspects of HTTP request handling.

This abstraction and flexibility make WSGI/ASGI servers indispensable for deploying modern and high-performance Python web applications.

Old frameworks not considered as good candidates: cherrypy, twisted, sanic, tornado These old frameworks are only quoted here to give an overview of current state of the art. These old frameworks are not considered as suitable candidates because, years ago, some of them, like tornado, have been already replaced in OpenStack by Eventlet.

Please put your comments and appreciations into the related etherpad: https://etherpad.opendev.org/p/eventlet-removal-SGI-servers-comparison

For web frameworks comparison, it's happening here https://wiki.openstack.org/wiki/web-frameworks-comparison

The HTTP libs (client lib) comparison is happening here https://wiki.openstack.org/wiki/Http-libraries-comparison

Here is a comparison between the main WSGI and ASGI servers available to the Python community:

Server WSGI Support ASGI Support Active Maintenance asyncio Support HTTP/1.0 HTTP/1.1 HTTP/2 Comments
uWSGI Yes Limited Moderate. Moved to maintenance mode only, meaning that we should not expect support for new protocols like HTTP/2 etc. https://github.com/unbit/uwsgi/blob/master/README Limited Yes Yes No Often used with a reverse proxy (Nginx, Caddy) for HTTP/2
Uvicorn No Yes Very active Complete No Yes Partial Experimental HTTP/2 support, optimized for ASGI
Hypercorn Yes (with limitations) Yes Moderate Complete Yes Yes Yes Full HTTP/2 support without needing a proxy
Gunicorn Yes Yes (with workers) Quiet Partial Yes Yes No ASGI support via workers like `UvicornWorker`
Daphne No Yes Quiet Complete No Yes No Optimized for Django Channels and WebSockets
Waitress Yes No Moderate Limited Yes Yes No Pure WSGI server, simple and reliable for synchronous applications
Bjoern Yes No Moderately active Limited Yes Yes No Ultra-fast WSGI server written in C, suitable for high performance
CherryPy Yes No Quiet Limited Yes Yes No Includes its own WSGI server, often used behind other servers for production
Tornado Partial (via adapters) No Active Complete (own model) No Yes Partial Asynchronous framework with built-in server, suitable for real-time applications
Twisted Yes (via `twisted.web.wsgi`) No Very Active Based on Twisted No Yes No Powerful asynchronous networking library, uses its own asynchronous model
Sanic No Yes (via adaptations) Active Complete No Yes Partial Asynchronous web framework optimized for high performance