Design service discovery with health checks, metadata tags, and watch APIs for clients. Support DNS and HTTP APIs with consistent caching semantics.
Functional requirements
- Register/deregister instances with addresses and metadata
- Health checks (HTTP/TCP) with grace periods
- Watch/stream changes to service instances
- Tag-based routing (version, region, zone)
Non-functional requirements
- Highly available control plane
- Low staleness for instance lists
- Protection against registration storms