Overview
Gunicorn 23.0, released on August 10, 2024, adds HTTP/1.1 keep-alive by default and deprecates the eventlet worker.
Main Features
HTTP/1.1 and eventlet deprecation
HTTP/1.1 keep-alive is enabled by default, reducing latency for repeated connections. The eventlet worker is deprecated in favor of gevent or native async workers.
python
# HTTP/1.1 keep-alive enabled by default
# gunicorn --workers 4 app:app
# gevent worker recommended instead of eventlet
# gunicorn --worker-class gevent --workers 4 app:app
# gunicorn.conf.py
bind = '0.0.0.0:8000'
workers = 4
worker_class = 'gevent'
keepalive = 5 # seconds
