API Load Testing: Find Limits Before Users Do
How to plan realistic load tests for integrations, choose tools, read percentiles and find the point where things fail.

Run API load testing that reflects real traffic: realistic scenarios, safe test targets, percentile latency, error rates and a record of the limits found.
Integrations rarely fail on a quiet Tuesday. They fail at month end, during a product launch or when a bulk import runs at the same time as normal traffic. API load testing shows how your APIs and integrations behave under heavy demand before real users find out: where response times climb, where errors start and which component gives way first. Done well, it turns "we think it can handle it" into a measured limit. This guide covers planning realistic tests, choosing tools, reading the results and recording the limits you find.
What API load testing should answer
Before writing a script, write down the questions:
- Can the API handle expected peak traffic with acceptable response times?
- At what level do errors or timeouts begin?
- Which component fails first: the API itself, the database, a downstream service or a third-party rate limit?
- How does the system recover after a spike?
- Does performance degrade over a long run, for example because of memory growth?
Different questions need different test shapes:
- Load test: expected peak traffic for a sustained period
- Stress test: increasing traffic until something breaks
- Spike test: a sudden jump in traffic, then a drop
- Soak test: moderate traffic for hours to reveal slow degradation
Model realistic traffic
The value of a test depends on how closely it resembles reality. Base scenarios on production data where possible:
- The mix of requests, such as 70% reads and 30% writes
- The endpoints that carry most traffic, and the slow ones that matter
- Realistic payload sizes and data variety, not the same record repeated
- Think time between requests for user-driven traffic
- Background jobs, such as syncs and imports, that run alongside user traffic
Integrations add a twist: a single business event can trigger several API calls across systems. Model those chains, not just individual endpoints.
Test safely
Load tests can cause real damage if pointed at the wrong place:
- Use a dedicated test environment sized like production, or a carefully scheduled production window with approval
- Never load test third-party APIs without permission; most have rate limits and terms of use that forbid it. Use mocks or sandboxes instead.
- Use test data that cannot trigger real emails, payments or orders
- Have a way to stop the test instantly
- Tell the people who monitor the systems before you start
Our guide to Zoho CRM integration testing covers sandboxes and test data for CRM-connected systems.
Choose API load testing tools
Several open source tools are widely used:
- Grafana k6, which its documentation describes as an open-source, developer-friendly and extensible performance testing tool, with tests written in JavaScript
- Locust, an open source performance and load testing tool for HTTP and other protocols, where tests are defined in regular Python code
Pick the tool that matches your team's language and your reporting needs. The test design matters far more than the tool. Whichever you choose, keep test scripts in version control next to the code they test, so scenarios evolve with the API and anyone on the team can rerun them.
Generate load from the right place
Where the load comes from affects the results. A test run from a laptop on office Wi-Fi may hit the limits of the laptop or the network long before the API struggles. For meaningful numbers:
- Run load generators on machines with enough CPU and network capacity, and watch their own resource use during the test
- Place them in a location similar to real clients, or note the difference in your results
- Use several generators for large tests rather than one overloaded machine
- Make sure firewalls or protection services in front of the API will not block or throttle the test traffic unexpectedly, or agree an exception for the test window
If the load generator is the bottleneck, the test measures the wrong thing.
Worked example: a simple Locust scenario
The simplified, untested Locust script below models a mix of reads and writes against a hypothetical orders API in a test environment. Endpoint paths, weights and payloads are placeholders.
from locust import HttpUser, task, between
class IntegrationClient(HttpUser):
# Pause between requests to mimic a client that is not hammering the API
wait_time = between(1, 3)
@task(3)
def list_open_orders(self):
self.client.get("/api/orders?status=open", name="list open orders")
@task(1)
def create_test_order(self):
payload = {"customer_ref": "LOADTEST-001", "items": [{"sku": "TEST-SKU", "qty": 1}]}
self.client.post("/api/orders", json=payload, name="create order")
The task weights send roughly three reads for every write. A run would gradually increase the number of simulated clients while recording response times and errors for each named request.
Read the results: percentiles, not averages
Averages hide problems. Google's SRE book chapter on service level objectives explains that most requests can be fast while a long tail is much slower, and that most metrics are better thought of as distributions than averages. For each request type, look at:
- Median (50th percentile) response time
- 95th and 99th percentile response times
- Error rate, split by type, such as timeouts, 429s and 5xx errors
- Throughput achieved, in requests per second
- Resource use on servers and databases during the test
Plot these against load. The point where high percentiles bend sharply upward, or errors begin, is your practical limit.
Find the bottleneck
When performance degrades, find out why before tuning anything:
- Database: slow queries, missing indexes or exhausted connection pools
- Application: CPU saturation, blocking calls or memory pressure
- Downstream services: slow responses or rate limits from systems you call
- Queues: workers that cannot keep up, causing growing backlogs
Integrations that use a webhook queue often absorb spikes well, but load tests should still check how quickly the queue drains afterwards.
Record limits and act on them
The output of API load testing should be a short, dated record:
- Test scenario, environment and version tested
- Load levels reached and the limit found
- The component that failed first and why
- Changes made and the results of retesting
The table below shows a hypothetical summary. All figures are illustrative.
ScenarioPeak requests per second95th percentile at peakError rate at peakFirst bottleneckExpected month-end load120420 ms0.1%None foundStress to failure3102.8 s6%Database connection poolAfter pool resize and index450900 ms0.4%Downstream rate limit (mocked)
Share the summary with the teams that own each component, and agree what happens when expected peak traffic approaches a recorded limit: who is alerted, and what capacity can be added. Repeat key tests after significant changes, such as new features, infrastructure changes or new integrations, so the recorded limits stay true.
Frequently Asked Questions
What is API load testing?
It is sending controlled, realistic volumes of requests to an API to measure response times, errors and capacity, and to find the point where performance degrades.
Can we load test third-party APIs?
Not without permission. Most providers enforce rate limits and terms of use. Use their sandboxes where offered, or mock their responses in your test environment.
Why use percentiles instead of averages?
Averages hide slow requests. Percentiles, such as the 95th and 99th, show how slow the worst experiences are, which is usually what causes timeouts and complaints.
How often should we run load tests?
Before major launches and expected peaks, after significant changes to code or infrastructure, and on a regular schedule for critical integrations.
Know your limits before peak season
We plan and run load tests for APIs and integrations, find bottlenecks and fix them. See our CRM and API integration services, or talk to us about API load testing.
About the Author
Manav Sharma is the founder of Insyrge and a CRM solutions architect. He works across Zoho, Salesforce, HubSpot, Odoo and more, designing the CRM setups, integrations and automations that keep sales and operations teams working from the same data.
Need Help Implementing This in Your Business?
Our certified Zoho consultants and automation experts can help you design and deploy custom workflows tailored to your operations.
Book Free Consultation