RE: Using Dynamic Backends

From: Manoj Kumar <manoj.kumar#Xoriant.Com>
Date: Tue, 26 Oct 2010 09:59:31 +0530


Thanks for swift response

Thanks & Regards
Manoj Kumar | Xoriant Solutions Pvt. Ltd. Winchester, Hiranandani Business Park, Powai, Mumbai 400076, INDIA. Tel: +91 22 30511000 | Voip: + 1 408 834 4495 | http://www.xoriant.com

-----Original Message-----
From: Willy Tarreau [mailto:w#1wt.eu]
Sent: Tuesday, October 26, 2010 1:43 AM
To: Manoj Kumar
Cc: haproxy#formilux.org; sshetty#egnyte.com Subject: Re: Using Dynamic Backends

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/26 06:29

This archive was generated by hypermail 2.2.0 : 2010/10/26 06:45 CEST