Re: How to redispatch a request after queue timeout

2013-08-31 Thread Willy Tarreau
Hi Lukas, On Fri, Aug 30, 2013 at 10:27:34AM +0200, Lukas Tribus wrote: Is there a way to redispatch the requests to other servers ignoring the persistence on queue timeout? No; after a queue timeout (configurable by timeout queue), haproxy will drop the request. Think of what would

Re: How to redispatch a request after queue timeout

2013-08-31 Thread Willy Tarreau
On Fri, Aug 30, 2013 at 02:10:50PM +0530, Sachin Shetty wrote: Thanks Lukas. Yes, I was hoping to workaround by setting a smaller maxqueue limit and queue timeout. So what other options do we have, I need to: 1. Send all requests for a host (mytest.mydomain.com) to one backend as long as

Re: How to redispatch a request after queue timeout

2013-08-31 Thread Sachin Shetty
Thanks Willy. I am precisely using it for caching. I need requests to go to the same nodes for cache hits, but when the node is already swamped I would prefer a cache miss over a 503. Thanks Sachin On 8/31/13 12:57 PM, Willy Tarreau w...@1wt.eu wrote: On Fri, Aug 30, 2013 at 02:10:50PM +0530,

Re: How to redispatch a request after queue timeout

2013-08-31 Thread Sachin Shetty
We did try consistent hashing, but I found better distribution without it. We don¹t add or remove servers often so we should be ok. Our total pool is sized correctly and we are able to serve 100% requests when we use roundrobin, however sticky on host is what causes some nodes to hit maxconn. My

Re: How to redispatch a request after queue timeout

2013-08-31 Thread Willy Tarreau
On Sat, Aug 31, 2013 at 01:27:41PM +0530, Sachin Shetty wrote: We did try consistent hashing, but I found better distribution without it. That's known and normal. We don¹t add or remove servers often so we should be ok. It depends on what you do with them in fact, because most places will not

Re: How to redispatch a request after queue timeout

2013-08-31 Thread Sachin Shetty
Yes, no-queue is what I am looking for. If consistent hashing is easier to accommodate this change, I won't mind switching to consistent hashing when the fix is available. Right now with no support for maxqueue failover, consistent hashing is even more severe for our use case. Thanks again Willy.

Re: How to redispatch a request after queue timeout

2013-08-31 Thread Willy Tarreau
On Sat, Aug 31, 2013 at 02:25:47PM +0530, Sachin Shetty wrote: Yes, no-queue is what I am looking for. If consistent hashing is easier to accommodate this change, I wouldn't say it's easier, better that it's less complicated :-/ I won't mind switching to consistent hashing when the fix is

RE: How to redispatch a request after queue timeout

2013-08-30 Thread Lukas Tribus
Hi Sachin, We want to maintain stickiness to a backed server based on host header  so balance hdr(host) works pretty well for us, however as soon at the backend hits max connection, requests pile up in the queue eventually timeout with a 503 and –sQ in the logs. I don't think balance

Re: How to redispatch a request after queue timeout

2013-08-30 Thread Sachin Shetty
Thanks Lukas. Yes, I was hoping to workaround by setting a smaller maxqueue limit and queue timeout. So what other options do we have, I need to: 1. Send all requests for a host (mytest.mydomain.com) to one backend as long as it can serve. 2. If the backend is swamped, it should go to any other