๐ชง Amazon Route 53: cheat sheet
๐จ The analogyThe city information kiosk that tells visitors which branch of your shop to go to, following your rules.
๐ The regular explanationAWS's authoritative DNS service. Hosted zones hold your records, alias records point names (even the bare domain) at AWS resources, routing policies choose which answer each query gets, and health checks take failed endpoints out of the answers.
- Bloom registers its name and gets a binder at the kiosks on Market Square. The binder starts with two cards about itself, and Bloom adds a card with the Old Town address.
- Mia asks her hotel front desk where Bloom is. The front desk checks the city name register, which says to ask the kiosks on Market Square.
- The front desk asks the kiosk. The kiosk reads the card in Bloom's binder and gives the Old Town address, and the front desk passes it on to Mia.
- Mia walks to the Old Town branch. The front desk keeps a sticky note with the address, so the next guest gets it without asking the kiosk.
- Bloom keeps two binders under the same name. The public one gives the order office's front door, the staff one gives its back door inside the yard.
- A visitor asks the square kiosk for the order office. The kiosk reads the public binder and gives the front-door address.
- A worker in the yard asks the same question at the yard help desk, which reads the staff binder and gives the back-door address.
- The stockroom is only in the staff binder. A visitor who asks the square kiosk for it is told there's no such place.
- The owner tries to put an "ask about Market Hall instead" card on the front page. The kiosk refuses, because that page already holds the binder's own cards.
- Instead the owner adds an alias card, "wherever the market hall's entrance is today". That one is allowed on the front page.
- The front desk asks about Bloom. The kiosk already knows where the market hall's entrances are today, so it hands back real street addresses in one go, free of charge.
- The market hall moves an entrance and tells the kiosk. Nobody touches Bloom's card, and the next answer already has the new address.
- The kiosk uses shares. Nine visitors in ten get the west branch and one gets the new trial branch, wherever they come from. This time Kenji is the one in ten.
- Now the rule is the quickest trip. Ana gets the west branch and Kenji the east branch, because those are fastest to reach from where each of them is.
- Now the rule is by district. Visitors from the east district always get the east branch, which has staff who speak their language. Ana's district has no card, so she gets the "for everyone else" card.
- Now the rule is a short list. Ana gets both open branches at once and picks one herself.
- Every half a minute the inspectors ring the main branch, and it answers. So the kiosk gives the main branch's address.
- The main branch has a power cut. The inspectors ring and ring, and nobody picks up.
- The inspectors tell the kiosk, and from now on it gives out the backup branch's address instead.
- Power comes back and the main branch answers again. The inspectors let the kiosk know, and it switches back to the main branch.
- The guest asks the front desk, which asks the kiosk. The answer comes on a note marked good for five minutes, the front desk keeps it, and the guest walks to the main branch.
- The main branch closes and the kiosk switches to the backup straight away. But the front desk still has its note, so the next guest is sent to the closed branch.
- The note runs out. The front desk asks the kiosk again and gets the backup branch, on a note Bloom marked good for just one minute. The guest finally gets served.
- Some guests copy the address onto their hand and keep using it. Asking them to wash it off after half a minute means they go back to a closed branch for half a minute at most.
๐งฉ Key questions
- Bloom wants its plain name, with nothing in front, to lead to its counters in the city-run market hall, whose entrances move now and then. Which card should go on the binder's front page?
- An alias card that has the kiosk look up the hall's entrance each time. A redirect card isn't allowed on the front page, and a written address goes stale when the hall moves its entrances. The alias card is allowed there and always gives the current address.
- The main branch closes. The inspectors noticed and the kiosk now gives the backup's address, yet some guests are still sent to the closed branch for a few minutes. Why?
- Front desks and guests are still using the address on notes they wrote earlier. The kiosk switched straight away, but every note lasts until its time runs out. Short notes, and guests who don't keep copies for long, make the switch quicker.
- Bloom uses the by-district rule, with cards for the east and west districts only. What happens to a visitor from the north district?
- They're told there's no answer, so add a "for everyone else" card. The district rule doesn't guess. Without a card for everyone else, visitors from districts with no card get nothing.
- A worker in the staff-only yard needs the back-door address of the order office. Why can't a visitor on the square get that address too?
- The staff binder only answers questions from inside the yard. The staff binder sits at the yard help desk, and the square kiosk only has the public binder.