โ Back to Amazon ElastiCache
๐ช Amazon ElastiCache: cheat sheet
๐จ The analogyHiring an agency to run your shop's express counter, staff and standby clerk included, while you choose what it stocks.
๐ The regular explanationAWS's managed in-memory cache, running Valkey, Redis OSS or Memcached inside your VPC, either as node-based clusters you size (with shards, replicas and Multi-AZ failover) or as ElastiCache Serverless that scales itself. MemoryDB is the durable sibling for when the data must not be lost.
- A customer wants blue paint. Omar looks at the express counter first, but there's none there.
- Omar walks to the storeroom, brings the paint back and leaves some on the counter for the next customer.
- The next customer asks for blue paint, and it's handed over from the counter in a blink.
- The counter clerk suddenly drops out. Omar doesn't have to do anything about it; the agency notices.
- The agency sends a fresh clerk, but their shelf starts empty. Omar walks to the storeroom again until it fills back up.
- On a quiet morning, Omar asks the front desk for nails. One clerk behind it is plenty.
- The lunchtime crowd arrives. The agency sees the queue and adds two more clerks by itself. Omar didn't ask for them.
- Omar still talks to the same front desk. The desk passes each request to whichever clerk is free.
- In the evening the shop goes quiet, so the agency sends the extra clerks home, and Omar stops paying for them.
- Omar reads the board at the door. It says which section looks after which item numbers, and he keeps a copy.
- Paint's number belongs to section 1 and nails' number to section 2, so Omar goes straight to each one.
- The shop grows, so the agency opens section 3 and moves some numbers over to it, nails included, while the shop stays open.
- Omar asks section 2 for nails, using his old copy of the board. The clerk says "that's moved to section 3".
- Omar updates his copy of the board and gets the nails from section 3.
- Omar follows the main sign to the main clerk and puts red paint on the counter. The clerk says "done".
- A moment later the standby clerk in the south hall copies it. Customers who only want to look follow the pick-up sign to the standby.
- Omar adds glue, and the main clerk says "done", then drops out before passing the glue on to the standby.
- Within seconds the agency makes the standby the main clerk and turns the main sign. The glue is missing from the counter.
- The agency sends a new standby to the north hall, which copies the shelves, and the pick-up sign points at it.
- Omar keeps loyalty points only at the counter now. He adds five points for Ana, and the clerk writes it in the logbooks in three halls.
- Only once the change is in the logbooks does the clerk say "done". That's why changes take a moment longer.
- The main clerk drops out straight after saying "done".
- The standby reads the logbook, takes over, and still has Ana's five points. Nothing she was told "done" about is lost.
- A stranger from the street tries to reach the counter. They aren't on the guard's list, so they get nowhere.
- Omar is on the list. The guard lets him through, and they agree to use sealed envelopes for every word.
- Omar gives an old password, and the clerk refuses to hand anything over.
- With the right password, the clerk knows who it is, and hands over the paint.
๐งฉ Key questions
- The counter clerk drops out and the agency sends a fresh one with an empty shelf. What should Omar do?
- Fetch things from the storeroom as usual, and leave copies on the counter again. The counter only holds quick copies. The storeroom still has everything, so the shelf fills back up as customers ask.
- Omar's main clerk says done to the glue, then drops out before the standby copied it. What happens after the standby takes over?
- The glue is missing, so Omar fetches it from the storeroom again. The standby copies a moment after the main clerk says done, so the very latest change can be lost. For a counter that's fine.
- Omar wants to keep loyalty points only at the counter, with no copy anywhere else. Which service fits?
- MemoryDB, whose clerks write every change in logbooks in several halls before saying done. More standbys still copy after done, so a change can still vanish. The logbooks make each done stick.
- The agency opens a new section and moves the nails there. Omar asks the old section with his old copy of the board. What happens?
- The clerk says it's moved to section 3; Omar updates his board and goes there. Sections only tell you where to go. Omar keeps his own copy of the board and updates it when told.
- Omar's helpers can't reach the counter at all; their requests just hang. What is the likely cause?
- The helpers aren't on the door guard's list. A wrong password gets a clear no from the clerk. Not being on the list means you never reach the counter at all.