Forum Discussion
Wade_Miller_113
Nimbostratus
Nov 12, 2007Help with a difficult irule.
This is not http, but rather a proprietary protocol. Here is the scenario.
The first packet of the request comes in with a string identifying the desired slot.
On connect, check a table (probably data group) and if the string is not matched, select arbitrary pool member and persist.
If the string is matched, select specific pool member and persist.
That is easy enough, but they want more.
If the string is unmatched, it must write to the lookup table with the string AND the pool member selected.
The table would need to be flushed every day when the servers are bounced by cron.
6 Replies
- hoolio
Cirrostratus
I assume the protocol runs over TCP? You can do most of that with iRule functionaliy: - JRahm
Admin
You could set the expiration time on your session entry by calculating the time remaining from current time to the cron cycle time using the clock commands. - Wade_Miller_113
Nimbostratus
Yes, it is tcp. - Wade_Miller_113
Nimbostratus
For the daily session flush, is I stop the servers for say 5 minutes before restarting them would the sessions all terminate or do I need to clean out the sessions manually? - JRahm
Admin
It depends on the version. My understanding is that an outage on a server is supposed to trigger the bigip to perform cleanup on the session (and persistence) table for that server, but I have seen that NOT to be the case on a few 9.1.x & 9.2.x versions. I would definitely test this if you are going to rely on that behavior. - Wade_Miller_113
Nimbostratus
So far it is working quite well. I need to add handling for error conditions and other refinements. I learned a lot about i-rules with this one.
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