Persistence profile - How will I use source address affinity based load balancing?
Hi Experts
How will I use source address affinity based persistence profile across different pools having different IP but same port? For example there are two virtual server 1.1.1.1:80 and 2.2.2.2:80.
1.1.1.1:80 has pool members 192.168.1.1:80 and 192.168.1.2:80
2.2.2.2:80 has pool members 172.16.1.1:80 and 172.16.1.2:80
Load balance algorithm is Round Robin.
Will source based persistence work in this case, such that all sessions from same source IP, say x.x.x.x goes to 192.168.1.1:80 and 172.16.1.1:80. Any other session from y.y.y.y should go to the other pool members.
Regards,
Sumanta.
Don't worry, it's a common scenario for me.
Just pay attention that the upstream proxy insert the "X-Forwarded-For" header, or maybe another one "True-Client-IP" or even "X-Client-IP".
If you are just nating using a firewall, I think that the header is not inserted.
I add this peace of code in the example :
set clientip [IP::client_addr]
because you may have situation where there is no "X-Forwarded-For" in the request, so that we can persist also in this scenario.