Advanced Load Balancing Patterns 00:00:01 A release meets its first fifty real requests per second A new checkout version starts with no traffic. Route five percent of a thousand requests each second to it. Predict how many observations a one-minute trial yields. Version 2 runs and nobody uses it. Of 1,000 requests a second 50 go to the canary. After 60 seconds it has seen 3,000. Errors are like those of the old version, so the weight rises. Half and half. Effects on caches and database become visible. Everybody is on version 2. Version 1 stays installed for a day. Setting the canary weight to zero redirects eligible new traffic back to stable as the configuration propagates. Existing connections may still need to drain. Compare errors and latency per version before raising the weight. Three thousand observations can still miss rare failures or problems confined to one customer group. 00:01:00 Two environments share a reversible doorway Keep blue serving the public while green runs the new version. Switch new requests, watch existing connections drain, then ask whether the old version could still read today's database. Green stands ready for the new version. Version 2 is tested in the real environment without users. All new requests go to green. Open connections on blue finish. It stays up, unused. If errors rise, the same switch goes the other way. The database still fits version 1. A routing rollback only works when the old software and its dependencies remain compatible. Plan schema evolution and side effects before calling a color switch reversible. 00:01:43 Stop callers queueing behind a failing dependency Five consecutive failures open the illustrated circuit breaker. While it is open, callers receive a documented fallback. Decide how the system can test recovery without sending every caller at once. Normal operation. Four in a row. Still closed. The fifth failure opens it. Requests get the fallback at once. After the waiting time a few requests may test the service. Three tests succeeded. A small half-open probe set tests the dependency. Thresholds, probe budget and fallback semantics determine what customers experience while the service changes state. 00:02:20 A one-second caller cannot wait fifteen hundred milliseconds A failed request is retried on different servers. Trace the increasing waits and compare their sum with the caller's deadline. Then multiply the offered load by the attempts. Server 1 fails. The retry goes to another server. It fails too. Server 3 answers. The user waited 300 ms more than normal. 400 and 800 ms. All four waits add up to 1,500 ms, so a caller with a 1 second limit has long gone. 1,000 requests a second with 3 retries each become 4,000. Retries may be 20% of requests. The load stays at 1,200. Bound attempts by the remaining deadline, retry safe operations, and use a budget and jitter. Retries can multiply work precisely when the backend has the least capacity. 00:03:14 Mirror a read without changing its real answer Send a shadow copy of a read to the candidate implementation. The stable response reaches the user while the team compares the candidate's behavior. What would a copied write risk doing? The old version serves everybody. Each read also goes to the new version. Its answer is thrown away. Nobody notices. The team reads the logs and repairs it. Writes, and what users do next. For that a canary follows. Suppress external side effects and protect sensitive data in mirrored workloads. A shadow read can test correctness and latency, while user behavior after a new response requires a live experiment.