Hi I want o divert rest api calls from external applications to a particular node. We are using F5 load balancer. I wrote a irule for this. Can someone certify whether it is correct or not?
rule divertingtraffic{
when HTTP_REQUEST {
if { [HTTP::host] equals"jira.charter.com"} {
if { [HTTP::uri] contains "/rest"} {
{pool/Common/normal}
}
}
if { [HTTP::host] not equals"jira.charter.com"} {
if { [HTTP::uri] equals "/login.jsp"} {
{pool/Common/normal}
}
}
else{
{pool/common/external}
}
}
}
Note: Pool normal contains (JIRA node 1,2,3, 4)
Pool external contains (JIRA node 5)
reference : https://confluence.atlassian.com/enterprise/traffic-distribution-with-atlassian-data-center-895912660.html
Thanks for the response. I wrote a new irule it works great now.
Hi @Jonnada Kiran - do you mind sharing your rule? I'm trying to work out a scenario where any external rest calls go to the rest server. However, if the rest call is from one of the nodes (1 and 2), I need it to stay in that node so that the session auth doesn't break.
For example, I have 3 nodes. 1 and 2 are just web nodes and the third is a rest node. If a user hits jira.domain.tld, the request goes to node 1 or node 2. If a user hits jira.domain.tld/rest/api/2/, the request goes to the rest node.
Now, if a user is already in node 1 or node 2 and node 1 or node 2 needs to make a rest call, the call then goes out to the rest node and fails with a 401 "unauthorized" because the session is different between node1|2 and the restnode since I have sticky sessions. How can we ensure that rest api requests from node 1 and node 2 stay there instead of sending it out to the rest node to prevent sessions from breaking?
@Tito_Valentin- looks like your question has gone unanswered. Might try re-asking as a new submission. Unfortunately, I don't have an F5 I can play with so I won't be able to provide an answer. :-(
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.