all work
backend engineeringmarketplace2024
Cutting a core API’s p95 without a rewrite.
A marketplace’s core API had grown slow and unpredictable as the data grew. Rather than the rewrite everyone dreaded, we profiled it, fixed the paths that mattered, and left it faster and easier to reason about.
the challenge
The main API had gotten slow enough to lose sales, and the team assumed the fix was a ground-up rewrite they could not afford to take on. Nobody could say which queries were actually the problem.
what we did
- 01Instrumented the hot endpoints with traces so the real cost showed up instead of being guessed at.
- 02Fixed the N+1 queries and missing indexes that accounted for most of the tail latency.
- 03Added a caching layer with sane invalidation for the reads that dominated traffic.
- 04Left behind dashboards and a short runbook so the team can spot the next regression themselves.
the outcome
- p95 latency on the core endpoints fell by [METRIC].
- The feared rewrite was taken off the roadmap - the existing service was enough once it was legible.
- Error rates under peak load dropped by [METRIC] over [TIMEFRAME].
Bracketed values are placeholders until this study is cleared to publish.