Search code examples
apinetwork-programmingjmeterlatency

Latency from Jmeter b/w Servers in Same Network


I am testing an api in Jmeter from a Linux loadgenerator machine. When executed in non GUI mode, I am seeing a latency of 35s. But when did a ping command from LG server to the app server, the time was just in milli sec-

Ping_output

35 sec latency from the view results tree-

view_results_tree

Both the servers are in the same network. Then why is there so much latency.


Solution

  • You're looking into 2 different metrics.

    Ping sends an ICMP packet which just indicates success of failure in communicating between 2 machines.

    Latency includes:

    1. Time to establish connection
    2. Time to send the request
    3. Time required for the server to process the request
    4. Time to get 1st byte of the response

    So in other words Latency is Time to first byte and if your server needs 35 seconds to process the request it indicates a server-side issue rather than a network issue.

    More information: