Service discovery lets services find each other's network locations dynamically, instead of hardcoding IPs that change as instances scale up, down, or restart.
Why it's needed
In the cloud, instances come and go with autoscaling and failures, so addresses are not stable. A service registry tracks healthy instances.
text
1. Service registers itself ──▶ [ Registry: orders → 10.0.1.7, 10.0.1.9 ]
2. Caller asks registry "where is orders?"
3. Registry returns healthy instances
4. Caller picks one (load-balanced)
