Blog

Notes on data structures & algorithms, system design, and things I learn along the way.

Learning DSA? Follow the structured path — ordered articles from recursion to dynamic programming.→
September 25, 2026Dual Writes and the Outbox Pattern10 min read

Save the row, then publish the event. Two writes, no shared transaction, and a window where one succeeds and the other doesn't. Why no ordering fixes it, and what does.

#System Design
September 21, 2026Distributed Tracing: Reading the Waterfall4 min read

Logs tell you what one service did. Metrics tell you that something is slow. A trace tells you where the time went across every service a single request touched.

#System Design
September 20, 2026Distributed Locks: Why Your Lock Isn't Holding10 min read

A lease can expire while the client that holds it is still running. Why process pauses break mutual exclusion, what fencing tokens fix, and when you shouldn't be using a lock at all.

#System Design
September 18, 2026Message Queues vs Event Logs: Why Kafka Isn't a Queue10 min read

A queue deletes a message when it's handled; a log keeps it and tracks who has read how far. That one difference decides replay, fan-out, ordering, and how you debug a bad deploy.

#System Design
September 17, 2026The Circuit Breaker: Failing Fast on Purpose10 min read

When a dependency is down, the worst thing you can do is keep waiting for it. Three states, the thresholds that matter, and how a breaker stops one slow service from taking down everything upstream.

#System Design
September 16, 2026Retries, Backoff, and Jitter: How to Retry Without Causing an Outage10 min read

A naive retry loop is a denial-of-service attack you wrote yourself. Exponential backoff, why jitter matters more than the backoff, idempotency, and retry budgets.

#System Design
September 15, 2026Sharding and Replication: Splitting a Database That Outgrew One Box10 min read

Replication copies the same data; sharding splits different data. What each one actually buys you, how routing and failover behave, and the problems sharding creates that you have to live with.

#System Design
July 18, 2026Caching Strategies: Cache-Aside, Write-Through, and Write-Back10 min read

Adding a cache in front of a database is easy. Deciding when the cache gets populated and how writes stay consistent with the source of truth is where cache-aside, write-through, write-back and refresh-ahead diverge. Plus the stale-read race in cache-aside, TTLs, eviction policies, cache layers, and how to tell whether a cache is working.

#System Design
July 18, 2026The CAP Theorem and Eventual Consistency, Explained11 min read

Every distributed database quietly picks a side in a trade-off it can't escape: when the network partitions, you serve either possibly-stale data or an error. What CAP actually says, PACELC and the latency cost the rest of the time, the spectrum of consistency models, quorums, and how eventually consistent replicas converge.

#System Design
July 14, 2026Bloom Filters: Probably in the Set, Definitely Not4 min read

A probabilistic data structure that answers set-membership queries in constant space by allowing false positives but never false negatives — and why Chrome, Cassandra, and CDNs all rely on that trade.

#DSA#System Design

47 posts tagged System Design · page 4 of 5