Forum Discussion
Peter_Wohlers_7
Nimbostratus
Dec 28, 2006hash persistence based on source ip network
We have an application that requires persistence, but causes the client to initiate two near-simultaneous connections.
Initially I tried using a persistence profile:
profile persist source_slash24 {
defaults from source_addr
mask 255.255.255.0
}
The use of a /24 was necessary, because it seems that a significant number of our customers/readers are coming from proxies and will appear with slightly different source ip addresses.
However, the persistence records don't really get set properly because the second connection often gets initiated before the completion of the first connection.
So, I'm thinking about using an irule to set hash persistence, but instead of something simple like:
rule persnickety_application {
when HTTP_REQUEST {
pool temperamentalapplication_servers
set key [crc32 [IP::remote_addr]]
persist hash $key
}
}
which would work, were it not for the prevalence of proxies used in europe/aol, etc...
Is there a way to create a hash key for a source network, like a /24?
Any input greatly appreciated.
Thanks,
Peter
- Peter_Wohlers_7
Nimbostratus
I've come up with something that looks like it might work: - Deb_Allen_18Historic F5 AccountHi Peter -
scan [IP::remote_addr] "%u.%u.%u.%u" first second third fourth
- Peter_Wohlers_7
Nimbostratus
This worked beautifully!
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