Search code examples
performanceconcurrencyjmeterload-balancinginternal-load-balancer

If the number of requests are huge, can load balancer cause the issue while sending responses to respective clients?


I do have architecture of a Load balancer followed by two Web Application server and Database, I am hitting thousands of HTTP requests to the server from Jmeter distributed testing environment.

At the time of getting response back, few request does not get response back from the server.

I checked Database logs, 100 % requests were responded. Checked with Web Application servers access logs, 100 % requests were responded.

Can Load balancer cause the damage traversing these pending responses to the respective clients? Every time different different request are getting stuck.

Thanks in Advance!!


Solution

  • If you suspect load balancer, look at 3 typical causes first:

    1. Server takes longer to respond than load balancer is waiting
    2. Client has shorter timeout than it takes for server to respond.
    3. Port/thread/connection exhaustion on load balancer, or other LB configuration problems

    In all three cases, I suggest looking at the load balancer logs. Since you didn't specify which LB you are using, I cannot say exactly how the log looks, but typically LB log gives you option to see:

    1. How long it took for a request to be sent to a web server and for the response from the web server to return to load balancer. You can them compare those numbers to timeouts configured for load balancer and the client (problem 1 and 2).
    2. How long it took for a request from the client to be processed by LB and how long LB took to respond to a client. If it takes long, then something is not right with load balancer (problem 3)
    3. And then of course if you have any errors on load balancer, they may just explain what's going on.

    If you cannot review logs for load balancer, I suggest changing your JMeter test temporarily to target servers behind load balancer directly. You can even configure your script to evenly distribute load between all servers (for example by using multiple thread groups). That would allow you to isolate the problem, and get more information on what's going on.