https://github.com/tiangolo/fastapi/discussions/7439 you don't need gunicorn in AKS. But in some other places they say "You can use Gunicorn (or also Uvicorn) as a process manager with Uvicorn workers to take advantage of multi-core CPUs, to run multiple processes in parallel."
So if we create azure container apps with multiple cores do we need gunicorn or not? I am not so familiar with container apps.
"Not strictly necessary" Consider Gunicorn when you have a computationally heavy FastAPI application on an Azure Container App with 4 cores. And You want to ensure maximum CPU utilization. So that, you can use Gunicorn to manage multiple Uvicorn workers could help distribute the load effectively.
In our fast api, inside one end point we are calling multiple soap api calls to an external apim there were are using multi threading.( Threadpool executor). The container app configuration is 4core 8 gb in dev
In this case, if you use gunicorn, it will: Enhance paralallism, Handle False tolerance. (If a SOAP call severely hangs, Gunicorn can manage worker processes, preventing a single stalled call from blocking your entire endpoint.)
For an IO bounded task multiprocress may not enhance performance
Обсуждают сегодня