I've started a 25-day series on Scaling and Architecture.
One topic per day.
Day 1: Load Balancing
Day 2: CDN
Day 3: Caching (the 5 layers)
Day 4: Cache Invalidation
Day 5: Rate Limiting
Day 6: API Gateway
Today is Day 7: CAP Theorem.
The most quoted and most misunderstood concept in distributed systems. Most people get it wrong in interviews. I'm going to explain it the way I wish someone explained it to me 10 years ago.
Thread below 👇
Adding a connection pool in your database setup is half the lesson.
The half nobody talks about is capping it and setting a timeout, so an exhausted pool fails fast with an error instead of hanging every request forever.
Fast failure beats a silent freeze.
Your services can be “up” and completely dead at the same time. A situation where there is no crash, no error, no logs. Every request just hangs forever.
I've started a 25-day series on Scaling and Architecture.
One topic per day.
As a Principal Backend Engineer with 12+ years of building systems at scale, I want to break down every concept I wish someone explained to me earlier in my career.
Day 1 was Load Balancing.
Today is Day 2: CDN.
Follow along if you're serious about system design. This will be worth your time.
Because retries can amplify failures instead of fixing them..
Imagine: A → B → C
Service C is down.
If A retries 3 times and B retries 3 times
then a single request can become 3 × 3 = 9 requests
hitting Service C.
Under load:
1000 requests → 9000 downstream requests
Now you've created a retry storm.
Threads get blocked, connection pools fill up, queues grow, and the failure spreads upstream.
Retries alone are not enough.
You typically need:
• circuit breakers
• timeouts
• exponential backoff + jitter
• bulkheads
• graceful degradation
I've been a backend Engineer for 12+ years. Today, I'm a Principal Engineer at Atlassian.
I've designed systems that handle millions of requests. Sat on both sides of system design interviews.
Reviewed more architecture docs than I can count.
Starting today, I'm breaking down the fundamentals of scaling for the next 25 days.
If you're learning system design bookmark this thread, you're going to get a lot of learning from this.