Forum Discussion
Pool round Robin not working with standard virtual server
- Apr 11, 2024
The reason you're having this issue is most likely because of the following entry in your iRule.
catch { persist uie [HTTP::header "X-Forwarded-For"] 1800 }
That entry will always apply UIE persistence based on the HTTP header "X-Forwarded-For" so you then get bound to the same pool member all the time.
Here is CLI output for the virtual server
From NonProd LTM:
ltm virtual website_https_vs {
creation-time 2021-02-19:02:17:10
destination 10.0.0.10:https
ip-protocol tcp
last-modified-time 2021-10-05:14:48:44
mask 255.255.255.255
pool website_https_pool
profiles {
website_SSL {
context clientside
}
http { }
serverssl {
context serverside
}
tcp { }
}
rules {
DEFAULT-IR
}
serverssl-use-sni disabled
source 0.0.0.0/0
source-address-translation {
type automap
}
translate-address enabled
translate-port enabled
vs-index 64
}
Here is the iRule DEFAULT-IR
when HTTP_REQUEST {
if {not([HTTP::header exists "X-Forwarded-For"])} {
HTTP::header insert X-Forwarded-For [IP::remote_addr]
}
catch { persist uie [HTTP::header "X-Forwarded-For"] 1800 }
}
No policies are applied
Standard HTTPS pool with two ephemeral nodes from FQDN lookup. Load balancing method is Round Robin and Priority Group Activation is Disabled
The reason you're having this issue is most likely because of the following entry in your iRule.
catch { persist uie [HTTP::header "X-Forwarded-For"] 1800 }
That entry will always apply UIE persistence based on the HTTP header "X-Forwarded-For" so you then get bound to the same pool member all the time.
- redadmin1972Apr 11, 2024Altocumulus
I believe this iRule was identified from a previous community solution when we needed to have the X-Forwarded-For value in the packet header. I never realized the impact of this line in the iRule.
I removed the line and tested with this iRule:
when HTTP_REQUEST {
if {not([HTTP::header exists "X-Forwarded-For"])} {
HTTP::header insert X-Forwarded-For [IP::remote_addr]
}
}Now my site is load balancing with round robin properly.
Thank you very much!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com