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.
July 18, 2026Caching Strategies: Cache-Aside, Write-Through, and Write-Back5 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, and write-back diverge — each trading latency against staleness risk differently.

#System Design
July 18, 2026The CAP Theorem and Eventual Consistency, Explained5 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. CAP theorem names that choice — and explains why 'eventual consistency' is a deliberate design, not a bug.

#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
July 13, 2026Database Indexing: Why Your Query Is Slow (and How B-Trees Fix It)5 min read

What an index physically is, how B-trees make lookups logarithmic, composite index ordering, covering indexes, and the query patterns that silently refuse to use your index.

#System Design
July 13, 2026Load Balancing Strategies: From Round Robin to Consistent Hashing5 min read

How load balancers decide where each request goes — the classic algorithms, L4 vs L7, health checks, and the sticky-session problem that pushes state out of your servers.

#System Design
July 12, 2026Consistent Hashing: Scaling Without Reshuffling Everything4 min read

Why `hash % N` falls apart the moment you add a server, and how consistent hashing moves only a fraction of your keys when the cluster changes.

#System Design
July 6, 2026Building an LRU Cache From Scratch4 min read

Why the classic interview question is really a lesson in composing data structures — with an animated walkthrough and two working implementations.

#DSA#System Design
July 6, 2026Rate Limiting Algorithms: Token Bucket, Windows, and Their Trade-offs5 min read

How APIs decide who gets throttled — token bucket, fixed and sliding windows, animated demos of each, and what changes when the limiter goes distributed.

#System Design
July 6, 2026WebSockets vs SSE vs Polling: Choosing a Real-Time Strategy4 min read

Four ways to get server data to the browser without a refresh — animated message flows for each, and a decision guide drawn from building live-data UIs.

#System Design
September 22, 2024How to Create Your First Micro-Frontend Using NextJS8 min read

Build a micro-frontend architecture with Next.js multi-zones: rewrites, assetPrefix, cross-zone navigation, shared auth, deployment, and the pitfalls nobody mentions.

#System Design