Q : Nginx with libevent

I am trying to use nginx load balancing with an http server running on
top of libevent. Because nginx makes connection requests in round
robin fashion I am seeing a strange behavior when one of the http server
is running a long query against backend database. What I am seeing is
nginx picks this particular server and the request from client blocks on
the call until the server comes back and entertains the request. Is
there a way I can tell nginx to not use a connection when there’s
already a pending request ? I guess BIG IP does something similar where
you can pick LRU algorithm and it will skip over active connections
until we exhaust every server in the pool.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs