Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

HTTP Persistence with http "sessionid"

Hi - before i start - let me say we have only used the F5 for relatively simple load balancing with the inbuilt persistance profiles and have not done any iRules before. So, we have been asked to provide persistence for an HTTP VS where the clients pass through an intermediate (so megaproxy scenario) so we won't see the originating clients IP addresses. The application team asked us do this based on "sessionid" within the http header. I can see lots of examples of doing this for the field "jsessionid" but not for "sessionid". From the example information below provided by the apps team to highlight what they wanted I noted that the "sessionid" and the "jsessionid" where the same. When I suggested that we did this on the "jsessionid" their reply was:

Only the sessionid is populated by the application team in the header. The Cookie: jsessionid field is not populated explicitly from our code and we don’t have any control on it.

Am I missing something? As I can't see any examples in devcentral of using the "sessionid" field - only examples by using the field "jsessionid" for persistence. Any help greatly appreciated!

Header Details below:

POST /interact/servlet/RestServlet HTTP/1.1 User-Agent: Mozilla/4.0 [en] (WinNT; I) Accept: image/gif, / Host: xx.xx.xx.xx:9080 Content-Type: application/json sessionId: 0006|401|03/02/2017|10:38:18 Cookie: jsessionid=0006|401|03/02/2017|10:38:18 Content-Length: 1155

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

If sessionid is an header, you can use an iRule like the one given below inside an Universal Persistence profile:

when HTTP_REQUEST { 
persist uie [HTTP::header sessionid] 
}
0
Comments on this Answer
Comment made 06-Aug-2018 by Sabir Alvi 75

Did this help? As I'm looking for similar configuration to load balance java based app between 2 servers using session ID in the header for persistence.

0