Forum Discussion

flicky2000_1616's avatar
flicky2000_1616
Icon for Nimbostratus rankNimbostratus
May 23, 2017

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

 

1 Reply

  • 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] 
    }