Skip to content
StackDecode
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.

Service BRegistryService Aregister B at 10.0.0.7:8080
  • 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

  1. 1Instance starts and registers
  2. 2Registry tracks health
  3. 3Caller asks for a service
  4. 4It gets a healthy address

Where it is used

Dynamic container environments.

Watch out for

Stale registrations send traffic to dead instances.

Related