System Design
11. Microservices ArchitectureAnimated
Service Discovery
Finding where a service is running.
The idea
Instances register with a registry and clients look up healthy addresses dynamically.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
On start, B tells the registry where it lives.
- step:
- 1/6
- from:
- Service B
- to:
- Registry
1/6
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1Instance starts and registers
- 2Registry tracks health
- 3Caller asks for a service
- 4It gets a healthy address
Where it is used
Dynamic container environments.
Watch out for
Stale registrations send traffic to dead instances.