API Performance Basics

What QA needs to understand about API performance, even without doing full-scale performance testing every day.

Updated:

Contents

API performance involves more than whether something is "fast or slow." For QA, it concerns a service's resilience under real load, predictable responses, and the backend's impact on user experience. An endpoint can technically work while delivering poor UX: loading indicators keep spinning, requests time out, unnecessary retries occur, operations are duplicated, and dependent services start failing.

Even if you do not perform comprehensive performance testing every day, you still need to recognize the basic warning signs. This helps you identify risks earlier instead of leaving performance as something to "deal with later."

What counts as a performance problem?

A common mistake is to think a performance problem exists only when the system stops responding altogether. In practice, the trouble starts earlier.

  • →Responses are noticeably slower than expected for the scenario.
  • →Response times vary greatly from one request to another.
  • →Latency or errors rise sharply as load increases.
  • →Expensive requests start disrupting other scenarios.
  • →The service technically responds, but users have to wait too long.

This matters to QA because an endpoint can pass its functional checks while already posing a risk.

Metrics QA needs to understand

You do not need to become a performance engineer immediately, but you should have a solid grasp of several concepts.

  • →Latency: how long a response takes. This is usually what users notice first.
  • →Throughput: how many requests the system actually handles per unit of time.
  • →Error rate: how the number of errors changes under load.
  • →Saturation: how close the system is to its limits for CPU, memory, connections, thread pools, databases, or queues.

One point is particularly important: averages are almost always misleading. An endpoint's average response time of 300 ms does not necessarily mean everything is fine. Half the requests may be very fast while some users wait 5–8 seconds. For APIs, it is therefore much more useful to examine percentiles such as p95 and p99 alongside the average.

The practical implication for QA is that performance problems often occur in the tail of the distribution, where the system becomes unstable, rather than in an "ordinary average request."

Common causes of slow APIs

There are usually several causes, and they are not always in the same place.

  • →Expensive database queries.
  • →Missing indexes.
  • →Poor pagination or sorting over large datasets.
  • →N+1 queries.
  • →Oversized payloads.
  • →Synchronous calls to slow dependencies.
  • →Expensive serialization and deserialization.
  • →Too much business logic in a single endpoint.
  • →Locks and contention for the same resource.
  • →Aggressive retries that amplify overload.

QA uses this knowledge to form sound hypotheses, rather than to optimize code. A slow filtered list often points to the database, indexes, sorting, or data volume. If checkout slows down, the problem may lie beyond the orders service, in a synchronous call to payment, inventory, or antifraud services.

What QA can do without a dedicated performance lab

Even without JMeter, k6, or a dedicated environment, QA can spot a great deal.

  • →Compare response times across similar scenarios.
  • →Observe how responses change with small and large datasets.
  • →Test the same endpoint with different filters, sort options, and page sizes.
  • →Identify instability even during routine functional testing.
  • →Watch for timeouts and 429, 502, 503, and 504 responses.
  • →Record whether slowdowns lead to repeated operations, duplicates, or inconsistent data.
  • →Raise performance risks before a full load test when an endpoint's design appears expensive.

This is an important point: QA does not need to build a large load testing environment to detect a risk. Routine functional testing often reveals suspicious behavior in a scenario.

What to watch for in everyday work

Several practical observations should be treated as warning signs.

  • →Identical requests have very different response times.
  • →A list works with test data but breaks down at larger volumes.
  • →Filtering and sorting sharply increase response time.
  • →Creating an object is fast, but reading a list of those objects is very slow.
  • →The UI starts displaying incorrect statuses during several concurrent actions.
  • →A slowdown triggers retries and duplicates.
  • →The service returns 200, but so slowly that the user has already reloaded the page or clicked the button again.

These signals are especially important in critical business flows: login, search, payments, checkout, status updates, lists, and analytics.

Why performance and reliability are connected

Beginners often see performance as separate from the correctness of application logic. In practice, the opposite is true. A slow API often triggers a chain of side effects:

  • →The user clicks the button again.
  • →The frontend repeats the request.
  • →The gateway or client library triggers timeout or retry behavior.
  • →Downstream services receive extra load.
  • →The queue starts growing.
  • →Some operations finish while others do not.
  • →Duplicates and unexpected statuses appear.

A performance problem quickly becomes more than a speed issue. It becomes a problem with system correctness and resilience.

A practical example

Consider an order list endpoint: GET /orders?status=paid&sort=created_at_desc&limit=50

With a small dataset, it responds in 150 ms. With production-scale data, responses take 4–6 seconds, sometimes longer.

What QA needs to determine:

  • →Whether sorting and filtering cause the slowdown, or whether the entire list is slow.
  • →Whether the problem begins at a particular data volume or occurs immediately.
  • →Whether the frontend starts repeating requests or displaying false errors after the slowdown.
  • →Whether pagination still works.
  • →Whether count matches the actual data.
  • →Whether the endpoint returns an oversized payload.
  • →Whether this slow request degrades other APIs.

On the surface, this may look like "the list is slow." For product quality, however, it already creates a risk of timeouts, duplicates, poor UX, and future production incidents.

Key takeaways for QA

  • →API performance concerns both speed and predictable behavior under load.
  • →Average response time almost never tells the full story, so understanding p95 and p99 matters.
  • →A slow endpoint can compromise both UX and scenario correctness through retries, timeouts, and duplicates.
  • →QA can identify performance risks without a full load testing lab.
  • →One of the most useful skills is identifying the specific scenario or parameter that makes an API expensive and unstable.

Further reading