QuizzesService Discovery — Concept Check
intermediate
system-design

Service Discovery — Concept Check

Questions on Service Discovery. Service discovery enables services to find each other dynamically in a microservices environment where instances scale up/down and IPs change frequently. It replaces hardcoded addresses with a registry-based lookup.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Service Discovery — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.In a microservices architecture using client-side discovery, what is the role of the client when accessing a service?

    • AThe client relies on a load balancer to distribute requests.
    • BThe client uses a DNS server to resolve the service address.
    • CThe client queries the service registry and performs load balancing.
    • DThe client directly connects to a fixed IP address of the service.
  2. 2.A developer notices that their microservice in Kubernetes is not reachable via its DNS name. What could be a potential cause?

    • AThe service has a ClusterIP type but no selector.
    • BThe service is using client-side discovery instead.
    • CThe kube-proxy is not resolving DNS correctly.
    • DThe service is not registered with the Kubernetes API.
  3. 3.A team is using Eureka for service discovery. What happens if a service fails to renew its lease in time?

    • AThe registry automatically renews the lease on behalf of the service.
    • BThe service is marked as unhealthy but remains discoverable.
    • CThe service continues to be discoverable indefinitely.
    • DThe service is removed from the registry.
  4. 4.In which scenario is server-side discovery more beneficial than client-side discovery?

    • AWhen services are deployed on Kubernetes.
    • BWhen clients have limited processing power for load balancing.
    • CWhen the service registry is external to the network.
    • DWhen clients need to perform custom load balancing.
  5. 5.A service registered with Consul is not being discovered by clients. What might be a reason?

    • AConsul does not support DNS-based discovery.
    • BThe service is registered with an incorrect IP address.
    • CThe service is using an incorrect DNS query format.
    • DThe service's health check is failing.
  6. 6.What is a key difference between client-side and server-side service discovery?

    • AClient-side discovery requires a load balancer, server-side does not.
    • BServer-side discovery requires each client to have a registry copy, client-side does not.
    • CServer-side discovery is only for Kubernetes environments.
    • DClient-side discovery involves the client in load balancing, server-side does not.
  7. 7.A microservice in a non-Kubernetes environment needs dynamic service discovery. Which tool can be used?

    • AKubernetes Services
    • Bkube-proxy
    • CSpring Cloud Gateway
    • DNetflix Eureka
  8. 8.What is the purpose of the 'selector' field in a Kubernetes Service definition?

    • AIt determines the load balancing algorithm used.
    • BIt specifies the IP address of the service.
    • CIt matches the service to the pods it should route traffic to.
    • DIt defines the DNS name for the service.