Full lesson
Explore the full explanation, examples, and visuals at your own pace.
Illustrative numbers
We scaled from two Pods to eight, and response time stayed stuck near 480 milliseconds. At eight Pods it even crept up to 520. These numbers are illustrative, but the pattern is real. The slow part of the request lives somewhere other than the Pods.
Chart values
| Pods running | Response time (ms) |
|---|---|
| 2 Pods | 480 |
| 4 Pods | 470 |
| 8 Pods | 520 |
The shop app request path
Here's our shop app. A browser sends an HTTP request to a Kubernetes Service, which load balances it across two Pods. Each Pod runs the app code, then sends an orders query to one shared Postgres database. Every request ends up in that same place.
Where one request's 480 ms goes
Look at where the time goes. Out of 480 milliseconds, 400 is the database query. The Pod's own app work is just 50, and network is 30. Pods only own that small slice, so adding more barely changes the total.
Chart values
| Stage | Time (ms) |
|---|---|
| App work in Pod | 50 |
| DB query | 400 |
| Network | 30 |
When scaling Pods does help
Now flip the situation. Suppose the Pods themselves are the busy part, with CPU near 95 percent and requests piling up. Going from 2 to 4 Pods splits that work, CPU drops toward 50 percent, the queue shrinks, and response time improves.
Many lanes, one database
Pods are copies, but Postgres is shared. Each new Pod is like another checkout lane, so more customers can walk in at once. But every lane leads to the same cashier. More Pods add more callers, and they all still queue at one database.
More Pods, more queued queries
Now look at 8 Pods. Each one fires its own orders query at Postgres, and they all land together. The database has only so much CPU, disk, and connections, so later queries wait behind earlier ones. Connection pools can even hit their limits. Each response gets slower, not faster.
Your Pods sit at twenty percent CPU while Postgres is at one hundred percent. What happens if you double the Pods?
Your Pods sit at twenty percent CPU while Postgres is at one hundred percent. What happens if you double the Pods?
- Responses get roughly twice as fast
- Little change, or responses get slower
- Database load is cut in half
Your Pods sit at twenty percent CPU while Postgres is at one hundred percent. What happens if you double the Pods?
Little change, or responses get slower. The Pods are mostly idle and waiting, so the database is the bottleneck. Doubling Pods sends even more concurrent queries to the same Postgres, which can deepen its queue. Adding Pods does not split database work; it only adds callers.
- Responses get roughly twice as fast
- Little change, or responses get slower
- Database load is cut in half
Find the bottleneck, then fix it
Compare Pod CPU with database load and query time. If Pods are busy, add Pods. If they're idle while the database is busy, fix the database: index the slow queries, cache results, or add replicas.
- Pods busy: add Pods
- Pods idle, DB busy: fix DB
- Index queries, cache, add replicas
Scale where the waiting happens
More Pods add more checkout lanes, but everyone still queues at one database. So before you scale, measure where the time goes. Scale Pods for per-Pod work, and scale the database when that's where the waiting happens.



