Mhonn YbañezSRE, DevOps, AI Engineer
 Today I Learned
Read the full page

When do I measure requests, and when do I measure resources?

Posted
Tags
observability, sre, alerting

RED watches the work from the user's side. USE watches the machines doing that work. They often don't fire together, so I page on RED and use USE to find the cause.

I kept seeing RED and USE mentioned together in monitoring talks and docs, usually as if everyone already knew the difference. I had a rough idea, but not a clear one, so today I sorted it out.

The question I had

When do I measure requests, and when do I measure resources?

What I found

Short version: the RED method is for requests, and the USE method is for the resources underneath them. I don't pick one. I run both, because they answer different questions.

RED: the work

The RED method came from Tom Wilkie, building on Google's four golden signals (latency, traffic, errors, saturation). It treats a service as a black box and measures the requests passing through it.

  • Rate: how many requests per second the service handles.
  • Errors: how many of those requests fail, like HTTP 5xx responses or timeouts. 4xx responses are usually the client's mistake (bad input, missing auth), so I track them separately instead of counting them as the service failing.
  • Duration: how long requests take, as percentiles like p50, p95, and p99. I wrote about why the average isn't enough in my p99 vs average latency post.

The coffee shop version: how many customers walk in per minute, how many orders the barista gets wrong, and how long people wait for their latte.

USE: the machines

The USE method came from Brendan Gregg. It looks at every resource that has a limit, physical or logical, and asks three questions about each one.

  • Utilization: how busy the resource is, like CPU at 70% or a disk 90% full.
  • Saturation: how much work is waiting because the resource can't take more yet. For a CPU that's the run queue length (or throttling, in containers). For memory it's swapping, paging, or OOM kills.
  • Errors: error events on the resource itself, like dropped network packets or disk read errors.

The coffee shop version: how hard the espresso machine is working, how many drink tickets are piling up because it can't keep up, and whether it's overheating or leaking.

Utilization and saturation are easy to mix up. A CPU at 100% with nothing waiting is just busy, and that's fine. A CPU with a growing run queue is a problem, even at a lower utilization. Same with memory: 95% used is utilization, while swapping is saturation.

BTW: what number should saturation show?

Usually not a percentage, but a count of work waiting: a queue length, a wait time, or a rate like swaps per second. Healthy is zero, or small and steady. A short burst of a few waiting requests is normal, and some resources are built to queue a little (a fast SSD works better with a few requests in flight). What I watch for is a queue that stays up or keeps growing, because that means work is arriving faster than it gets done, and it won't fix itself.

Side by side

RED (requests)USE (resources)
FocusUser experience and workloadInfrastructure health and limits
MeasuresRate, Errors, DurationUtilization, Saturation, Errors
Applies toAPIs, microservices, HTTP and gRPC endpointsCPU, memory, disks, network, thread pools, connection pools
PerspectiveOutside in: are users having a bad time?Inside out: is something the bottleneck?
Example metricsRequests per second, 5xx count, p99 latencyCPU %, run queue, swap activity, disk I/O wait

When to measure which

Requests (RED) when I'm watching a service do its job. If error rate or duration goes up, users feel it right away. Because every service gets the same three metrics, every service dashboard looks alike, which makes it quick to compare them. (Following a single request across services is a different tool, tracing, which I covered in my tracing vs dashboards post.)

Resources (USE) when I'm watching the boxes and pipes underneath the code. Anything with a clear limit counts: hardware like CPU and RAM, and software limits like database connection pools or file descriptors. This is where I catch problems before users do, like a disk that's quietly filling up while every request still looks fine.

USE versus RED

I assumed a real issue would set off both. In a big outage it does, but plenty of incidents show up on only one side, at least at first.

USE fires, RED is quiet: the silent killer

The infrastructure is in trouble, but users haven't noticed yet.

  • Example: a memory leak starts pushing a service into swap, or a background job keeps the CPU run queue long.
  • Why RED looks fine: requests are still getting through, maybe a little slower, so errors and duration stay normal.
  • What to do: this is a ticket, not a page. It's a warning to scale out or fix the leak before it turns into an outage.

RED fires, USE is quiet: the ghost outage

Users are having a terrible time, but the servers look healthy and idle.

  • Example: a deploy ships a bad config, or a third-party API the service depends on goes down. Requests start returning 500s or timing out.
  • Why USE looks fine: if the app fails fast, it does almost no work, so CPU, memory, and disk drop. The servers are practically asleep while the product burns.
  • The nuance: if the app is waiting on the slow dependency instead of failing fast, its thread pool or connection pool fills up. Those are resources too, so a USE dashboard that includes pools often shows exactly what's stuck.
  • What to do: this is a page. If RED is broken, users are affected, no matter how happy the CPUs look.

How I'd triage

So instead of expecting both to fire together, I use RED as the trigger and USE as the diagnostic tool.

  1. Page on RED. The alerts that wake someone up are on errors and p99 latency, because those are what users feel.
  2. Size the blast radius on the RED dashboard. How many users? All endpoints, or just one?
  3. Find the cause on the USE dashboard. Is one node saturated? Did a connection pool run out?

USE alerts still exist, they just open tickets. The exception is a resource about to hit a hard limit soon, like a disk that will be full in a few hours, which is worth a page before it becomes a RED problem.

Takeaway

RED tells me whether users are OK. USE tells me whether the machines are OK. They don't always agree, and that gap is useful: page on RED, ticket on USE, and when a page comes in, start on the RED dashboard and pivot to USE to find the cause.