[Python] Does FastAPI still need Gunicorn?

Discussão em 'Python' iniciado por Stack, Julho 11, 2025.

  1. Stack

    Stack Membro Participativo

    For a long time Gunicorn+Uvicorn was the default setup for running FastAPI in production. However, I recently came across a blog post saying:


    In the meantime, this combination of Gunicorn and Uvicorn is no longer needed, as Uvicorn now also handles worker management itself
    ​

    I haven't found any other sources to verify this statement. Beside this, the official documentation only mention that the tiangolo/uvicorn-gunicorn-fastapi base Docker image is deprecated, but say nothing about Gunicorn+Uvicorn setup itself

    So:

    1. Does modern FastAPI need Gunicorn?
    2. Is there any difference between fastapi run --workers 4 main.py and gunicorn main:app -w 4 -k uvicorn.workers.UvicornWorker now?

    Continue reading...

Compartilhe esta Página