API Performance & Profiling
Measure API latency and throughput under load, find the real bottleneck with profilers and query analysis, verify that a fix helped, and keep the service responsive when demand exceeds capacity.
4 objectives 6 steps about 145 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- State a performance goal in latency percentiles and throughput, and run a reproducible load test that reports p50, p95, p99 and error rate.
- Locate a bottleneck with a profiler, database query timings and pool or worker saturation metrics instead of guessing.
- Apply one targeted fix (query or index change, pool or worker sizing, payload reduction, caching or moving work to a job) and record before-and-after results.
- Protect a service from overload with per-client rate limits that answer 429 with Retry-After, caps on concurrent in-flight work, and load shedding that keeps health checks and critical routes responsive, and demonstrate it with a load test past capacity.
Lesson plan
6 steps, about 145 min · 5 of 5 lessons available so far
- Percentiles, Throughput and Little's Law Concept · 20 min
- Lab: A Reproducible Load Test Lab · 30 min
- Profiling a Slow Endpoint Worked example · 25 min
- Targeted Fixes and Overload Guards Concept · 25 min
- Lab: Prove the Fix, Then Push Past Capacity Lab · 30 min
- Check: Diagnose from the Numbers Knowledge check · 8 questions
Practise it
Load-test the three busiest endpoints of your service with Locust against a seeded database, profile the slowest, apply one fix, then add a per-client rate limit and a concurrency cap and push the load past capacity; write a one-page report with before-and-after p95 latency and throughput, the evidence that located the bottleneck, and proof that excess requests got 429 or a fast 503 while admitted requests stayed within budget.
References
Hard prerequisites
None.
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.