Significant Difference In Response Time for API's

50 views Asked by At

Conducted a 5-minute load test with 30 users using JMeter for a single API. Analyzed response times in Datadog during same duration. The response time metrics for JMeter and Datadog are as follows:

JMeter: Average - 456ms, 95th Percentile - 724ms
Datadog: Average - 7ms, 95th Percentile - 15ms

Repeated the test multiple times, consistently obtaining similar results. Currently investigating the substantial differences in values between JMeter and Datadog. Seeking clarity on which set of metrics to prioritize for performance analysis of the API.

When this API becomes the part of web page, which response time needs to be considered.

1

There are 1 answers

0
Dmitri T On

First of all get familiarized with the definition of API as it's not very clear what you're talking about.

My expectation is that Datadog measures only internal processing of the request while JMeter includes the following:

  1. Time to establish network connection
  2. Time to perform SSL handshake
  3. Time for the request to travel to the system under test
  4. HERE Datadog starts and ends measuring
  5. Time to the first byte of the response (or Latency)
  6. Time to the last byte of the response - Elapsed time

When the "API" becomes a part of the web page you need to ensure that JMeter is configured to behave like a real browser and measure the time required to get the whole webpage which may include calling mulpitle "APIs" and embedded resources. This is the correct way of assessing the web "page" performance (unless you're responsible for the single "API" endpoint)