Microservices Service Discovery and Registry 2 — Questions and Answers
Question 1: In client-side service discovery, which component is responsible for selecting a specific service instance to call?
- The service registry
- The client itself (Correct answer)
- A central load balancer
- The API gateway only
Correct answer: The client itself
In client-side discovery the client queries the registry and applies load-balancing logic to pick an instance.
Question 2: What is the main drawback of client-side service discovery?
- It requires a dedicated DNS server
- Discovery logic must be implemented in every client (Correct answer)
- It cannot use a service registry
- It only works with synchronous calls
Correct answer: Discovery logic must be implemented in every client
Each client must embed discovery and load-balancing logic, often per language/framework.
Question 3: In server-side service discovery, where does the client send its request?
- Directly to a chosen instance
- To a router or load balancer that queries the registry (Correct answer)
- To the registry first, then the instance
- To a DNS cache only
Correct answer: To a router or load balancer that queries the registry
The client calls a router/load balancer, which consults the registry and forwards the request.
Question 4: Which AWS feature is a common example of server-side service discovery?
- Elastic Load Balancer with target groups (Correct answer)
- S3 bucket policies
- CloudFront edge caching
- IAM roles
Correct answer: Elastic Load Balancer with target groups
An ELB routes requests to registered targets without the client knowing instance addresses.
Question 5: A benefit of server-side discovery over client-side discovery is that:
- It eliminates the need for any registry
- Discovery logic is centralized and abstracted from clients (Correct answer)
- It guarantees zero network latency
- Clients no longer need network access
Correct answer: Discovery logic is centralized and abstracted from clients
Centralizing discovery keeps clients simple and language-agnostic.
Question 6: Which tool is commonly used as a dedicated service registry in microservices?
- Redis Pub/Sub
- Netflix Eureka (Correct answer)
- Apache Kafka
- Nginx static config
Correct answer: Netflix Eureka
Eureka is a purpose-built service registry from the Netflix OSS stack.
Question 7: What information does a service typically provide when registering with a registry?
- Only its name
- Network location (host/IP and port) and metadata (Correct answer)
- Its source code
- The full request payload
Correct answer: Network location (host/IP and port) and metadata
Instances register their address, port, and metadata so callers can locate them.
In client-side service discovery, which component is responsible for selecting a specific service instance to call?