Re: the best way for url-based balancing??

From: Willy Tarreau <w#1wt.eu>
Date: Fri, 23 Nov 2007 05:54:35 +0100


Hi Pablo,

On Thu, Nov 22, 2007 at 07:15:51PM +0100, Pablo Escobar wrote:
> Hi to the list
>
> I have been playing around with the haproxy configuration trying to find a way
> to balance the http traffic on my web cluster based on the url that clients
> are accesing.
>
> I have seen on the haproxy source package a config file
> named "url-switching.cfg" which seems to do what I want but it does it in
> a "strange" way assigning a cookie when the url matchs with a regexpression
> and then balancing using that cookie. Maybe it´s enough for most of haproxy
> users but I´m trying to do it in a easier way so that developers on my
> department could modify the haproxy config without too much knowledge about
> how haproxy works or reg expressions.

It was the only supported method in version 1.2 and earlier. Starting with 1.3, you split your configuration into frontends and backends, and you use acl-based rules in your frontends to select which backend will process the request. The doc is still quite sparse on that, but combined with the examples, you should manage to do what you want.

> So my question is....żżis there any other way to do url-based balancing with
> haproxy?? any clue about which directives I should look for in the
> documentation. I have been reading docs and haven´t found anything about
> url-based balancing (just the config url-switching.cfg that I mentioned
> before)

Download 1.3.13.1, and check examples/*sw* and doc/configuration.txt (a new file, far from being complete).

> many thanks in advance for any help.

Regards,
Willy Received on 2007/11/23 05:54

This archive was generated by hypermail 2.2.0 : 2007/11/23 06:45 CET