Forum Discussion
Peter_Fellwock_
Nimbostratus
May 03, 2006primary-secondary in an iRule
So here is my issue to resolve, we have a site that manages sessions poorly, actually it just does not manage sessions, and we need a load balancing scheme of all to one machine until it dies then to ...
Deb_Allen_18
May 03, 2006Historic F5 Account
Priority works unless you really truly need traffic to go to only 1 pool member. With just priority, and with persistence of any kind enabled, when the higher prio nodes come back up after failing, you will see traffic distributed across multiple pool members until old connections/sessions die off.
Here's a really slick way to stick to one and only one server in a pool.
Apply to the VS a universal persistence profile using an iRule like this:
rule PriorityFailover {
when CLIENT_ACCEPTED { persist uie 1 }
}The first connection will create a single universal persistence record with a key of "1". All subsequent connections will look up persistence using "1" as the key, resulting in truly universal persistence for all connections. (Use 1 or any constant value. 0 will have the same affect as using 1. One of my customers uses "persist uie [TCP::local_port]"
When one node fails, the other is persisted to by all comers. When the 2nd node fails, the 1st again becomes the preferred node for all, ad infinitum.
Doesn't offer the capability of manual resume after failure, or true designation of a "primary" and "secondary" instance (sometimes required for db applications), but it sure does solve the problem of "only use one node at a time, I don't care which one, please" (You can use priority to gravitate towards the top of a list...)
HTH
/deb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects