On Tue, Oct 23, 2012 at 02:27:54AM -0400, Ben Timby wrote:
> Willy,
> 
> On Tue, Oct 23, 2012 at 2:10 AM, Willy Tarreau <w...@1wt.eu> wrote:
> > Some of us have already been discussing about the possibility to adapt the
> > HTTP checks to report a header to modulate the server's weight (in fact it
> > was planned for 1.3.14 but skipped because of no use at this time). But we
> > can bring this back on the table.
> >
> > The agent would be very simple in my opinion, it would accept incoming
> > connections from the load balancer on a specific port, would check that
> > the server is available and will adjust a weight between 0 and 100%
> > depending on the number of available connection slots relative to a
> > configured max on the servers.
> >
> > So a server which supports 1000 concurrent connections and runs at 150
> > would have 850/1000 == 85% weight. Then haproxy will still be able to
> > use leastconn depending on that weight, to distribute the load across
> > all servers.
> >
> > Does that sound good to you ?
> 
> Yes, that sounds exactly like what I am looking for.
> 
> I suppose if/when this feature hits, I would configure an HTTP check
> for each FTP backend (in addition to the port 21 tcp check). The HTTP
> check would connect to a simple agent that emitted a header containing
> the server's desired weight. HAproxy would handle the rest.

Exactly.

> I could get started today by writing a simple poller that would sit on
> the load balancer, poll the FTP servers via HTTP and update weights
> using the HAProxy control socket. Eventually, HAProxy would handle the
> polling via the HTTP check and I could discard the interim poller.

Yes, very good idea indeed. And it will help you tune the weight reporting
algorithm BTW.

Willy


Reply via email to