-
Hi there. I have Gunicorn managing, say, 10 Uvicorn workers i.e. How is incoming traffic being distributed across the 10 workers? What algorithm is used and can I control or inspect it? For my testing, I wrote a FastAPI endpoint that sleeps for 30 seconds, and implemented a middleware that increments a counter each time a request is being processed. I then used @benoitc Help? I noticed the counter is not evenly incremented across all the uvicorn workers. Some workers end up getting more traffic than others. Is this a known issue? Can someone help explain how traffic distribution works? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Nevermind. Found the solution. |
Beta Was this translation helpful? Give feedback.
-
workers don't share any context at the moment per design. That's why the counter is not updated. the rest is documented |
Beta Was this translation helpful? Give feedback.
workers don't share any context at the moment per design. That's why the counter is not updated. the rest is documented