> On 27 февр. 2015 г., at 2:56, Baptiste <bed...@gmail.com> wrote: > > On Thu, Feb 26, 2015 at 3:58 PM, Dmitry Sivachenko <trtrmi...@gmail.com> > wrote: >> Hello! >> >> Given the following configuration >> >> backend BC >> option allbackups >> server s1 maxconn 30 check >> server s2 maxconn 30 check >> server s3 maxconn 30 check >> server b1 maxconn 30 check backup >> server b2 maxconn 30 check backup >> >> imagine that s1, s2 and s3 have 30 active sessions and (tcp) checks succeed. > > > Hi Dmitry. > > Let me answer inline: > >> 1) subsequent requests will be balanced between b1 and b2 because s1, s2 and >> s3 reached it's maxconn > > nope, they'll be queued on the backend until one of the server has a free slot > b1 and b2 will be used when ALL s1, s2 and s3 will be operationnaly DOWN.
Okay, then how can I achieve the described setup? I want to balance requests between s1, s2, s3 until they have less than N active sessions and route extra requests to b1 and b2. > >> 2) nbsrv(BC) will be still equal to 3 because checks for s1, s2 and s3 still >> succeed > > nope, nbsrv is 5, since b1 and b2 should be counted as well. > In fact backup server does NOT count in nbsrv(), I am not sure if it is a bug or a feature.