Re: Using socket commands to add a new server to a backend

2016-05-18 Thread Conrad Hoffmann
On 05/18/2016 12:35 AM, Tugberk Ugurlu wrote:
> Thanks!
> What do you think about this approach: 
> http://engineeringblog.yelp.com/2015/04/true-zero-downtime-haproxy-reloads.html
> Seems a bit complicated to get it right but wonder if it's worth investing 
> into.

That really depends on your needs. As the article mentions, haproxy only
looses 0.25% of requests while being restarted *10 times a second*. For
their third test (1M reqquests) they mention that haproxy reloaded over
1500 times during the test. As the first test had "only" 20 requests,
assuming 300 restarts during that test is a fair estimate. So while
hammering haproxy with requests (that's what a benchmark does), it looses
1/300th of 0.25% of requests during a single restart, or 0.0008%. By rough
estimates from the details given in the article, this amounts to 1.6
dropped requests - if you have 67.000 req/s!

I'll leave it up to you how much effort you think is worth putting into
reducing that number.

To give you some ideas, other options are having haproxy running on
multiple hosts and load balancing between these hosts, e.g with DNS. For
restarts, shift traffic to one instance, restart the other, then vice
versa. Such a setup will save you from much more than packet loss during
restarts, e.g. hardware failure, bad deploys, etc.

Just my two cents.

Cheers,
Conrad


> Tugberk
>> Subject: Re: Using socket commands to add a new server to a backend
>> To: tugb...@outlook.com; haproxy@formilux.org
>> From: con...@soundcloud.com
>> Date: Tue, 17 May 2016 13:40:55 +0200
>>
>> On 05/17/2016 12:53 PM, Tugberk Ugurlu wrote:
>>> Thanks for getting back!
>>> Is there a place that I can influence this change or do you think that this 
>>> is something not possible cuz of some internal architectural concerns or 
>>> similar? I am trying to mimic the AWS ELB's register and deregister 
>>> features.
>>> BTW, is HAProxy open source? If so, is it on GitHub or somewhere else?
>>
>> It most certainly is. You can find links to git repositories and other
>> resources at http://www.haproxy.org/
>>
>> Note that the main repos are _not_ on Github, but if you prefer Github
>> there is an _inofficial_ clone on Github: https://github.com/haproxy/haproxy
>>
>> For discussions and feature requests this mailing list is the right place.
>> As for this specific feature, it has been requested several times before
>> and is, as far as I understand, being worked on, but not with high priority.
>>
>>> Thanks for getting back again, I do appreciate it!
>>
>> You're welcome :)
>>
>> Conrad
>>
>>
>>> Tugberk
>>>
 Subject: Re: Using socket commands to add a new server to a backend
 To: tugb...@outlook.com; haproxy@formilux.org
 From: con...@soundcloud.com
 Date: Tue, 17 May 2016 12:30:47 +0200

 Hi Tugberk,

 On 05/16/2016 05:25 PM, Tugberk Ugurlu wrote:
> Hi,
> Is it possible to register a new server under a backend? This is similar 
> to what is being asked here: 
> http://haproxy.formilux.narkive.com/1OibZABp/using-haproxy-socket-to-add-new-servers
> I cannot see the command available under the documented list of commands: 
> http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9.2

 The response from the thread you linked to still holds true.

> I am not sure what is the best way to handle rolling out new servers and 
> taking down the old ones without any downtime through an automated way.

 The reload in haproxy is designed to be very-close-to-zero downtime, so
 depending on your use case it might just be good enough. If you do opt for
 the solution mentioned in the above thread, do keep in mind that your
 config on disk an the state in haproxy might diverge, so your deployments
 will have take that into consideration.

 Cheers,
 Conrad
 -- 
 Conrad Hoffmann
 Traffic Engineer

 SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany

 Managing Director: Alexander Ljung | Incorporated in England & Wales
 with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
 HRB 110657B
>>>   
>>>
>>
>> -- 
>> Conrad Hoffmann
>> Traffic Engineer
>>
>> SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany
>>
>> Managing Director: Alexander Ljung | Incorporated in England & Wales
>> with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
>> HRB 110657B
> 
> 

-- 
Conrad Hoffmann
Traffic Engineer

SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany

Managing Director: Alexander Ljung | Incorporated in England & Wales
with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
HRB 110657B



RE: Using socket commands to add a new server to a backend

2016-05-17 Thread Tugberk Ugurlu
Thanks!
What do you think about this approach: 
http://engineeringblog.yelp.com/2015/04/true-zero-downtime-haproxy-reloads.html
Seems a bit complicated to get it right but wonder if it's worth investing into.
Tugberk
> Subject: Re: Using socket commands to add a new server to a backend
> To: tugb...@outlook.com; haproxy@formilux.org
> From: con...@soundcloud.com
> Date: Tue, 17 May 2016 13:40:55 +0200
> 
> On 05/17/2016 12:53 PM, Tugberk Ugurlu wrote:
> > Thanks for getting back!
> > Is there a place that I can influence this change or do you think that this 
> > is something not possible cuz of some internal architectural concerns or 
> > similar? I am trying to mimic the AWS ELB's register and deregister 
> > features.
> > BTW, is HAProxy open source? If so, is it on GitHub or somewhere else?
> 
> It most certainly is. You can find links to git repositories and other
> resources at http://www.haproxy.org/
> 
> Note that the main repos are _not_ on Github, but if you prefer Github
> there is an _inofficial_ clone on Github: https://github.com/haproxy/haproxy
> 
> For discussions and feature requests this mailing list is the right place.
> As for this specific feature, it has been requested several times before
> and is, as far as I understand, being worked on, but not with high priority.
> 
> > Thanks for getting back again, I do appreciate it!
> 
> You're welcome :)
> 
> Conrad
> 
> 
> > Tugberk
> > 
> >> Subject: Re: Using socket commands to add a new server to a backend
> >> To: tugb...@outlook.com; haproxy@formilux.org
> >> From: con...@soundcloud.com
> >> Date: Tue, 17 May 2016 12:30:47 +0200
> >>
> >> Hi Tugberk,
> >>
> >> On 05/16/2016 05:25 PM, Tugberk Ugurlu wrote:
> >>> Hi,
> >>> Is it possible to register a new server under a backend? This is similar 
> >>> to what is being asked here: 
> >>> http://haproxy.formilux.narkive.com/1OibZABp/using-haproxy-socket-to-add-new-servers
> >>> I cannot see the command available under the documented list of commands: 
> >>> http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9.2
> >>
> >> The response from the thread you linked to still holds true.
> >>
> >>> I am not sure what is the best way to handle rolling out new servers and 
> >>> taking down the old ones without any downtime through an automated way.
> >>
> >> The reload in haproxy is designed to be very-close-to-zero downtime, so
> >> depending on your use case it might just be good enough. If you do opt for
> >> the solution mentioned in the above thread, do keep in mind that your
> >> config on disk an the state in haproxy might diverge, so your deployments
> >> will have take that into consideration.
> >>
> >> Cheers,
> >> Conrad
> >> -- 
> >> Conrad Hoffmann
> >> Traffic Engineer
> >>
> >> SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany
> >>
> >> Managing Director: Alexander Ljung | Incorporated in England & Wales
> >> with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
> >> HRB 110657B
> >   
> > 
> 
> -- 
> Conrad Hoffmann
> Traffic Engineer
> 
> SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany
> 
> Managing Director: Alexander Ljung | Incorporated in England & Wales
> with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
> HRB 110657B
  

Re: Using socket commands to add a new server to a backend

2016-05-17 Thread Conrad Hoffmann
On 05/17/2016 12:53 PM, Tugberk Ugurlu wrote:
> Thanks for getting back!
> Is there a place that I can influence this change or do you think that this 
> is something not possible cuz of some internal architectural concerns or 
> similar? I am trying to mimic the AWS ELB's register and deregister features.
> BTW, is HAProxy open source? If so, is it on GitHub or somewhere else?

It most certainly is. You can find links to git repositories and other
resources at http://www.haproxy.org/

Note that the main repos are _not_ on Github, but if you prefer Github
there is an _inofficial_ clone on Github: https://github.com/haproxy/haproxy

For discussions and feature requests this mailing list is the right place.
As for this specific feature, it has been requested several times before
and is, as far as I understand, being worked on, but not with high priority.

> Thanks for getting back again, I do appreciate it!

You're welcome :)

Conrad


> Tugberk
> 
>> Subject: Re: Using socket commands to add a new server to a backend
>> To: tugb...@outlook.com; haproxy@formilux.org
>> From: con...@soundcloud.com
>> Date: Tue, 17 May 2016 12:30:47 +0200
>>
>> Hi Tugberk,
>>
>> On 05/16/2016 05:25 PM, Tugberk Ugurlu wrote:
>>> Hi,
>>> Is it possible to register a new server under a backend? This is similar to 
>>> what is being asked here: 
>>> http://haproxy.formilux.narkive.com/1OibZABp/using-haproxy-socket-to-add-new-servers
>>> I cannot see the command available under the documented list of commands: 
>>> http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9.2
>>
>> The response from the thread you linked to still holds true.
>>
>>> I am not sure what is the best way to handle rolling out new servers and 
>>> taking down the old ones without any downtime through an automated way.
>>
>> The reload in haproxy is designed to be very-close-to-zero downtime, so
>> depending on your use case it might just be good enough. If you do opt for
>> the solution mentioned in the above thread, do keep in mind that your
>> config on disk an the state in haproxy might diverge, so your deployments
>> will have take that into consideration.
>>
>> Cheers,
>> Conrad
>> -- 
>> Conrad Hoffmann
>> Traffic Engineer
>>
>> SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany
>>
>> Managing Director: Alexander Ljung | Incorporated in England & Wales
>> with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
>> HRB 110657B
> 
> 

-- 
Conrad Hoffmann
Traffic Engineer

SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany

Managing Director: Alexander Ljung | Incorporated in England & Wales
with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
HRB 110657B



RE: Using socket commands to add a new server to a backend

2016-05-17 Thread Tugberk Ugurlu
Thanks for getting back!
Is there a place that I can influence this change or do you think that this is 
something not possible cuz of some internal architectural concerns or similar? 
I am trying to mimic the AWS ELB's register and deregister features.
BTW, is HAProxy open source? If so, is it on GitHub or somewhere else?
Thanks for getting back again, I do appreciate it!
Tugberk

> Subject: Re: Using socket commands to add a new server to a backend
> To: tugb...@outlook.com; haproxy@formilux.org
> From: con...@soundcloud.com
> Date: Tue, 17 May 2016 12:30:47 +0200
> 
> Hi Tugberk,
> 
> On 05/16/2016 05:25 PM, Tugberk Ugurlu wrote:
> > Hi,
> > Is it possible to register a new server under a backend? This is similar to 
> > what is being asked here: 
> > http://haproxy.formilux.narkive.com/1OibZABp/using-haproxy-socket-to-add-new-servers
> > I cannot see the command available under the documented list of commands: 
> > http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9.2
> 
> The response from the thread you linked to still holds true.
> 
> > I am not sure what is the best way to handle rolling out new servers and 
> > taking down the old ones without any downtime through an automated way.
> 
> The reload in haproxy is designed to be very-close-to-zero downtime, so
> depending on your use case it might just be good enough. If you do opt for
> the solution mentioned in the above thread, do keep in mind that your
> config on disk an the state in haproxy might diverge, so your deployments
> will have take that into consideration.
> 
> Cheers,
> Conrad
> -- 
> Conrad Hoffmann
> Traffic Engineer
> 
> SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany
> 
> Managing Director: Alexander Ljung | Incorporated in England & Wales
> with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
> HRB 110657B
  

Re: Using socket commands to add a new server to a backend

2016-05-17 Thread Conrad Hoffmann
Hi Tugberk,

On 05/16/2016 05:25 PM, Tugberk Ugurlu wrote:
> Hi,
> Is it possible to register a new server under a backend? This is similar to 
> what is being asked here: 
> http://haproxy.formilux.narkive.com/1OibZABp/using-haproxy-socket-to-add-new-servers
> I cannot see the command available under the documented list of commands: 
> http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9.2

The response from the thread you linked to still holds true.

> I am not sure what is the best way to handle rolling out new servers and 
> taking down the old ones without any downtime through an automated way.

The reload in haproxy is designed to be very-close-to-zero downtime, so
depending on your use case it might just be good enough. If you do opt for
the solution mentioned in the above thread, do keep in mind that your
config on disk an the state in haproxy might diverge, so your deployments
will have take that into consideration.

Cheers,
Conrad
-- 
Conrad Hoffmann
Traffic Engineer

SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany

Managing Director: Alexander Ljung | Incorporated in England & Wales
with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
HRB 110657B



Using socket commands to add a new server to a backend

2016-05-16 Thread Tugberk Ugurlu
Hi,
Is it possible to register a new server under a backend? This is similar to 
what is being asked here: 
http://haproxy.formilux.narkive.com/1OibZABp/using-haproxy-socket-to-add-new-servers
I cannot see the command available under the documented list of commands: 
http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#9.2
I am not sure what is the best way to handle rolling out new servers and taking 
down the old ones without any downtime through an automated way.
Thanks,
Tugberk