Forum Discussion

Ecesureshkumar's avatar
Ecesureshkumar
Icon for Nimbostratus rankNimbostratus
Mar 30, 2015

Load Balancing issue - Source Address Persisantence

Hi team,

 

We have one webserver and two application servers. Virtual Server is configured for two Application servers and on webserver IIS configuration we pointed to Virtual server of Application servers. Intermittently we were having session expiry error and found that application required persistence. So we tried with all persistence and only with source address persistence application is working and found all load is going to one application server only.

 

Can any one suggest best way to handle this. Thanks in advance for the support.

 

5 Replies

  • with source Ip address peristence, you must take care of the netmask, as the persistence record is created based on that. If 2 IPs (let's say 10.1.1.10 and 10.1.2.20) are in the same defined netmask (for ex. 255.255.0.0), they will both use the same persistent record and hence, be using the same backend server. You can check the created persistent record with command

    tmsh show ltm persistence persistence-records

  • At application layer, we have two managed server like TCP 7011,TCP 7012. So in this case i need for TCP 7011 App1 as primary and App 2 as secondary, similarly for TCP 7012 App2 as primary and App1 as secondary. I believe this can be achieved through irule, can you please help on this.

     

  • Hey Suresh, on what port is the webserver sending request to. Is the flow like

     

    Webserver -------> Virtual Server -----Pool Members (App1:7011, App2:7012)

     

  • You might want to give try as:

    when LB_SELECTED {
        if {[LB::server port] eq 7011 } {
            if {[LB::status pool xyz_pool member x.x.x.x 7011] equals "up"} {
                node x.x.x.x 7011
            }
            elseif {[LB::status pool xyz_pool member y.y.y.y 7011] equals "up"} {
                node y.y.y.y 7011
            }
          }
    
         elseif {[LB::server port] eq 7012 } {
                if {[LB::status pool xyz_pool member y.y.y.y 7012] equals "up"} {
                node y.y.y.y 7012
                }
                elseif {[LB::status pool xyz_pool member x.x.x.x 7012] equals "up"} {
                node x.x.x.x 7012
            }
        }
    }
    
    
    x.x.x.x - app1
    y.y.y.y - app2
    
    • Ecesureshkumar's avatar
      Ecesureshkumar
      Icon for Nimbostratus rankNimbostratus
      Hi Babu, Thanks for this Irule. I have two different Virtual server 1) VS_7011 2) VS_7012. So i planning to create two different irule and bind it with respective virtual server. IRULE 1 when LB_SELECTED { if {[LB::status pool xyz_pool member x.x.x.x 7011] equals "up"} { node x.x.x.x 7011 } elseif {[LB::status pool xyz_pool member y.y.y.y 7011] equals "up"} { node y.y.y.y 7011 } IRULE2 when LB_SELECTED { if {[LB::status pool xyz_pool member x.x.x.x 7012] equals "up"} { node x.x.x.x 7012 } elseif {[LB::status pool xyz_pool member y.y.y.y 7012] equals "up"} { node y.y.y.y 7012 }