Uvicorn in a kubernetes environment #1148
-
Hi! I'm trying to understand what the added benefit would be from still adding gunicorn in the deployment when your code runs on kubernetes instead of just using plain uvicorn. The docs explain the benefits/needs for a process manager. But is that still relevant when your code runs on kubernetes? Looking forward to your train of thought. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @m-vellinga The documentation says that uvicorn when used as a process manager does not provide any process monitoring. That might be a disadvantage compared to gunicorn. |
Beta Was this translation helpful? Give feedback.
-
Gunicorn will add another layer of complexity. The only goal of gunicorn is to manage the workers (uvicorn), and on K8s you have the management of pods, so you're shifting the place where you manage "things". If you wish so, you can use a single uvicorn worker, and you don't need to use Gunicorn. The current documention needs to be updated to talk a little bit more about this subject. |
Beta Was this translation helpful? Give feedback.
Gunicorn will add another layer of complexity. The only goal of gunicorn is to manage the workers (uvicorn), and on K8s you have the management of pods, so you're shifting the place where you manage "things". If you wish so, you can use a single uvicorn worker, and you don't need to use Gunicorn.
The current documention needs to be updated to talk a little bit more about this subject.