Re: Dynamic backend routing base on header

2016-01-18 Thread Jonathan Matthews
On 17 January 2016 at 17:54, Michel Blanc wrote: > Dear all, > > I am trying to get haproxy routing to a specific server if a header > (with the server nickname) is set. Can you adapt http://blog.haproxy.com/2015/01/26/web-application-name-to-backend-mapping-in-haproxy/ to

Dynamic backend routing base on header

2016-01-17 Thread Michel Blanc
Dear all, I am trying to get haproxy routing to a specific server if a header (with the server nickname) is set. My first guess was that the following config snipped would do it: backend ... acl force_backend req.hdr(X-Want-Backend) -m found use_server %[req.hdr(X-Want-Backend)] if