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.→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.
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.
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.
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.
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.
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.
Why the classic interview question is really a lesson in composing data structures — with an animated walkthrough and two working implementations.
How APIs decide who gets throttled — token bucket, fixed and sliding windows, animated demos of each, and what changes when the limiter goes distributed.
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.
Build a micro-frontend architecture with Next.js multi-zones: rewrites, assetPrefix, cross-zone navigation, shared auth, deployment, and the pitfalls nobody mentions.