โ Backend Performance & Scaling learning pathBackend Performance & Scaling ยท Module 2 of 8
Profiling and finding bottlenecks
Measure before you optimise.
๐ Key ideas
- A bottleneck is the slowest part that limits the whole system: CPU, memory, disk, network or the database.
- Profilers show which functions use the most time; tracing shows where time goes across services.
- Add timing logs or metrics around database calls and external APIs.
- Optimise the biggest cost first; speeding up a 2 ms step does not fix a 2 s request.
- Keep a before-and-after measurement for every optimisation.
๐ก Real-life example: Finding a bottleneck is like finding why traffic is slow on a highway: widening every road does nothing if one narrow bridge is the real problem.
BottleneckThe slowest part that limits overall speed
ProfilerTool that shows where program time is spent
Distributed tracingFollowing one request across many services
MetricA number measured over time, such as latency