On Thu, Jul 03, 2008 at 03:31:40PM +0800, Delta Yeh wrote:
> I didn't see the use_server directive in the configuration.txt .
> Is that directive doesn't documented?
Because as I indicated at the end of previous mail, it's not implemented yet :-)
> 2008/7/3 Willy Tarreau <w#1wt.eu>:
> > On Wed, Jul 02, 2008 at 03:33:19PM -0700, Michael Nguyen wrote:
> > > So I'm just wondering if I can pick your brains regarding how to do this:
> > >
> > > 1) We use haproxy (of course!)
> > > 2) We stick to particular web servers based on the source IP address
> > >
> > > However, sometimes we want to be able to jump on a particular web server
> > > and to test out behavior. With our old load balancer, we were able to
> > > do as follows:
> > >
> > > http://www.twentyten.org/web01
> > >
> > > This would have the load balancer stick us onto web01 and then at that
> > > point any http://www.twentyten.org/xxx URLs would stick to that web
> > > server. What is the best way to do this in haproxy?
> > Generally, people rely on a cookie and set a cookie on their browser
> > (potentially through an admin page on the application itself) and from
> > this cookie, haproxy selects the appropriate server. Example :
> > cookie SRV
> > server srv1 220.127.116.11:80 cookie 1
> > server srv2 18.104.22.168:80 cookie 2
> > server srv3 22.214.171.124:80 cookie 3
> > In your request, you must set "Cookie: SRV=1".
> > Also, a few days ago, I realized that we are missing one "use_server"
> > statement which would be the backend equivalent of the "use_backend"
> > statement in frontends. That way you would be able to use "/web01" and
> > indicate in the backend that it has to go to server 1 :
> > acl web01 url_path /web01
> > acl web02 url_path /web02
> > acl web03 url_path /web03
> > use_server srv1 if web01
> > use_server srv2 if web02
> > use_server srv3 if web03
> > server srv1 126.96.36.199:80
> > server srv2 188.8.131.52:80
> > server srv3 184.108.40.206:80
> > At least it's motivating to see that there are potential users of features
> > which don't exist yet :-)
> > Regards,
> > Willy
Received on 2008/07/03 18:12
This archive was generated by hypermail 2.2.0 : 2008/07/03 18:15 CEST