Python Startup Performance on Azure App Service

I noticed a huge difference in app startup performance and reliability on Azure App Service when using a FastApi-based Python application depending on whether uvicorn or gunicorn is used.  

 

Fast:

python -m uvicorn app:app --host 0.0.0.0

 

Very slow:

gunicorn -w 4 -k uvicorn.workers.UvicornWorker app:app 

Show Comments