Quick revision
The short answer
The USE method checks every resource for Utilisation, Saturation and Errors, such as CPU, memory, thread pools, connection pools, disks and network. The RED method checks every request-handling endpoint and outgoing call for Rate, Errors and Duration. For a slow Spring Boot service we start with RED on http.server.requests to find which endpoints and percentiles got worse, then apply USE to the resources those endpoints use, looking at saturation signals such as hikaricp.connections.pending, executor queue sizes and CPU throttling, and we confirm with a trace of a slow request before changing anything.
What to remember
In this answer, we saw that RED, rate, errors and duration, describes endpoints and outgoing calls and tells us what is slow, while USE, utilisation, saturation and errors, describes resources and tells us why. For a slow Spring Boot service we start with RED on http.server.requests, apply USE to the threads, pools, CPU and memory the slow endpoint uses with saturation signals such as hikaricp.connections.pending, executor queues and CPU throttling, and confirm with a trace before changing anything.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
The USE method checks every resource for Utilisation, Saturation and Errors, such as CPU, memory, thread pools, connection pools, disks and network. The RED method checks every request-handling endpoint and outgoing call for Rate, Errors and Duration. For a slow Spring Boot service we start with RED on http.server.requests to find which endpoints and percentiles got worse, then apply USE to the resources those endpoints use, looking at saturation signals such as hikaricp.connections.pending, executor queue sizes and CPU throttling, and we confirm with a trace of a slow request before changing anything.
Why this question is asked
"The service is slow" is where many performance investigations start, and without a method they turn into guessing: someone raises the heap, someone else adds a cache, and nobody knows what helped. USE and RED are two short checklists that give the investigation a structure. Interviewers ask about them to see whether we approach performance systematically. In this answer, we will explain each method in plain terms, see how they fit together, apply them to a Spring Boot service with real Micrometer metric names, and finish by confirming the finding with a trace.
1A Quick Recap of the Two Methods
RED looks at a service from the outside, the way its callers experience it. For each endpoint or each outgoing call, we ask three things: the Rate, how many requests per second; the Errors, how many fail; and the Duration, how long they take, as percentiles such as p50, p95 and p99 rather than an average. RED tells us what is wrong and where: which endpoint got slower, from when, and for which share of requests.
USE looks at the resources the service runs on. For each resource we ask: Utilisation, how busy it is on average; Saturation, how much work is waiting because it is busy, such as a queue length; and Errors, failures of that resource. Saturation is the key signal, because a resource at 70 percent utilisation can still have work queuing behind it, and queuing is where latency comes from. USE tells us why something is slow.
| Aspect | RED | USE |
|---|---|---|
| Applied to | endpoints and outgoing calls | resources: CPU, memory, pools, disk, network |
| Questions | rate, errors, duration | utilisation, saturation, errors |
| Tells us | what is slow and where | why it is slow |
| Spring example | http.server.requests p99 for /orders | hikaricp.connections.pending |
2RED on the Service's Endpoints
Spring Boot with Actuator and Micrometer records every request in the http.server.requests timer, tagged with uri, method, status and outcome. With percentile histograms enabled, we can chart rate, error rate and p99 per endpoint. We also apply RED to outgoing calls: http.client.requests for RestClient and WebClient calls, and timers around repository methods or database calls.
Suppose this shows that only GET /orders/{id} got slower, its p99 rising from 300 ms to 2.5 seconds at 11:00, while its rate stayed the same and other endpoints are fine. That already narrows the search a lot: it is not the whole JVM, and it is not more traffic. The next question is which resources that endpoint uses.
3USE on the Resources Those Endpoints Use
GET /orders/{id} runs on a Tomcat request thread, takes a database connection from HikariCP, calls a pricing service through an HTTP client pool, and uses CPU and memory. We go through each with the three questions. Utilisation alone can mislead; what matters most is saturation, the signals that work is waiting.
| Resource | Utilisation | Saturation | Errors |
|---|---|---|---|
| CPU | process.cpu.usage | container CPU throttling, run queue | - |
| Heap and GC | jvm.memory.used | jvm.gc.pause time, frequency | OutOfMemoryError |
| Request threads | tomcat.threads.busy | busy = max, accept queue | rejected requests |
| DB connection pool | hikaricp.connections.active | hikaricp.connections.pending | hikaricp.connections.timeout |
| Executors | executor.active | executor.queued | executor rejections |
| HTTP client pool | leased connections | pending acquisitions | connect timeouts |
Notice that some saturation signals are not in the JVM at all. CPU throttling, when a container uses up its CPU quota and is paused until the next period, shows up in container metrics, such as container_cpu_cfs_throttled_periods_total in Kubernetes, and makes a service slow while its CPU usage looks moderate. In our example, hikaricp.connections.pending jumps from 0 to 40 at 11:00 while active connections sit at the maximum of 10: threads are waiting for database connections.
4Confirm With a Trace Before Changing Anything
Metrics show correlations; a trace shows causation for one request. We open a trace of a slow GET /orders/{id} from 11:05 in our tracing tool, with Micrometer Tracing or the OpenTelemetry agent. If the theory is right, it shows a long gap before the first database span, the time spent waiting for a connection, and then short queries. If instead it shows a 2-second span calling the pricing service, our theory is wrong and we look there.
Only after this confirmation do we act, and we act on the cause behind the saturation. Connections are scarce because something holds them longer: a new slow query, a transaction that now includes a remote call, or a lock. Raising the pool size would hide that and might overload the database.
- RED on http.server.requestswhich endpoint, which percentile, since when
- List resources that endpoint usesthreads, pools, CPU, downstreams
- USE on each resourcelook for saturation first
- Trace a slow requestwhere does the time go?
- Trace matches the theory?YesFix the cause, then re-measure REDNoBack to USE with the new clue
5 steps in order. Play them, or step through them one at a time.
5Follow-up questions
Which Micrometer metrics would you put on the first dashboard for this?
For RED: http.server.requests rate, error rate and p50, p95 and p99 per uri, plus http.client.requests per downstream client name. For USE: process.cpu.usage and container CPU throttling, jvm.memory.used after GC and jvm.gc.pause, tomcat.threads.busy against the configured maximum, hikaricp.connections.active, pending, timeout and the acquire timer, and executor.active and executor.queued for any task executors. One row per signal, aligned on the same time axis, makes it easy to see which line moves when latency moves. Tomcat thread metrics need server.tomcat.mbeanregistry.enabled=true in recent Boot versions; check yours.
Why use percentiles instead of averages for duration?
Averages hide the slow tail. If 95 requests take 50 ms and 5 take 4 seconds, the average is about 250 ms, which looks acceptable, while one user in twenty waits four seconds. p95 and p99 show the tail that users actually complain about, and saturation shows up there first.
Is USE only for hardware resources?
No. Anything with limited capacity and a queue works: connection pools, thread pools, semaphores, rate limits on downstream APIs, even a lock. That is what makes it useful for Java services, where software pools are often the real bottleneck.
6Conclusion
In this answer, we saw that RED, rate, errors and duration, describes endpoints and outgoing calls and tells us what is slow, while USE, utilisation, saturation and errors, describes resources and tells us why. For a slow Spring Boot service we start with RED on http.server.requests, apply USE to the threads, pools, CPU and memory the slow endpoint uses with saturation signals such as hikaricp.connections.pending, executor queues and CPU throttling, and confirm with a trace before changing anything.
Open with
RED and USE are two checklists that look at a service from two sides. RED is for things that handle requests: endpoints and outgoing calls. For each I look at rate, errors and duration, with duration as percentiles, not averages.
Then, if they want more
USE is for resources: CPU, memory, thread pools, connection pools, disks, network. For each I check utilisation, saturation, meaning work waiting because the resource is busy, and errors. RED tells me what is slow; USE tells me why.
For a slow Spring Boot service, I start with RED on the http.server.requests metric from Micrometer, broken down by uri, to find which endpoints got slower, at which percentile and since when, and whether traffic or errors changed too. Say only one endpoint's p99 went up while its rate is flat.
Then I list the resources that endpoint uses and apply USE to each, focusing on saturation: hikaricp.connections.pending and acquire time for the database pool, executor queue sizes, Tomcat busy threads against the maximum, GC pause time, and CPU throttling of the container, which can make a service slow at moderate CPU usage.
If pending connections jump when latency jumps, that is my lead. Before changing anything I look at a trace of a slow request to confirm where the time goes, for example a long wait before the first database span. Then I fix the cause, like a slow query holding connections, rather than just raising a pool size, and re-check RED.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Explain the USE and RED methods and how you would apply them to find a bottleneck in a...": https://scrivio-interview-library.netlify.app/spring-boot/service-performance/31bce4fc29/