When you ramp up load testing in Postman, the real bottleneck isn’t usually your API itself, but how Postman manages and executes those concurrent requests.
Let’s see Postman’s Newman CLI tool simulate a load of 100 concurrent users hitting an API.
newman run your_collection.json -n 100 --delay 1000 --interval 50 --silent
Here, your_collection.json is your Postman collection. -n 100 sets the total number of iterations (simulating 100 users making one request each). --delay 1000 adds a 1-second delay before the first request, and --interval 50 means new requests are sent every 50 milliseconds. This combination allows Newman to build up to 100 concurrent requests. --silent keeps the output clean for performance analysis.
The core problem Postman faces under load is its single-threaded nature for script execution and request handling. While it can send multiple requests concurrently, the JavaScript environment where your pre-request and test scripts run is fundamentally single-threaded. This means if one script is slow, it blocks all others.
Here’s how Postman handles concurrent requests: it uses Node.js’s http.Agent or https.Agent under the hood, which manage connection pooling. When you specify a high number of concurrent requests (e.g., 100 or 1000), Postman attempts to create that many active connections or reuse existing ones from the pool. The actual concurrency limit is often dictated by the operating system’s network stack and Postman’s internal thread management, not just the number you input.
The most surprising thing about Postman performance testing is that your API’s performance might be perfectly fine, but Postman itself could be the limiting factor due to its internal resource management. It’s not uncommon to see your API response times stay low, while Postman reports increasing latency or even outright failures because its own event loop is getting choked.
The problem Postman solves here is providing a familiar, accessible interface for load testing, democratizing a process usually reserved for specialized tools. It leverages existing Postman collections, meaning you don’t need to rewrite your tests from scratch for performance. The internal mechanism involves Newman (the CLI runner) spawning Node.js processes. Each process can manage a set of concurrent requests. When you increase the -n (iterations) and decrease the --interval (time between starting new requests), Newman instructs these Node.js processes to open more connections and send more requests. The --delay parameter is crucial for ensuring requests don’t all hit at the exact same millisecond, which can overload even robust APIs and Postman’s ability to manage them.
The most common performance issue arises from overly complex or inefficient pre-request scripts or test scripts. If a script takes a long time to execute (e.g., parsing large JSON, complex calculations, or external calls within a script), it blocks the Node.js event loop, delaying the sending of subsequent requests or the processing of responses. This creates a cascade effect where the perceived latency increases dramatically, not because the API is slow, but because Postman is slow to manage the requests.
To effectively scale Postman load tests beyond a few hundred concurrent users, you often need to distribute the load across multiple machines. This is achieved by running multiple Newman instances, each on a separate machine or container, and aggregating their results. This bypasses the single-machine resource limitations of Postman’s runner. You can use tools like pm2 to manage multiple Newman processes on a single machine or orchestrate them using Kubernetes or Docker Swarm.
The primary levers you control are the number of iterations (-n), the interval between starting requests (--interval), and the overall duration or target concurrency. Postman’s default connection pool settings are usually sufficient, but for extreme loads, you might need to tune Node.js’s http.Agent options if you’re running custom scripts that interact directly with it, though this is rare for typical Postman users.
The next hurdle you’ll encounter is accurately correlating Postman’s reported metrics with your API’s actual performance, especially when Postman itself becomes a bottleneck.