RE: Dispatch based on request URL

From: John Marrett <JMarrett#mediagrif.com>
Date: Wed, 5 Dec 2007 12:50:43 -0500


This is very possible using haproxy 1.3.??? (I'm on latest).

Here is the config I have come up with, while working to test this functionality.

==

defaults

   balance roundrobin
   cookie SERVERID insert indirect
   option httpchk HEAD /index.html HTTP/1.0

frontend generic *:80
  mode http
  #Traffic matching ACLs
  acl host_test1 hdr(host) -i www.testone.com   acl host_test2 hdr(host) -i www.testtwo.com   use_backend backend_one if host_test1
  use_backend backend_two if host_test2   

backend backend_one
  mode http
   server web5 192.168.1.20:80 cookie A check inter 5000    server web6 192.168.1.21:80 cookie B check inter 5000

backend backend_two
  mode http
   server web7 192.168.1.22:80 cookie A check inter 5000    server web8 192.168.1.23:80 cookie B check inter 5000

==

Anyone who can offer improvements, please, please, do,

-JohnF

-----Original Message-----
From: caraldi#gmail.com [mailto:caraldi#gmail.com] On Behalf Of Jean-Baptiste Quenot
Sent: December 5, 2007 11:29 AM
To: haproxy#formilux.org
Subject: Dispatch based on request URL

Hi there,

I read on your website that unlike Pound, HaProxy does not allow dispatching based on the request URL. However by looking at the ACL feature in HaProxy, I wonder how hard it is to implement this?

Keep up the good work,

-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/blog/
Received on 2007/12/05 18:50

This archive was generated by hypermail 2.2.0 : 2007/12/05 19:00 CET