On Mon, Jan 26, 2009 at 09:28:48PM -0800, Joe Williams wrote:
>
> I am attempting to load balance based off of the type of request (POST,
> PUT, DELETE, GET, etc). Sending GETs to all backend servers and POST,
> DELETE and PUT to only one. From the documentation it looks like this
> might be possible with an ACL or maybe some regex. I tried a couple
> configurations but didn't get anywhere. Is this possible? If so, can
> someone point me in the right direction or give an example?
yes it is possible. You could find examples in configuration.txt
and in the examples directory. Basically, it would work like this :
frontend XXX
bind :80
...
acl reserved_method POST DELETE PUT
use_backend reserved_backend if reserved_method
default_backend normal_backend
backend normal_backend
...
server srv1
server srv2
backend reserved_backend
...
server srv1
server srv2
And so on. You get the idea.
Regards,
Willy