Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We currently have a HAProxy set up that splits the load over two backend servers and it reads/sets a cookie accordingly so you stay on the same server throughout the process.

However, we now have a problem.. we have added more domains to the server and as the cookie is set per domain all of the other domains are ignoring it and are picking a random server on each request.

We have tried doing

cookie        PROXYSERVERID insert indirect nocache domain .domain1.com domain .domain2.com 

But this just causes it to set the cookie on the second domain and ignores the first.

Regards.

Dave.

share|improve this question
add comment

1 Answer

Can you use the ACL to set cookies based on the Host header? For example, setup a backend per domain, and pass in the correct cookie in each backend.

http://www.techrawr.com/2009/09/18/using-the-acl-in-haproxy-for-load-balancing-named-virtual-hosts/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.