Forum Discussion

Vic_13197's avatar
Icon for Nimbostratus rankNimbostratus
Oct 06, 2010

Which load balancing algorithm? What's going on?





Web application on two load balanced servers. User comes in from the internet (HTTPS only), connects to the servers to make a request. Web servers then need to fetch data from a SQL backend before returning results to the internet user.






At first, I tried 'simple source persistence'. Upon running a load test, one server received 80% of the traffic (not what we want). So this last time, I had it on 'least connections (member)', SSL ID persistence (w/src persist backup @5mins), and used TCP lan optimized profile. Unfortunately, we're not offloading SSL, but if that's the problem here, I'll definitely push to have that changed.



Anyway, last night, we ran the test, and came back 55% on serverA, and 45% on ServerB (encouraging). Ran it again tonight, and it was again skewed mostly to serverA. Upon further analysis on the web server itself, we see that our app load tester is calling for 3 web pages total---within the same website. Eg, /page2, and /page3. Here's what the traffic looked like on the web server:





/page1 - Well balanced with ServerB


/page2 - Got most of the requests


/page3 - Got most of the requests





/page1 - Well balanced with ServerA


/page2 - Few requests


/page3 - Few requests



So, what would cause this sort of behavior? Since we're balancing on "connections" and persisting on SSL ID, I don't think the LTM is looking at layer 7---though the LTM still directed over 80% of the connections to ServerA. So, is there anything I can do to mitigate this behavior at the app level? Any idea why one server would have gotten most of the requests?









1 Reply

  • Hi Vic,



    Are your percentages of 55% and 45% connections or HTTP requests? Does the load generator open new connections with new SSL session ID negotiation for every client session? I'd guess the issue here might be that the load generator is either re-using connections and/or SSL session IDs and therefore not mimicking the client traffic patterns you're expecting. If you test with individual browsers, do you see more even distribution of connections and requests?