The cache expired at noon and the database fell over at 12:00:01. A lock, a two-tier expiry, jittered TTLs, and versioned keys — in that order of importance.
dispatch(function () { … }) is convenient and works by serialising the closure with a signature, which has consequences worth knowing before it is used anywhere important. The…
Testing that a controller queued something by starting a worker and waiting is slow and flaky; testing it by reading the queue table couples the test to the…
Wrapping a handler in a transaction inside the handler means every handler repeats it, and the one that forgets is the one that leaves half a write. Ordering…
Two deployables writing the same tables is one service with extra steps. Deciding who owns them is the whole decision, and the intermediate state lasts.
A job class that knows which queue it belongs on has made a deployment decision at the point of definition, and changing it means editing the class. Unrouted…
A long-running process alongside the web application — a queue consumer, a scheduler — is a first-class concept here rather than a separate supervisor configuration. The cancellation token…
BLPOP is atomic and destructive, so a consumer that crashes between popping and finishing has lost the message with no record that it existed. The * generates an…
A message that fails its retries has to go somewhere, and a dedicated transport plus two commands is a dead letter queue with an operator interface. Being able…