Backend
11 guides tagged “Backend”.
- Dead Letter Queue vs Retry: When to Use Each (and When to Use Both) Your message failed. Should you retry it or send it to a dead letter queue? Here's the decision framework, the patterns, and why you usually need both.
- What Is the Outbox Pattern? Writing to the database and sending a message are two operations that cannot both be atomic. The outbox pattern makes the message a database row first, then delivers it reliably.
- What Is Memoization (and When Does It Actually Help)? Memoization caches a function's results by its arguments so repeat calls skip the work. Learn when it's a huge win and when it's wasted effort.
- What Is a Distributed Lock? A distributed lock gives one process exclusive access to a resource across machines. It is easy to implement badly and hard to get right, so here is what it guarantees and where it fails.
- How to Build a Background Job Queue Move slow work out of request handlers: a background job queue with a worker, retries, and a dead letter path. Redis + Python example.
- Cache Invalidation Explained Stale data is the price of caching. Here are the strategies that keep it bounded — TTL, write-through, purge on write, versioned keys — and how to choose between them.
- What Is a Database Transaction (ACID)? A transaction groups database operations so they all succeed or all roll back. Learn ACID, why transfers need it, and how to use it in code.
- Why Should Servers Always Use UTC? Servers should store and log time in UTC so logs, timestamps, and schedules agree across machines and time zones. Learn why and how to switch.
- What Is an ORM (and When Should You Use Raw SQL)? An ORM maps database tables to objects so you write queries in your language. Learn what it hides, what it costs, and when raw SQL is the right call.
- What Is a Saga Pattern (and How Is It Different From Two-Phase Commit)? Sagas coordinate a multi-service operation through local transactions and compensating actions; two-phase commit uses a coordinator that blocks. Which one fits depends on consistency needs.
- How to Version an API A practical versioning process: choose a scheme, make additive changes without breaking clients, deprecate on a schedule, and prove the contract with tests.