Open ChrisLovering opened 2 years ago
I'm 50/50 on this. A completely separately container here will be a lot heavier to scale up and down than simply using multiple workers in a single container.
Yea I think it's a trade off between better multi-core support and better load balancing.
Do you know off the top of your head what the load difference would be? The reason I ask it afaik gunicorn has a management process on top of each of the worker processes, which wouldn't be needed with individual containers. So we do drop one of the resource sinks by doing this.
cc @python-discord/devops
Since we use kubernetes in production, we should handle replication at the cluster level instead of using a process manager (like Gunicorn with workers) in each container.
See: https://fastapi.tiangolo.com/deployment/docker/#when-to-use