You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently in the process of deploying a containerized FastAPI application using Uvicorn as the ASGI server. As I explore the best ways to run Uvicorn in production, I'm thinking about whether I need to use Gunicorn along with Uvicorn on Kubernetes. We expect around 300.000 requests per day.
Here are a few points I’d like to clarify:
Performance & Stability: Does wrapping Uvicorn with Gunicorn enhance performance and stability in a containerized setup? Are there specific scenarios where this combination proves beneficial, particularly under high load or when managing multiple worker processes or should I just rely on K8s scaling capabilities?
Concurrency: Given Uvicorn’s ability to handle asynchronous requests, is there a performance trade-off when running it under Gunicorn?
Deployment Simplicity: Would using Gunicorn add unnecessary complexity to the deployment process? Are there advantages in terms of managing application lifecycle, logging, or scaling that Gunicorn provides when running Uvicorn?
Ultimately, what would you recommend for a production setup? Either let's say 2 application pods running e.g. Gunicorn with 4 Uvicorn workers to ensure redundancy OR 8 slim application pods running uvicorn with a single worker?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently in the process of deploying a containerized FastAPI application using Uvicorn as the ASGI server. As I explore the best ways to run Uvicorn in production, I'm thinking about whether I need to use Gunicorn along with Uvicorn on Kubernetes. We expect around 300.000 requests per day.
Here are a few points I’d like to clarify:
Ultimately, what would you recommend for a production setup? Either let's say 2 application pods running e.g. Gunicorn with 4 Uvicorn workers to ensure redundancy OR 8 slim application pods running uvicorn with a single worker?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions