
System Design Drill Day 11: The Transactional Outbox Pattern
Why writing to the database and pushing to a queue can't be atomic, and how a transactional outbox fixes lost and phantom events.
Csharpcorner MVP |Software Engineer|IOT| Azure|microbit| Web Developer | Udacity Scholar

Why writing to the database and pushing to a queue can't be atomic, and how a transactional outbox fixes lost and phantom events.
How circuit breakers, timeouts and bulkheads keep a checkout alive when the payment gateway or SMS provider starts failing.

Why retries make duplicates inevitable, and how idempotency keys stop double charges and double stock decrements.

How distributed locks work with Redis SET NX EX, why leases and fencing tokens matter, and where locks fit in a checkout.

The main rate-limiting algorithms, how to run them atomically across servers with Redis and Lua, and when to fail open or closed.

How to split a MySQL orders table across shards: choosing a shard key, routing with logical shards, keeping reports off the shards and resharding.

How to go from one Laravel server to three behind a load balancer: algorithms, health checks, stateless servers and safe deploys.

How MySQL read replicas scale reads, why replication lag breaks read-your-writes, and how to handle it in Laravel.

Why slow work belongs on a queue, what at-least-once delivery means, and how retries and idempotency keep background jobs safe.
