Forum Discussion

sudhanshuagrawa's avatar
sudhanshuagrawa
Icon for Nimbostratus rankNimbostratus
Sep 26, 2017

F5 Load Balancer - persistence configuration requirement

Hi,

 

I have two servers with 6 instances of Webshpere application server on each i.e., 2 Severs and 12 instances in total and using F5 load balancer to route the traffic using Round Robin load balancing method.

 

Now, we have soap api calls from the client which sends some request to the load balancer and then the LB routes it the any instance as per availability. But, sometimes the session which is started on one instance, if any other call happens for the same session and it routes to different instance, the calls gets error out stating Invalid SessionID.

 

for this we need to maintain some form of stickyness at the Load Balancer. Request any help in form of configurations/screenshots as to how to implement stickyness at LB to maintain persistence for the session which has been started at one instance, later any request for the same session goes to that particular instance only.

 

Regards, Sudhanshu

 

  • One thing to add. The application on which the LB is routing the request generates a sessionID for each startSession call and the client using soap api is using this sessionID to make subsequent calls.

     

  • Hi,

     

    You have many persistence profiles on the F5 if you have the LTM license.

     

    If your clients supports cookie (example browsers) you can use "cookie" persistence profile for the "Default Persistence Profile" and then choose the "source_addr" persistence for the "Fallback Persistence Profile". Indeed, if client does not support "cookie" (example fatclient) it will use the fallback method.

     

    In this manner you will ensure that all client traffic goes to the same node for a same session.

     

    To configure this go to "Local Traffic ›› Virtual Servers : Virtual Server List ›› vs-name" choose the second tab "Resources" and choose "cookie" and "source_addr" for persistence profiles.

     

    Hope it helps

     

    Please give me a feedback

     

    Regards

     

  • It would require you to create an irule to route the traffic depending upon the value of the session ID you are mentioning.

     

    • sudhanshuagrawa's avatar
      sudhanshuagrawa
      Icon for Nimbostratus rankNimbostratus

      Hi Amy,

       

      Thank you for the response.

       

      Is there any way to capture this SessionID which the application is sending to the client at the Load Balancer F5 BigIPServer.

       

      Can you suggest how to capture this value and write an iRule to implement stickyness.

       

      Thanks & Regards

       

  • It would require you to create an irule to route the traffic depending upon the value of the session ID you are mentioning.

     

    • sudhanshuagrawa's avatar
      sudhanshuagrawa
      Icon for Nimbostratus rankNimbostratus

      Hi Amy,

       

      Thank you for the response.

       

      Is there any way to capture this SessionID which the application is sending to the client at the Load Balancer F5 BigIPServer.

       

      Can you suggest how to capture this value and write an iRule to implement stickyness.

       

      Thanks & Regards

       

  • It would require you to create an irule to route the traffic depending upon the value of the session ID you are mentioning.

     

    • sudhanshuagrawa's avatar
      sudhanshuagrawa
      Icon for Nimbostratus rankNimbostratus

      Hi Amy,

       

      Thank you for the response.

       

      Is there any way to capture this SessionID which the application is sending to the client at the Load Balancer F5 BigIPServer.

       

      Can you suggest how to capture this value and write an iRule to implement stickyness.

       

      Thanks & Regards

       

  • You would require to capture the traffic using wireshark or any other sniffer to get the session ID details. You can use the following commands on F5 to get the packet captured and analyse it using wireshark:-

     

    tcpdump -s0 -ni 0.0:nnnp -w /var/tmp/test_app.pcap

     

    (test_app - is the filename which you can change depending upon your testing). You can then copy this file from your host F5 to your computer using SCP and then analyse it.

     

    I would suggest, first to enable cookie persistence and then check the load balancing, whether it meets your requirement or not.There are chances that it can be supported.

     

    The persistence irule will depend upon the kind of session ID that gets generated. Let me know the format and I shall try to create one for you.

     

  • You would require to capture the traffic using wireshark or any other sniffer to get the session ID details. You can use the following commands on F5 to get the packet captured and analyse it using wireshark:-

     

    tcpdump -s0 -ni 0.0:nnnp -w /var/tmp/test_app.pcap

     

    (test_app - is the filename which you can change depending upon your testing). You can then copy this file from your host F5 to your computer using SCP and then analyse it.

     

    I would suggest, first to enable cookie persistence and then check the load balancing, whether it meets your requirement or not.There are chances that it can be supported.

     

    The persistence irule will depend upon the kind of session ID that gets generated. Let me know the format and I shall try to create one for you.

     

  • You would require to capture the traffic using wireshark or any other sniffer to get the session ID details. You can use the following commands on F5 to get the packet captured and analyse it using wireshark:-

     

    tcpdump -s0 -ni 0.0:nnnp -w /var/tmp/test_app.pcap

     

    (test_app - is the filename which you can change depending upon your testing). You can then copy this file from your host F5 to your computer using SCP and then analyse it.

     

    I would suggest, first to enable cookie persistence and then check the load balancing, whether it meets your requirement or not.There are chances that it can be supported.

     

    The persistence irule will depend upon the kind of session ID that gets generated. Let me know the format and I shall try to create one for you.

     

  • Hi Sudhashu did this problem resolve, i am facing a similar issue using cookie persistence