Zeeshan Adil
Book a call

One idea, answered in a minute

Each page answers one question up front, then shows where it bites and what fixes it. The numbers come from the challenges, so you can run every one of them yourself.

What is at-least-once delivery?

At-least-once delivery means the broker keeps redelivering a message until the consumer acknowledges it. The message is never lost, but it can arrive more than once. So the consumer must tolerate duplicates, and exactly-once effects come from an idempotent consumer on top.

What is a cache stampede?

A cache stampede happens when many requests miss the same expired or missing cache entry at the same moment and all recompute it at once. The sudden burst of identical queries hits the database together, can overload it, and turns a brief expiry into a long slowdown or outage.

What is consistent hashing?

Consistent hashing places both keys and servers on the same circle of hash values. A key belongs to the first server clockwise from it. When a server joins or leaves, only the keys in the arcs next to it change owner, instead of almost every key as with hash % n.

What is a fencing token?

A fencing token is a number that increases every time a lock or lease is granted. The protected resource remembers the highest one it has seen and rejects writes carrying a lower one, so a paused holder whose lease has expired cannot overwrite the new holder's work.

What is a hot key?

A hot key is a single key that receives a large share of all traffic. Hashing spreads different keys across servers, never one key, so every request for it lands on one server, and adding servers does not help. Fixes are splitting the key, caching reads, or giving it dedicated capacity.

What is an idempotency key?

An idempotency key is a unique id that the client chooses and sends with a request, so a retry of the same operation can be recognized and not applied twice. The server stores the key together with the result, and answers a repeated key with the stored result instead of acting again.

What is a metastable failure?

A metastable failure is a state where a system stays broken after the trigger that caused it is gone, because a feedback loop inside the system keeps the overload alive. Removing the original cause does not help. The system only recovers when load is cut or the loop is broken.

What is request coalescing?

Request coalescing, also called singleflight, makes concurrent callers asking for the same key share one in-flight call instead of each making their own. The first caller runs the work and the rest wait for its result. It turns a burst of identical requests into a single backend query.

What is stale-while-revalidate?

Stale-while-revalidate is a caching strategy that serves a cached response after its freshness time has passed, while a refresh runs in the background. Readers get an instant answer and the next reader gets a fresh one. It stops at a hard limit, after which the old copy is no longer served.

What is the transactional outbox pattern?

The transactional outbox pattern writes an event to an outbox table in the same database transaction as the state change it describes. A separate relay process later reads the table and publishes the event. The event cannot be lost if the change committed, but it may be published more than once.

What are virtual nodes?

Virtual nodes (vnodes) give each physical server many positions on a hash ring instead of one. Its share becomes the sum of many small arcs, so load evens out, and when a server leaves, its data spreads over several neighbors instead of landing on one.