Definition

service discovery

Service discovery is the automatic detection of devices and offered services over a network. Discovery, which minimizes configuration efforts for administrators, is commonly found in microservice architectures and containerization platforms. Microservices, especially those that are cloud-based, will use service discovery because it can be difficult to detect network locations. For example, service instances are dynamically assigned network locations. Tools which include service discovery features include HashiCorp's Counsul deployment and configuration tool, the Zabbix monitoring software and the Kubernetes containerization platform.

Service discovery functions by using a common network protocol, which allows agents to use each other’s services. Protocols used include Dynamic Host Configuration Protocol (DHCP), DNS Service Discovery (DNS-SD) and Service Location Protocol (SLP).

The database which contains service instances and network locations is called the service registry. The service registry is made up of server clusters containing databases of available service instances, which should be continually kept up to date.

Service discovery will use two different discovery options pertaining to either the data center initiating discovery, or the service actively identifying itself to the data center. These options are known as client-side or server-side. In client-side discovery, the client service is responsible for determining network locations of service instances. The client accomplishes this by querying a service registry. This service discovery option benefits from being straightforward.

Server‑side discovery allows each client to locate a service using a load balancer. In turn, the load balancer will query the service registry and route requests to a service instance. Kubernetes takes advantage of this process. This option benefits from simplifying the requests of the clients.

Service instances or devices are also registered in one of two ways, the self‑registration pattern or the third-party registration pattern. These patterns allow other devices to find the service. In the self‑registration pattern, a service will register itself with a service registry. The third-party registration pattern uses a service registrar, a separate tool which can ID the service, to register the service. The registrar will record changes to an environment of instances, so if a new device or service is detected, the registrar can then add the service or device to the service registry.

This was last updated in February 2019

Continue Reading About service discovery

Dig Deeper on IT systems management and monitoring

Software Quality
App Architecture
Cloud Computing
SearchAWS
TheServerSide.com
Data Center
Close