Hi Roland,

On Fri, Sep 11, 2015 at 05:11:11PM +0300, Roland RoLaNd wrote:
> hello
> i have haproxy directing traffic to a number of backends.
> these backends can auto scale upon traffic; my goal is to change "maxcon" 
> depending on "total time" or "backend time"  that a request took to complete.
> for example:
> if totaltime < 1 second ; maxcon = 1000if totaltime < 2 second: maxconn = 
> 500etc...
> 
> the goal is to hold connections in queue till backend auto scaling is in 
> effect.
> 
> Can i do the above scenario within haproxy config or a cron that checks 
> haproxy socket/totaltime and act accordingly is a better idea?
> 
> do you have an alternative advice for me to accomplish that goal ?

I could be wrong, but I think you're trying to re-implement by hand the
dynamic rate limiting you can get using minconn,maxconn and fullconn. It
dynamically increases or decreases the effective per-server maxconn
depending on the total number of connections on all servers in the
backend so that queues decrease when connection count increases.

Willy


Reply via email to