Back to case studies
2024-2025Solo / contract-style work

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.

Throughput
~1.6k -> ~8.2k RPS
Latency
p95 about -70%
Scope
Benchmark profile
Measured backend work

Baseline first, then one bottleneck at a time.

The numbers are framed as a repeatable benchmark profile, not as a vague production promise.

1Created a baseline before changing code
2Removed serial waits and repeated dependency calls
3Added cache strategy, connection reuse, and clearer validation
Role

Python Backend Developer

Stack
PythonFastAPIasyncioPydanticRedis
Problem

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.

Solution

Built a benchmark profile, isolated slow dependencies, changed the request path around async I/O, connection pooling, caching, and clearer validation.

Impact

In the repeatable benchmark profile, throughput moved from about 1,600 to about 8,200 RPS and p95 latency dropped by about 70%.

What I did
  • 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.
What it shows
  • 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.
Related work

More projects

2025-2026

nnzen model catalog

Solo

A live LLM catalog that collects model data, normalizes it, and makes model comparison faster.

PythonFastAPILLM APIsRAGVector DB / pgvector
2025

MCP core for an LLM assistant

Solo

Backend core for an LLM assistant with plugin execution, hot reload, tool chains, and explicit context handoff.

PythonFastAPIMCPTool callingLLM APIs