Puneet Agarwal·Jun 26Geospatial caching is a quantization problem in disguise“Every search is unique, so we can’t cache it” is the most expensive sentence in location search. It’s also wrong. Here’s how to make a…
Puneet Agarwal·Jun 25Back-of-the-Envelope Capacity Math (and When to Cache): A Field Kit for System Design InterviewsMost candidates freeze when an interviewer says “so how many servers do you need?” — not because the math is hard, but because they have no…
InLevel Up CodingbyPuneet Agarwal·Jun 24Postgres or Elasticsearch? A Decision Framework That Actually Holds Up in InterviewsMost candidates reach for Elasticsearch the moment they hear the word “search.” That reflex is exactly what loses points. The senior move…
Puneet Agarwal·Jun 24Elasticsearch for System Design Interviews: A Principal Engineer’s Mental ModelEverything you need to reason about full-text search at scale — the inverted index, cluster anatomy, scaling math, and the six failure…
Puneet Agarwal·Jun 20Scaling Writes, the Staff-Engineer Way: Why Copies Don’t Help and What DoesPart three of the scaling series. Reads scaled by making copies — replicas, caches, more places to serve the same data. Writes break every…
Puneet Agarwal·Jun 16Scaling Reads, the Staff-Engineer Way: Replicas, Sharding, and the Cache Problems Nobody ExplainsThis is part two. Part one covered indexing — turning O(n) scans into O(log n) tree walks. This piece covers everything after you’ve…
Puneet Agarwal·Jun 15Database Indexing, Way: When to Add One, When to RefuseMost “scaling reads” guides teach you what an index is. That’s the L5 answer. The L6 answer is knowing exactly when an index costs you more…
Puneet Agarwal·Jun 14Workflows, Durability, and the Two Questions Every Multi-Step System Must AnswerSaga taught us how to undo failures. But what happens when a step takes 6 hours and your server gets redeployed in the meantime?
InLevel Up CodingbyPuneet Agarwal·Jun 12Distributed Transactions Demystified: 2PC, Saga, and Distributed LocksThree patterns every backend engineer needs to know — when to use each, when to avoid each, and what breaks in production.
Puneet Agarwal·Jun 10The Job Queue Problem: How to Stop Workers from Stepping on Each OtherEvery backend system has a job queue. Most engineers get the happy path right. The concurrency, crash recovery, and stuck job handling…