Forum Discussion
arun_parthas_10
Nimbostratus
Jan 27, 2011Help writing iRule based on user login id.
Guys
We have a unique requirement where I need your help in coming up with a solution that is least painful to manage :
1. One VIP
2. 4000 pools ( anticipated )
3. 4000 user id's ( anticipated )
We have a requirement to setup ONE VIP on a TCP Port ( this is not a HTTP based traffic ) and come up with a solution to send an user to a specific pool behind the VIP. We are anticipating 4000 users to send it to a appropriate pool ( one of the 4000 pools ) behind the VIP.
The logic is really simple but writing such a tedious iRule for 4000 users is going to be an administrative nightmare to maintain. Is there any recommendation, I would greatly appreciate.
Sincerely
Arun P
- hoolio
Cirrostratus
Hi Arun, - arun_parthas_10
Nimbostratus
Thanks, Aaron, This will use TCP and we intend to look at the ID using TCP::collect as you mentioned. - hoolio
Cirrostratus
Hi Arun, - Colin_Walker_12Historic F5 AccountEven past 10k entries classes perform quite well for relatively small strings. Joe tested this recently and I was shocked at how little the load scaled when searching a class of 10k entries vs a class of 1k entries.
- arun_parthas_10
Nimbostratus
Hi Aaron / Collin, - hoolio
Cirrostratus
Here is an untested example:when CLIENT_ACCEPTED { log local0.debug "Collecting the payload" TCP::collect } when CLIENT_DATA { Do some parsing of [TCP::payload] here to get the user ID In this example, we look for userid=, skip past that and read up to the next & or end of string set user [findstr [TCP::payload] userid= 7 &] log local0. "Parsed User ID: $user" If a user wasn't parsed, or there is an error assigning a pool using the format my__pool, select a default pool. If there is a $user parsed and no error assigning it with the catch statement, that pool will be assigned by using catch. if {$user eq "" or [catch {pool my_${user}_pool}]}{ log local0. "\$user is null or my_\$user_pool doesn't exist. Using a default pool." pool my_default_pool } }
- arun_parthas_10
Nimbostratus
Aaron
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