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

Filter by:
  • Solution
  • Technology
Answers

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?

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hey,

as long as the cookie is included in the http request the BIG-IP should handle the persistence correctly. Maybe you are hitting the cookie persistence timeout. https://support.f5.com/csp/article/K83419154

BR

0
Comments on this Answer
Comment made 1 month ago by Sabir Alvi 75

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?

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

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

0
Comments on this Answer
Comment made 1 month ago by Sabir Alvi 75

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?

0