▲ 7 r/softwarearchitecture+1 crossposts

The 3 AM API Outage: Why Every API Needs a Rate Limiter

Adding more servers during a sudden traffic spike is a trap. I wrote a quick breakdown on why you have to block bad traffic early with a Redis rate limiter, rather than just auto-scaling and waiting for the database to crash.

How do you guys handle bad traffic and rate limiting in production?

medium.com
u/RummanSid1990 — 3 days ago
▲ 0 r/softwarearchitecture+1 crossposts

Everyone thinks URL shorteners are easy to build until they crash

I always thought building a URL shortener was a basic weekend project, but creating the link is the easy part. The real issue is when a link goes viral and your database gets overwhelmed by read traffic. 


I wrote this breakdown on how to survive heavy traffic by separating read/write traffic, handling database collisions, and stopping cache stampedes. 


Would love to hear how you all handle database bottlenecks like this!
medium.com
u/RummanSid1990 — 7 days ago