Hi,

we ran into an issue a few weeks ago and I don't know if it's an expected
behavior or not.

Short version: uwsgi still accepts connections even when the backlog is
full. Is it normal? If it is, is there a way to refuse connection once it's
full?

Long version: we have several instances on Heroku serving our python app
with uwsgi. Their load-balancer has the following routing algorithm:


   1. Accept a new request for the app
   2. Look up the list of web dynos (instance name on Heroku) for the app
   3. Randomly select a dyno from that list
   4. Attempt to open a connection to that dyno's IP and port
   5. If the connection was successful, proxy the request to the dyno, and
   proxy the response back to the client
   6. If it takes more than 30 seconds, the request is killed.


If a wsgi worker get stale, the backlog quickly fills up and then it
shouldn't accept the connection to let the router know that it should route
the requests to another dyno. The problem is that it doesn't and all the
traffic going to a stale dyno/worker will get killed eventually.

I've managed to reproduce the behavior locally.

Thanks

-- 
Francois
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to