5 exercises on service discovery patterns vocabulary.
0 / 5 completed
1 / 5
What problem does service discovery solve in distributed systems?
Service discovery: in dynamic environments instances start, stop, and scale constantly. Hard-coded addresses break. A service registry (e.g., Consul, Eureka, DNS) tracks live instance locations, allowing clients to find them at runtime.
2 / 5
In client-side discovery, who is responsible for choosing an instance?
Client-side discovery: the client fetches the instance list from the registry and picks one (round-robin, least-connections, etc.). This gives flexibility but couples the client to the registry API.
3 / 5
In server-side discovery, what sits between the client and service instances?
Server-side discovery: the client sends requests to a fixed endpoint (load balancer or router) which queries the registry and routes to a healthy instance. The client is decoupled from registry logic.
4 / 5
What is a health check's role in a service registry?
Health check in registry: the registry periodically checks each registered instance. Those that fail are deregistered or marked unhealthy, so discovery only returns instances that can handle traffic.
5 / 5
Why is DNS-based service discovery convenient but sometimes limiting?
DNS discovery: services register as DNS records (A/SRV). It requires no client library and works everywhere. Limitations include TTL caching (stale results) and lack of rich health or weight metadata compared to dedicated registries.