Skip to content
Tutorials Center
My learning

Topics

Lesson 18 of 30 ยท Running at Scale

Monitors, performance and load basics

Schedule Postman monitors, set response-time budgets, read percentiles instead of averages, and learn what simple load tests can and cannot tell you.

A test that passes today says nothing about tomorrow. Servers get slower, a certificate expires, a deployment breaks one endpoint at night. Two ideas help here. Monitoring means running a small set of checks on a schedule, whether or not anyone changed the code, so you hear about problems before your users do. Performance testing means measuring how fast the API answers and how it behaves when many people use it at once.

Postman has features for both, but they have limits. This lesson explains what scheduled monitors do, how to set a sensible response-time budget, why averages mislead and percentiles do not, and how far a simple load test can take you before you need a specialist tool.

Postman itself cannot run on this site, so its settings are described in words and read-only blocks. The runnable examples are stand-ins written in plain JavaScript: one measures percentiles of a fixed set of response times, the other is a small mathematical model of a server under load. Both are deterministic models, not measurements of a real system, and the lesson says so wherever it matters.

Scheduled monitors

A monitor in Postman runs a collection automatically on a schedule, from Postman's cloud, rather than from your own computer. You choose the collection, an environment, how often it should run (for example, every hour) and sometimes the regions it should run from. After each run, Postman keeps the results, and you can be notified when tests fail.

What a monitor does

Runs on a schedule Hourly, daily, your choice.
Runs from the cloud No need to keep your laptop open.
Tells you Alerts when a check fails.
Keeps history See when it started to break.

A monitor is your collection plus a clock.

1 / 2

Things to keep in mind when you design one:

  • Reachability. The cloud runs your requests, so the API must be reachable from the internet. A service on localhost or inside a private network cannot be monitored this way.
  • Safe requests only. A monitor repeats forever. Do not put requests that delete data, send emails or charge cards in a schedule. If you must create data, also delete it in the same run.
  • Few, valuable checks. A monitor is for "is the important thing alive and fast?", not for the full regression suite. Keep it small so it is quick, cheap and stable.
  • Plan limits. How often monitors can run and how many runs you get depend on your Postman plan, so check your plan before designing a schedule.
  • Alerts people read. An alert nobody trusts gets ignored. If a monitor cries wolf because of flaky checks, fix or remove the check.

For monitoring of a whole production system, dedicated uptime and observability tools exist as well. A Postman monitor is a convenient middle ground: it reuses tests you already wrote.

Response-time budgets

A response-time budget is a limit you decide in advance: "listing products must answer in under 300 ms". It turns "feels slow" into a pass or a fail. In Postman, every response knows how long it took, and you can assert on it:

JavaScript
// Tests tab (real Postman script, read-only here)
pm.test("responds within the budget", function () {
  pm.expect(pm.response.responseTime).to.be.below(300);
});

Choose budgets from what users need and from what the endpoint can do, not from a guess. An endpoint that searches a large table may deserve a looser budget than one that returns a fixed settings object.

Be careful with single measurements. One request is a sample of one: a network hiccup, a cold cache or a busy moment can make a healthy API look slow once. A time assertion in a normal functional test is best used with a generous budget, to catch a serious regression (an endpoint that suddenly takes five seconds) rather than small noise. For tighter limits, look at many requests and at percentiles.

Why averages hide problems

Imagine that 94 of 100 requests take about 120 ms and 6 requests take over a second. The average is around 170 ms, which sounds fine. Yet one user in sixteen waits more than a second, and that user is unhappy. Averages smooth away exactly the experiences that cause complaints.

Percentiles describe the distribution instead:

  • p50 (the median): half of the requests were faster, half slower. This is the typical experience.
  • p95: 95% of requests were this fast or faster. One in twenty was slower. This is the "bad day" experience.
  • p99: the slowest one in a hundred. It shows the tail.
  • max: the single worst request, which is often an outlier and not a good target.

Teams write their budgets in percentiles: "p95 under 300 ms, p99 under 800 ms". The simplest way to compute a percentile is the nearest-rank method: sort the values, take rank ceil(p/100 ร— n), and read that element.

The stand-in below generates 200 response times from a seeded random generator. The seed is fixed, so every run gives the same numbers, and a few of the requests are slow on purpose. It then compares a budget applied to the mean with the same budget applied to the p95.

JS Percentiles versus the average

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The mean is about 152 ms and passes a 300 ms budget easily. The median is 113 ms. Yet the p95 is 528 ms and the p99 is 973 ms, and twelve of the 200 requests (6%) were over budget. The budget on the mean says "all is well"; the budget on the p95 correctly says "one user in twenty has a bad time". Also note p90 (138 ms): the trouble only appears in the last few percent, which is why you need to look at the tail.

The response times here are generated by a formula, not measured from a server. The percentile arithmetic is real and is how monitoring tools compute it; the data is a stand-in for what a real series of requests could look like.

A simple load test

A load test sends many requests at once, imitating many users, and watches how the API copes. The basic vocabulary is short:

  • Virtual users (VUs): simulated clients that each send requests in a loop.
  • Ramp-up: starting with few users and adding more over time, so you can see where things start to bend.
  • Throughput: requests handled per second.
  • Error rate: the share of requests that failed or timed out.
  • Saturation: the point where more users no longer give more throughput and latency climbs sharply.

A typical result looks like this: latency is flat while the server has spare capacity, then rises quickly once requests start to queue, and finally requests time out. The point where the line bends is more interesting than any single number.

The next stand-in is a model of that behavior. A pretend server has 8 workers and each request takes 100 ms of work. While the number of users is at or below 8, nobody waits. Beyond 8, requests queue, and the model stretches latency in proportion. A fixed-seed random generator adds a little jitter. Requests slower than one second count as timeouts. The model prints a table and checks each level against a p95 budget.

JS A model of latency as users increase

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Read the table from top to bottom. With 1, 4 and 8 users the p95 stays near 155 ms: there is spare capacity. At 16 users the p95 jumps to 311 ms and the budget is breached for the first time, long before anything fails outright. Errors only appear at 64 users, where many requests wait longer than the timeout. A functional test would never reveal the breach at 16 users; a load test does.

This is a model with invented numbers: real servers have caches, databases, connection pools and network limits that behave in more complicated ways. What carries over is the shape of the curve and the habit of reading percentiles per load level.

What Postman can and cannot do for load

Postman is primarily a functional testing tool. Recent versions include a basic performance-testing feature in the desktop app, where you pick a collection and run it with a number of virtual users (fixed or ramping up). Availability and limits depend on your version and plan, so check the current documentation. The limits are structural:

  • The load is generated from one computer (yours), so the machine or its network can become the bottleneck before the server does.
  • You get a limited view of the server's side: CPU, memory, database and queue behavior are not visible from the client.
  • Modeling realistic traffic (many different users, think times, mixed requests, thousands of virtual users) is beyond a simple collection run.

For serious load testing, use a purpose-built tool such as k6, JMeter, Gatling or Locust, and look at server-side metrics at the same time. For comparison, here is what a small test with percentile thresholds looks like in k6 (read-only; it needs the k6 program):

JavaScript
import http from "k6/http";
import { check, sleep } from "k6";

export const options = {
  vus: 20,
  duration: "30s",
  thresholds: {
    http_req_duration: ["p(95)<500"],
    http_req_failed: ["rate<0.01"],
  },
};

export default function () {
  const res = http.get("https://staging.shop.example/products");
  check(res, { "status is 200": (r) => r.status === 200 });
  sleep(1);
}

The thresholds say what a pass means, in percentiles and an error rate: exactly the vocabulary of this lesson.

Good habits for performance checks

  • Test a staging system you own. Never run load against a production system or someone else's API without permission. A load test looks exactly like an attack.
  • Warm up first. The first requests after a deployment are often slower (cold caches). Discard or separate them.
  • Measure from a sensible place. Latency from a build server in the same data center differs from latency across an ocean.
  • Compare against a baseline. The number alone means little; "p95 got 40% worse since last week" is a finding.
  • Do not chase the maximum. Use p95 and p99 for budgets and keep the max as a clue.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. An API's mean response time is 150 ms, but 6% of requests take over 1 second. Which statistic best reveals the problem?

    Percentiles describe the slow tail that the mean smooths away. A p95 or p99 budget would flag the slow requests.
  2. 2. Which request is a good candidate for an hourly Postman monitor?

    Monitors repeat forever from the cloud, so they should be safe, read-only and reachable from the internet.
  3. 3. Why is a load test run from a single laptop limited?

    One client machine can only generate so much traffic realistically, and from the outside you cannot see server CPU, memory or database behavior.
  4. 4. In the nearest-rank method, which element is the p95 of 200 sorted response times?

    The rank is ceil(0.95 x 200) = 190, so the p95 is the 190th value in the sorted list.

Summary

  • Monitors run a collection on a schedule from the cloud and alert you; keep them small, safe, read-only and reachable from the internet.
  • A response-time budget turns "slow" into a pass or a fail; asserting on a single request needs a generous limit.
  • Averages hide the slow tail; use percentiles (p50, p95, p99) and the nearest-rank method to compute them.
  • Load testing means virtual users, ramp-up, throughput and error rate; the bend in the latency curve is the key finding.
  • Postman's performance features run from one machine and have limits; use k6, JMeter, Gatling or Locust for serious load, and only against systems you may test.
  • The examples here are stand-ins with generated data, not measurements of a real server.

Next: API testing strategy and test design.