Re: Using Dynamic Backends

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 25 Oct 2010 22:13:28 +0200


Hi,

On Mon, Oct 25, 2010 at 04:20:29PM +0530, Manoj Kumar wrote:
> Hi ,
>
>
>
> We want to use haproxy to front storage nodes in a mogile cluster. The
> problem with this approach is the dynamic location of a file on any
> nodes in a cluster. For example a given file test.txt is available on
> the following two locations
>
>
>
> http://brick1:7500/dev1/0/00/000/test.txt
>
> http://brick3:7500/dev2/0/00/000/test.txt
>
>
>
> There are several other storage nodes (brick1...brickN) in the cluster
> and given file could be located in any two nodes as above. We want
> haproxy to receive all the requests to the storage nodes, and try each
> of the URL (provided in url parameter/header)
>
>
>
>
>
> For example, the URL to haproxy would be:
>
> http://haproxy:8000/?path=http://brick1:7500/dev1/0/00/000/test.txt&alt_
> path=http://brick3:7500/dev2/0/00/000/test.txt
>
>
>
> In which case, haproxy will first try to route to
> http://brick1:7500/dev1/0/00/000/test.txt, if that is down, it shoud
> route to http://brick3:7500/dev2/0/00/000/test.txt.
>
>
>
> Looks like we need a kind of dynamic backed whose servers we would
> define at run time based on the parameters in the request? Is this
> possible? This is doable in PERLBAL which is the deffacto tool with
> mogilefs, but we are more comfortable with haproxy and would like to use
> haproxy instead, but somehow not able to figure this out
>
>
>
> I am looking forward to here you soon.

This is not possible with haproxy and there are no such plans. Haproxy only forwards requests/responses, etc..., it does not invent them, so it will not build a request from scratch just based on a URL parameter.

I was about to suggest you to check perlbal, but I'm seeing that you already know it. Simply use the tool that best fits your needs. There is no much point in considering that you want tool X but you'd like it to do something tool Y does. Then use X for what it does and Y for what it does. Those are just different but complementary tools.

Regards,
Willy Received on 2010/10/25 22:13

This archive was generated by hypermail 2.2.0 : 2010/10/25 22:30 CEST