Forum Discussion
Mark_Melin_6298
Nimbostratus
May 13, 2008Complex Session Matching...
Im trying to design some large site infrastructure where i have two clusters
cluster1 is public and serves hundreds of thousands of persistent tcp connections for registration
cluster2 is private and brokers instructions from another pool of servers into first pool
goal is on connect to cluster2, query the session table for the cluster1 pool member
and subsquently send the request for cluster2 to the same pool member for the session
queried in cluster1
- dennypayne
Employee
The "Match Across Virtuals" checkbox in the persistence profile will do what you are asking when the connections come to cluster1 and cluster2 from same client, but I'm not sure that's what you have in mind. - Mark_Melin_6298
Nimbostratus
that's half of what i need... i need to match client2->virtual2 to same pool member as client1->virtual1 based on a known persistence string... like a predefined string in an xml or cookie for example - Mark_Melin_6298
Nimbostratus
i've queried my F5 sales engineering folks on this thread, as a followup, assuming we can 'match the session' as described above... now we want to solve for what to match on... the question is: - hoolio
Cirrostratus
You can collect the TCP data and parse out any strings you might need to. From an iRule perspective, it would be easier to use HTTP to send the data and be able to use HTTP::cookie to parse the cookie info. - Mark_Melin_6298
Nimbostratus
I solved this for the most part, and have successfully loaded this with 400K connected clients and over 1000 concurrent messages delivered to those clients.... as follows:when CLIENT_ACCEPTED { TCP::collect 2 } when CLIENT_DATA { set msg [findstr [TCP::payload] "" 0 "\r\n"] set sid [findstr $msg "" 9 "\r\n"] set S "" foreach N [active_members -list myClientPool] { set I [lindex $N 0] binary scan [md5 $I$sid] c1 NMD5 if { $NMD5 > $S } { set S $NMD5 set W $N } else { set S $NMD5 } } pool myClientPool member [lindex $W 0] [lindex $W 1] }
when CLIENT_ACCEPTED { TCP::collect 2 } when CLIENT_DATA { set msg [findstr [TCP::payload] "" 0 "\r\n"] set sid [findstr $msg "" 9 "\r\n"] set S "" foreach N [active_members -list myMsgSrvPool] { set I [lindex $N 0] binary scan [md5 $I$sid] c1 NMD5 if { $NMD5 > $S } { set S $NMD5 set W $N } else { set S $NMD5 } } pool myMsgSrvPool member [lindex $W 0] [lindex $W 1] }
- The_Bhattman
Nimbostratus
please note any rule that uses "active_members -list " requires version 9.4.2+ - Deb_Allen_18Historic F5 AccountExcellent use of the election hash algorithm. This is exactly the kind of problem that is intended to solve - cases where the answer must be determined with no historical data or awareness of assessment made by another device.
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