Re: Official haproxy blog uses a stickiness table of size 1 (just 1, no suffix). Is this OK?

2016-01-08 Thread Mike MacCana
(re-adding list as I accidentally cut it off previously)

Thanks Baptiste, that's perfectly clear.

Is 'change the config and reload' the best way to do manual failover? Or is
there some kind of signal I can send haproxy to make it 'flip' between
backends?

On Fri, Jan 8, 2016 at 7:20 AM, Baptiste  wrote:

> Hi Mike,
>
>
> > Regarding my setup, I'd like to have a blue/green deployment type setup -
> > eg, only one environment active, with manual switching between them.
> >
> >  - If A is active, and A fails, do not do anything, even if B is up.
>
> well, this is not possible with the stick-table example.
>
> >  - If A is active, and B is made active, traffic keeps going to A.
>
> > The setup in the article seems to do what I want, but I understand
> > 'stickiness' is only for existing clients. Is there a way for *new*
> clients
> > to also only go to one particular server at a time?
>
> For both statements above, you simply need a default_backend option
> and change the value pointed by it in your frontend then reload
> HAProxy.
>
> Baptiste
>


Re: Official haproxy blog uses a stickiness table of size 1 (just 1, no suffix). Is this OK?

2016-01-05 Thread Baptiste
On Mon, Jan 4, 2016 at 12:57 PM, Mike MacCana  wrote:
> I'm investigating active/passive HAProxy setups and came across the
> following from the official HAProxy blog. At
> http://blog.haproxy.com/2014/01/17/emulating-activepassing-application-clustering-with-haproxy/
>
>   backend bk_app
>stick-table type ip size 1 nopurge peers LB
>
> The size of 1 seems odd - given that's saying create a stickiness table with
> a maximum size of a single entry, according to
> https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#stick-table
>
>   is the maximum number of entries that can fit in the table. This
> value directly impacts memory usage. Count approximately
> 50 bytes per entry, plus the size of a string if any. The size
> supports suffixes "k", "m", "g" for 2^10, 2^20 and 2^30 factors.
>
> - Is this a typo, and '1' should be '1k' or '1m' or some other larger number
> - Is this intentional, and there is a reason to have a table with only one
> entry? If so could you someone please explain why?
>
> Thanks muchly - and thanks for making HAProxy!
>
> Mike


Hi Mike,

What should be in active/passive in your case?
Is that HAProxy itself or the application being load-balanced???
In this article, we speak about the application being load-balanced.

Baptiste



Re: Official haproxy blog uses a stickiness table of size 1 (just 1, no suffix). Is this OK?

2016-01-04 Thread Igor Cicimov
On Mon, Jan 4, 2016 at 10:57 PM, Mike MacCana 
wrote:

> I'm investigating active/passive HAProxy setups and came across the
> following from the official HAProxy blog. At http://blog.haproxy
> .com/2014/01/17/emulating-activepassing-application-clustering-with-
> haproxy/
>
>   backend bk_app
>stick-table type ip size 1 nopurge peers LB
>
> The size of 1 seems odd - given that's saying create a stickiness table
> with a maximum size of a single entry, according to
> https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#stick-table
>
>   is the maximum number of entries that can fit in the table.
> This
> value directly impacts memory usage. Count approximately
> 50 bytes per entry, plus the size of a string if any. The size
> supports suffixes "k", "m", "g" for 2^10, 2^20 and 2^30
> factors.
>
> - Is this a typo, and '1' should be '1k' or '1m' or some other larger
> number
> - Is this intentional, and there is a reason to have a table with only one
> entry? If so could you someone please explain why?
>

The explanation is in the comments below in the same page:
http://blog.haproxy.com/2014/01/17/emulating-activepassing-application-clustering-with-haproxy/#comment-4631


>
> Thanks muchly - and thanks for making HAProxy!
>
> Mike
>


Official haproxy blog uses a stickiness table of size 1 (just 1, no suffix). Is this OK?

2016-01-04 Thread Mike MacCana
I'm investigating active/passive HAProxy setups and came across the
following from the official HAProxy blog. At http://blog.haproxy
.com/2014/01/17/emulating-activepassing-application-clustering-with-haproxy/

  backend bk_app
   stick-table type ip size 1 nopurge peers LB

The size of 1 seems odd - given that's saying create a stickiness table
with a maximum size of a single entry, according to
https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#stick-table

  is the maximum number of entries that can fit in the table. This
value directly impacts memory usage. Count approximately
50 bytes per entry, plus the size of a string if any. The size
supports suffixes "k", "m", "g" for 2^10, 2^20 and 2^30 factors.

- Is this a typo, and '1' should be '1k' or '1m' or some other larger number
- Is this intentional, and there is a reason to have a table with only one
entry? If so could you someone please explain why?

Thanks muchly - and thanks for making HAProxy!

Mike