Forum Discussion

Sabir_Alvi's avatar
Sabir_Alvi
Icon for Altocumulus rankAltocumulus
Aug 06, 2018

Java application persistence issue with load balancer

I have a java application running on 2 web servers, load balanced in round robin fashion and cookie insert persistence on VIP. From what I understand of the application, it keeps doing some kind of pulse check with server every few seconds because of which the java app disconnects as it is getting bounced bw one server and other, meaning persistence is not working for subsequent connections made by the java applet. I cannot use source/dest_addr persistence, so it has to be cookie persistence. I somehow managed to disable the pulse check within application, which made the app stable and no disconnects were noticed. However after a while some of the tabs/pages started to throw errors which I believe is due to server switch at the F5 load balancing. Any ideas what else can be done to ensure the java application connection made to one server is persistent for subsequent connections made from same source?

 

  • Hi,

     

    Can you please provide cookie persistence configuration details.

     

    Java Session ID irule is mentioned below: when HTTP_REQUEST { if { [HTTP::cookie exists "JSESSIONID"] } { persist uie [HTTP::cookie "JSESSIONID"] 1800 } else { set jsess [findstr [HTTP::uri] "JSESSIONID" 11 ";"] if { $jsess != "" } { persist uie $jsess 1800 } } } when HTTP_RESPONSE { if { [HTTP::cookie exists "JSESSIONID"] } { persist add uie [HTTP::cookie "JSESSIONID"] 1800 } }

     

    • Sabir_Alvi's avatar
      Sabir_Alvi
      Icon for Altocumulus rankAltocumulus

      For cookie persistence, I only used the default cookie persistence profile on the VIP. For the Java Session ID, I believe we need to use universal persistence with the iRule attached to the universal persistence profile itself. I'm using an IIS based java application. is the above iRule for generic use?

       

  • Hi,

     

    Can you please provide cookie persistence configuration details.

     

    Java Session ID irule is mentioned below: when HTTP_REQUEST { if { [HTTP::cookie exists "JSESSIONID"] } { persist uie [HTTP::cookie "JSESSIONID"] 1800 } else { set jsess [findstr [HTTP::uri] "JSESSIONID" 11 ";"] if { $jsess != "" } { persist uie $jsess 1800 } } } when HTTP_RESPONSE { if { [HTTP::cookie exists "JSESSIONID"] } { persist add uie [HTTP::cookie "JSESSIONID"] 1800 } }

     

    • Sabir_Alvi's avatar
      Sabir_Alvi
      Icon for Altocumulus rankAltocumulus

      For cookie persistence, I only used the default cookie persistence profile on the VIP. For the Java Session ID, I believe we need to use universal persistence with the iRule attached to the universal persistence profile itself. I'm using an IIS based java application. is the above iRule for generic use?

       

    • Sabir_Alvi's avatar
      Sabir_Alvi
      Icon for Altocumulus rankAltocumulus

      Hi - I doubt that as I see the issue within 20 secs of login. May be I should use an iRule for session ID based persistence? Can you help me with the syntax please?