Hi Pradeep,

On Sat, Apr 26, 2014 at 12:26:17AM +0200, Pradeep Kiruvale wrote:
> Hi All,
> 
>  I am new to HAProxy. For one of my project I am planning to
> add some functionality to HAProxy.
> I dont know where to start.
> 
> I would like to know where in code base the calls are forwarded to
> backed servers

It's not easy to describe. Basically, when there's no more analyser
holding the request, the connection automatically starts. That's
initiated in process_session(), look for SI_ST_REQ etc... you'll
see these functions. They pass through backend.c to select a
server and apply the LB algorithm.

> I read about some queues,I dint get clear idea how they work? Is this
> queue one per backend server?

One per server and one per backend (=farm). There are some diagrams
in doc/internal/ that I recommend that you take a look at. One of them
is about queueing. Another one is about stream interface states, which
I use from time to time when I have not touched that area for a long
time. You should also take a look at the various .txt files there.

> When  I say retry in config file,will it retry on main haproxy queue or
> when it comes to server queue.

The retry applies to a connection error to a server. It will first retry
to the same server, but if only one retry is left and you have option
redispatch, it will retry on the backend instead and do its best to pick
a different server.

> And also please let me know,where can I find some kind of HAProxy
> architecture documents.

In doc/internal. That's what I'm using whenever I have a doubt about
something.

Hoping this helps a little bit,
Willy


Reply via email to