> On 27 февр. 2015 г., at 11:52, Baptiste <bed...@gmail.com> wrote:
> 
> On Fri, Feb 27, 2015 at 9:02 AM, Dmitry Sivachenko <trtrmi...@gmail.com> 
> wrote:
>> 
>>> 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.
>> 
> 
> Two solutions:
> 
> - use "balance first" load-balancing algorithm and remove the backup keyword
> - create 2 backends, one with 3 servers, one with two, use the 'queue'
> fetch to get the number of queued request on backend1 and route to
> backend 2 if the number is greater than 0.
> 


BTW what if I have "maxqueue 1" in default-server?
If queue is full for all servers will that backend use backup servers?

Reply via email to