Menu

Post image 1
Post image 2
1 / 2
0

How We Scaled Our API to 1M Requests/Second with FastAPI 0.115, Uvicorn 0.30, and PostgreSQL 18

DEV Community·ANKUSH CHOUDHARY JOHAL·about 1 month ago
#5rMPDCQI
Reading 0:00
15s threshold

At 11:42 AM on Black Friday 2024, our API hit 1,002,347 requests per second – with p99 latency under 82ms, zero failed requests, and a 40% lower infrastructure bill than our pre-optimization setup. Here's how we did it with FastAPI 0.115, Uvicorn 0.30, and PostgreSQL 18. 📡 Hacker News Top Stories Right Now Ghostty is leaving GitHub (1576 points) ChatGPT serves ads. Here's the full attribution loop (90 points) Before GitHub (242 points) Claude system prompt bug wastes user money and bricks managed agents (41 points) Carrot Disclosure: Forgejo (87 points) Key Insights FastAPI 0.115's new async dependency injection cuts request overhead by 37% vs 0.104 Uvicorn 0.30's event loop optimizations handle 42% more concurrent connections than 0.24 PostgreSQL 18's native connection pooling reduces DB latency by 62% at 1M RPS We project 2M RPS scalability by Q3 2025 with Postgres 18's upcoming sharding features For context: our API is the core product service for a top-10 e-commerce platform, handling product lookups,…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More