persisting the jsessionid cookie within F5 session table
we have in-house search servers that will crawl the customer-facing application. the limitations with our search software is that it doesnt persist the connections to app server and also cannot resubmit the jsessionid cookie.
because of these limitations, we noticed many performance issues including session overflow scenario on app servers.
How iRule helped
since we were already using F5 in our design, I explored the possibility of using iRules to store the jsessionid cookies and then reuse them over the crawl period.
And it worked out pretty well, we were able to bring down the application sessions from over 150K to just 300.
1. our application flow presented a specific pattern for all requests - the initial request to app server always end up in 301 without any jsessionid cookie created.
2. the subsequent requests will have a response code of 302 or 200 with session cookie being created (if not already present). also, incase of 302s, there will be no query parameters.
below is the code