ServiceRegistry
ServiceRegistry is a component used in distributed systems to track the availability and location of service instances. It enables service discovery by maintaining a registry of active services and their endpoints, allowing clients and other services to locate and communicate with them dynamically rather than relying on fixed configuration.
A typical registry provides registration and deregistration, heartbeat-based health checks, and status updates. Each service instance
Architectural patterns: in client-side discovery, each service fetches registry data and chooses an instance to call;
Common implementations include Netflix Eureka, Consul, Apache Zookeeper, etcd, and Kubernetes-native components that expose service endpoints
Trade-offs involve balancing consistency, availability, and partition tolerance (the CAP considerations) and ensuring secure access and