we have scenario to implement Traffic distribution with Confluence Data Center.
we are using haproxy is a load balance, want to Split REST API & Web traffic for Confluence DC .
I have 4 nodes and I want to route REST API queries to node number 3. I tried to implemet It , but it's not working.
Example:
If referrer == app.yourdomain.com and the request ~ /rest:
Direct traffic to Node 1 or Node 2 or Node 3 //normal traffic
If referrer != app.yourdomain.com and the request ~ /rest:
If the page requested == /login.jsp:
Direct traffic to Node 1 or Node 2 or Node 3 //normal traffic
Else:
Direct to Node 4 //external REST API traffic
for the above example i am unable to implement this in our haproxy.cfg file. what is referrer... and other things.
Please share any details, instructions, or examples for how you'd implement this.
Hello there! This request is quite different, first time I have seen it.
You should be able to redirect your traffic by using rules in your haproxy. Much like what is described here in this Stackoverflow - Serverfault post:
How can I make haproxy route requests based on URL substrings?
Also, this should also work if you send the request directly to the node's IP with the curl, for example. However, if your balancer is set to work on any request to any of your node's IPs this approach may not work.
Jagadeesh, let us know your results! Looking forward to your reply.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.