Forum Discussion
Michael_Yates_1
Nimbostratus
Oct 11, 2006HTTP persistence for multiple clients on a single TCP Connection
Hi,
I need some help to fix some behaviour we are seeing in our BIG IP load balancer. Hopefully someone out there has seen the problem described below.
The situation:
- TCP connection opened from outside world to BIGIP
- First HTTP request down the connection contains persistence cookie BIGIP=server1
- Second HTTP request on same TCP connection contains persistence cookie BIGIP=server2
The result:
- First request goes to server1
- Second request goes to server1
- BUT second request SHOULD NOT have gone to server1 - its session was on server2
- First user gets a valid response
- Second user gets a failure response
So in summary. When using just the in built persitance methods (we are using passive persistence) the BIG IP only makes its persistence descision on the initial request. All subsequent requests made on the same TCP connection flow to the same back end server.
Other background:
All traffic arrriving at our service is aggregated by a gateway. This gateway relays all requests from the real HTTP clients to us. So to the outsde of the BIGIP our traffic all comes from a single IP address. This single IP address uses TCP connection pooling in order to minimise its server load. We have no access to change what is happening on the gateway aggregator.
I spoke with F5 about this and they suggested I write an iRule to achieve the persistence we need. They also suggested that this forum would be the best place to start to get some hints on writing such a rule. I haven't written iRules before but it seems conceptually easy.
Pseudocode:
OnHttpRequest()
{
If (request arrives without any persistence cookies)
{
Do nothing - allow normal load balancing to occur as it is an initial connection
}
else
{
Decode server address from persistence cookie
Check that the server the cookie points to is available
Send HTTP request to correct server
}
}
I would greatly appreciate any hints/tips on how to best solve the above problem.
Do you guys think an iRule is the best way to solve this?
Is there a better way to solve this?
If an iRule is the best way could somebody sketch up a starting point?
Thanks you very much for your time.
Regards,
Michael
- hoolio
Cirrostratus
Hi Michael, - Michael_Yates_1
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