FastAPI backend performance cleanup
Optimization of a FastAPI API path: async I/O, connection reuse, Redis cache, request validation, metrics, and removal of serial bottlenecks.
Baseline first, then one bottleneck at a time.
The numbers are framed as a repeatable benchmark profile, not as a vague production promise.
Python Backend Developer
A hot API path spent too much time in serial waits and repeated dependency calls. The first step was to measure it instead of guessing.
Built a benchmark profile, isolated slow dependencies, changed the request path around async I/O, connection pooling, caching, and clearer validation.
In the repeatable benchmark profile, throughput moved from about 1,600 to about 8,200 RPS and p95 latency dropped by about 70%.
- Measured the current path before changing the implementation.
- Moved repeatable benchmark throughput from about 1,600 to about 8,200 RPS.
- Reduced p95 latency by about 70% in the same benchmark profile.
- Performance work is easier to trust when the baseline and test shape are written down.
- The best optimization is often removing avoidable waits, not adding clever code.
More projects
nnzen model catalog
A live LLM catalog that collects model data, normalizes it, and makes model comparison faster.
MCP core for an LLM assistant
Backend core for an LLM assistant with plugin execution, hot reload, tool chains, and explicit context handoff.