On 3 June 2013 22:36, Ali Majdzadeh <ali.majdza...@gmail.com> wrote:
>
> Hello All,
> I am totally new to HAProxy. What I am looking for is a solution for HTTP 
> load balancing and according to what I have read about HAProxy, I think this 
> is the right choice.

Hi Ali. I've found HAProxy to be a really good HTTP load-balancer.
Here's my unofficial take on your questions.

> Concerning HTTP, HAProxy is session-aware. Does this mean that all the 
> requests initiated from a specific client goes only to a specific back-end 
> server?

This can be configured, yes.

> What happens if suddenly the back-end server fails?

Your backend should expose a health check URI that can be requested by
HAProxy frequently (very frequently, if possible). If it stops
returning a 200, then that backend will stop receiving new requests.
The details of this are all configurable - timeouts, number of failed
health checks required to fail a backend, etc.

> For example, suppose that a user is downloading a file from a back-end web 
> server and the same file exists on another back-end web server. The load on 
> these two servers is balanced by HAProxy. Now, what happens if the first web 
> server dies whilst the file is being downloaded?

The client will receive an incomplete download. This is unavoidable -
any solution mitigating this would have to be highly coupled to the
backend service being provided, as a generic solution would almost
certainly not be HTTP RFC compliant.

> Does the download continues from the second server from where it was 
> interrupted?

No. Another request will need to be made, through HAProxy (and not
/by/ HAProxy) to the backend.

> I am not sure whether I have got the correct understanding of 
> session-awareness feature in HAProxy. I do appreciate your comments.

I don't think that HAProxy's sessions are related to the kind of
in-request failure you seem to be concerned about. But I haven't run
the current 1.5 development version, so I may be out of touch with
what it does in this area.

Regards,
Jonathan
--
Jonathan Matthews // Oxford, London, UK
http://www.jpluscplusm.com/contact.html

Reply via email to