Amazon ElastiCache 00:00:01 A price lookup misses the cache A retailer puts Amazon ElastiCache in front of its product database. A price lookup misses. Which component owns the official price, and which merely helps another buyer see it sooner? The app asks the cache. The key is not there. 20 milliseconds later the row is here. It is stored for 300 seconds. The next reader gets it in about a millisecond. The database sees nothing. The price changes: database first, then the key is deleted. The times and lifetime in this example are illustrative. A cache-aside design must define how a changed price becomes visible and what the application does if the cache is unavailable. 00:00:46 Which shard owns a cart? For this example use a cluster-mode Valkey or Redis OSS deployment. A client maps a key to a hash slot and routes it to the responsible shard. A plain key is hashed as a whole and maps to one slot. A key containing the illustrated hash tag uses the tag's contents to select its slot. In Redis Cluster, a key with the same hash tag, forty-two inside braces, maps to the same slot. Operations that require a single slot can include both keys. During resharding a cluster-aware client can receive a redirection and learn the slot's new owner. A hash tag can bring related keys together for one operation. A popular shared tag can also send too much work to a single shard, even when the rest of the cache looks idle. 00:01:39 A replica takes over with an older count Now examine a replication group using asynchronous replication. Stock moves from eight units to seven. The primary accepted the update, but the replica may still show eight when the primary fails. Both nodes have stock 8. The primary stores 7 and says OK. The copy is still on its way. The primary is gone, and the 7 with it. Connections break. The replica becomes the primary. The endpoint name points to it. A new replica is built in zone A. The lost write stays lost. Read the exact durability contract of the chosen engine and configuration. An asynchronously replicated cache is a risky sole authority for inventory that must never be oversold. 00:02:27 The database inherits every miss Through a warm cache the origin handles only five hundred reads per second. The engineering team rehearses a complete cache loss. The database now receives requests it has not been provisioned to absorb. The database sees 500 a second. All reads miss. The database gets five times what it can do. The app lets at most 1,500 a second through, joins equal misses and refuses the rest politely. Replicas in different availability zones can preserve a warm copy across some failures. They cannot guarantee a warm cache after every logical error or widespread outage. Use miss coalescing, bounded admissions, protection for essential lookups and gradual warmup. Replicas across failure boundaries reduce the likelihood of the scenario, but do not remove the need to rehearse it. 00:03:19 One hot value ignores your fleet average A promotion sends most readers to one item. More shards distribute other keys but cannot divide an individual cached value across them automatically. The key lives on one shard, so the others stay idle. Twenty application servers each keep a copy for one second in this exercise. Local reuse cuts requests for the hot key while introducing an additional freshness window. A later product read can still hit the shared cache without touching the database. Track both local and shared hits so you know which layer absorbed the traffic. Look at one key, one shard and the authoritative store. A cache improves response time when those three layers share a workable freshness, capacity and recovery contract.