Forum Discussion
Nathan_McMahon_
May 05, 2005Historic F5 Account
Direct requests based on hashed cookie data
I have a requirement to pull a numerical value from a cookie and direct the request to one of 12 pools based on the hashed value of that cookie data. For example, a client's cookie contains 62. Divi...
rapmaster_c_127
May 05, 2005Historic F5 Account
What does your cookie data look like? Any particular reason you're using floor and divides instead of modular division? (The % operator.)
We don't allow floating-point in iRules, since tmm is essentially the kernel. However, you should be able to use a simple modular division to accomplish what you need. If the contents of the cookie isn't evenly entropic enough, you could always CRC32/MD5/SHA1 it and then perform your modular division on the hashed/digested value.
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
