๐ข Service mesh: cheat sheet
๐จ The analogyA concierge at every flat door who checks badges, retries deliveries and logs every one.
๐ The regular explanationA layer of proxies next to every workload, configured by a central control plane, that gives service-to-service traffic mTLS, retries, timeouts, traffic splitting and telemetry without changing application code.
- The building office sends the same rules to every concierge. Nobody has to tell Ana or Ben anything.
- Ana writes to Ben as she always did, but she just hands the letter to her own concierge. Her concierge walks it over to Ben's concierge in a locked pouch.
- Ben's concierge checks where the letter came from, notes it down and hands it in. Ben reads it like any other letter.
- The reply goes back the same way, concierge to concierge. The office never carried a single letter.
- Ana moves into a new flat. The building office posts a concierge at her door straight away, without anyone asking.
- The office sends the concierge its rules. Now it knows every door in the building and how to reach it.
- The door has been rewired. Ana aims her letter straight at Ben, but it lands with her concierge first, who takes it on to Ben's door.
- The office closes for the afternoon. The concierge keeps working with the last rules it was given, and Ben's reply still comes back.
- Each concierge asks the building office for an ID badge, with its flat's name on it.
- The office checks who is asking and hands out the badges. Each one says which flat it belongs to.
- Before a letter changes hands, both concierges show their badges to each other. Then the letter travels in a locked pouch.
- The office has now sent the strict rule. Someone without a badge walks up to Ben's door with a letter, and the concierge turns them away.
- Badges only last a day. Well before hers runs out, Ana's concierge picks up a fresh one, and letters keep flowing.
- The office sends Ana's concierge a new rule. Take 9 letters in 10 to Ben's old flat and 1 in 10 to his new one.
- Ana keeps writing to Ben as usual. Her concierge takes most letters to the old flat, and now and then one to the new one.
- Nobody answers at door 1. The concierge doesn't stand there forever. It knocks once at door 2 instead, gets an answer and takes it back to Ana.
- Door 1 keeps failing, so the concierge stops knocking there for a while. Letters go to the doors that answer.
- The new flat copes well, so the office sends a new rule and half the letters go there. Door 1 is fixed and back in use.
- Ana's letter goes out with reference number 7 on it, and the concierges carry it to Ben.
- Both concierges write the delivery in the book, with who, how long and whether it worked. Ana and Ben did nothing.
- Ana's letter makes Ben write to Cleo, but Ben forgets to copy the number. The book now shows his letter as a new, unrelated story.
- Next time Ben copies number 7 onto his letter. Now the book tells one story from Ana to Cleo.
- No concierge at Ana's door any more. Her letter goes to the shared desk on her floor, which checks badges and locks the pouch for her.
- Dan lives on the same floor and uses the same desk. One desk serves every flat on the floor, so far fewer people are needed.
- Ben's letters now need splitting between two flats, so the office opens a sorting room for them. Letters to Ben stop there to be read and sorted.
- Ben's reply goes back the same way, through the sorting room and both floor desks, to Ana.
๐งฉ Key questions
- The building office closes for an afternoon. What happens to the letters?
- The concierges keep delivering with the last rules they were given. The office only writes rules. The concierges carry the letters, so they carry on.
- Ana forgets the concierge exists and aims her letter straight at Ben. Why does it still go through her concierge?
- Her door was rewired so every letter in or out lands with the concierge. Nothing changes for Ana. The rewiring sends everything past the concierge.
- When nobody answers at Ben's door, Ana's concierge sometimes knocks again. What must Ben's own letter-handling cope with?
- Getting the same letter twice, without paying twice. The first letter may have arrived even though no answer came back, so a second one can show up.
- Ana's letter makes Ben write to Cleo. What does Ben have to do so the delivery book shows one story?
- Copy the reference number from Ana's letter onto his letter to Cleo. A concierge can't see why Ben wrote, so the reference number has to come from Ben.
- Why would a building swap a concierge at every door for one shared desk per floor?
- Far fewer people to pay, and a sorting room only where letters need reading. The floor desk still checks badges and locks pouches. Only the extra sorting moves to a room used when needed.