Article 07
Find the bottleneck before scaling: when cache, queues, CDN and instances help
Trace requests from browser to database and external services so the constrained layer is fixed instead of guessing with more resources.
Example situation
Start with the people using the system
More app servers, same slow system
The team added instances because application CPU was high, but every request waited on the same unindexed query and a full connection pool. Scaling the wrong layer increased cost without improving response time.
Summary for business and everyday users
Find the bottleneck before scaling: when cache, queues, CDN and instances help
Start from traces and metrics, not a technology choice.
Cache, queues, CDN and horizontal scaling solve different problems.
Every optimization needs before/after evidence and a fallback for dependency failure.
Interactive explanation
See how the stages connect before reading the detail
Select a stage to understand what happens, what evidence to inspect and how one decision affects the next stage.
Step 01 / 03
01 / Request path
Break time down by layer
Start with DNS/CDN, network, web/app, API, cache, database and external services. Use trace IDs to connect logs and metrics for one request and find where waiting occurs. Aggregate CPU alone is insufficient.
Evidence to inspect
- Browser and network timing
- Per-endpoint API duration
- Database queries and locks
- Cache hit/miss
In-depth explanation
Work through each issue in real operating context
Each section connects business impact with what a Tech Lead needs to inspect, including examples, evidence and constraints.
01 / Request path
01Break time down by layer
Start with DNS/CDN, network, web/app, API, cache, database and external services. Use trace IDs to connect logs and metrics for one request and find where waiting occurs. Aggregate CPU alone is insufficient.
- Browser and network timing
- Per-endpoint API duration
- Database queries and locks
- Cache hit/miss
- Queue depth and age
- External API timeout/error
02 / Match the pattern
02Each technique moves or divides work differently
CDN shortens static delivery, cache avoids repeated work, queues move non-immediate work out of the request path and more instances divide stateless work. None automatically fixes bad queries, locks, slow dependencies or unsuitable data models.
03 / Failure path
03Good scaling includes component failure
Define timeouts, retry limits, idempotency, rate limits and graceful degradation so one dependency does not create a retry storm. Queues need dead-letter handling; caches need clear invalidation and fallback.
Retry only safe operations with exponential backoff and jitter; data-creating transactions need idempotency keys.
Checklist before action
Use request tracing
Separate layer metrics
Prove the bottleneck
Define before/after
Design timeout/retry
Test dependency failure
References
Figures and examples create a discussion framework. Validate them against the real system and its constraints before deciding.
- Reviewed by
- SIS Engineering
- Last reviewed
- 2026-07-17
Not sure where to start the review?
Use a preliminary tool or share the system context with SIS so the highest-priority work can be identified.