
September 3, 2026
A system can work perfectly in development and still struggle when real users show up. Load testing is one of the last checkpoints before launch, where “it works” has to prove it can also work at scale.
Ahead of a recent client launch, we put a microservices platform to the test using Locust, Azure Load Testing, and AI. We focused on four questions:
Unit tests tell us if an application works correctly. Manual QA tells us if it feels responsive. Load testing shows what happens when hundreds or thousands of users show up at once, giving us valuable intel for real-world situations.
In this post, I’ll walk through how we built a realistic Locust test, what we uncovered, and where AI made a real difference.

We'd used JMeter on past projects. It's a solid, well-established load testing tool. But it leans on a GUI and XML test plans, and both get unwieldy fast once you're modeling something more nuanced than "replay this request a thousand times."
This time we chose Locust instead, for three reasons:
Locust also integrates cleanly with Azure Load Testing. Azure handles distributed test execution and automatically correlates client-side load metrics with server-side resource metrics, like CPU, memory, and database throughput, for every run.
It's tempting to hand an AI assistant an Open API spec and ask for a Locust script in one shot. We tried a version of this early on. It wasn't worth much.
Every simulated user hit endpoints at the same rate. No variation in wait time. Nothing resembled how people actually use the product. This consistent pattern of traffic makes it easy for a system to pass tests.
Instead, we treated our own understanding of the client's workflow as the source of truth, and used AI to get to the script faster, across four passes:










Bottleneck #1: A Cosmos DB Throughput Ceiling
The first real run, against a staging environment sized close to production, didn't get far. Azure Load Testing's server-side metrics showed Request Unit (RU) consumption on our Cosmos DB containers spiking repeatedly against the provisioned ceiling. The API layer started returning 429 (rate-limited) responses as a result.
Because we'd linked the Azure resources and enabled server-side metrics for the test, Azure Load Testing generated an AI-powered summary alongside the raw results automatically. It called out the RU ceiling as the main constraint, named the specific containers being throttled, and recommended enabling auto scale throughput given how bursty our persona-driven traffic was.




The fix: we enabled autoscale on the affected containers and reran the test.
With throttling resolved, the test ran further. A new pattern showed up. CPU on one API service climbed steadily under load, and one endpoint's response times kept getting worse, with no errors at all. Requests were succeeding. They were just getting slower as concurrency increased.
Azure Load Testing's AI summary pointed us toward the query logic behind that slow endpoint rather than infrastructure sizing. Latency scaling with load, on one isolated endpoint, with no errors, didn't match a resource-exhaustion pattern. The recommendation was to look at the code path instead.





That lead held up. The endpoint was pulling all roughly 25,000 products from the container on every call and filtering client-side, instead of pushing the filter into the query and paginating results. Fine at low traffic. Under load, it was the single biggest driver of both CPU usage and tail latency.
The fix: query-level filtering, pagination, and caching for product data that doesn't change often.
After both fixes, we reran the full suite end to end:



If you're setting up your own AI-assisted load test, here's where we'd start:
Two real bottlenecks surfaced here before either touched production, and neither would have shown up in unit tests or a QA pass alone. AI removed the friction between having a hypothesis and being able to test it, both while writing the script and while diagnosing what broke. The judgment calls, which personas mattered, whether a fix made sense, stayed with the engineers running the test. Worth keeping in mind before you hand your next load test to an AI assistant.