Explain like I'm five · SRE

What is Service Discovery?

Service discovery, told as a story about a sign that always shows which booths are open right now.

No.1No.2No.3the map says booth 2 is open...?booths open and close, and not knowing which is which means lining up at a closed one

Booths open and close, and not knowing which is which means lining up at a closed one.The paper map says booth 2 is open — but it isn't anymore.

two more just openedthe paper still says only three...the count changes on its own, and a paper map goes stale fast

The count changes on its own, and a paper map goes stale fast.Two more just opened, and no one updates the paper in time.

SIGNNo.1 — openNo.2 — openNo.3 — removedNo.4 — just joined!No.1No.4 (new)every time a booth opens or closes, it registers or erases itself on the signso everyone just has to check the latest sign

Every time a booth opens or closes, it registers or erases itself on the sign.So everyone just has to check the latest sign.

Register itself when it opens"I'm open"
Erase itself when it closesor drops out via a health check
Others just read the signno need to go looking around
Keep more than one signthe sign itself can go down too
SIGNNo.1No.2No.4 (new)rides look at the sign too, to find each other

Rides look at the sign too, to find each other.Not just guests — rides find one another through the sign as well.

SIGNNo.2 — openjust closed, but the sign still says "open"a wasted trip — pair it with health checks to stay accurate

If the sign still says "open" right after closing, it's a wasted trip.Pairing it with health checks is what keeps the sign accurate.

In one breath

Service discovery = having each booth register and erase itself on the sign the instant it opens or closes, so everyone only ever needs to read the latest sign. A wrong sign means a wasted trip, so it's paired with health checks.

A mechanism where servers (service instances) register and deregister themselves as they scale up and down, in a registry other services or load balancers can always query for the current list. It's sometimes built on DNS, and becomes essential once paired with autoscaling.

When grown-ups say it

Service discovery
The whole system behind a sign that shows what's open right now. Essential wherever the number of booths keeps changing.
Registry
The actual sign where the booth list is written. Everyone only has to check this one place.
Register / deregister
What a booth does to itself when it opens or closes. No one writes it for you — it writes and erases itself.
Health-check integration
Confirming a booth is truly alive, and fixing the sign accordingly. Trusting registration alone can leave a stale sign behind.
DNS-based discovery
Finding things by a name tag, like the town directory. Same idea as the town directory. → the town directory
Relation to autoscaling
Its partnership with the thing that adds and removes booths automatically. Since the count changes automatically, the sign has to keep up automatically too.
Load balancer
The usher who decides which booth to send a guest to. It reads the sign to decide where to send each guest. → the queue usher
Service mesh
The system that manages the paths rides take between each other. Service discovery is one part of finding that path.
Next story
The Operations Center That Decides How Many to Run →
Want another term as a picture book? Request →