Service Registry

A service registry is simply a database that maintains a list of services, their endpoints, and quite often additional service metadata which is used when consuming the service. Some service discovery technologies, like Consul, will perform health checks and maintain health state of service instances.

Features

There are a number of different technologies commonly used as a service registry. Each technology offers a similar set of features. Let’s first have a look at the features of a conceptual service discovery store, and then the common technologies used.

Highly Available and Scalable Store

One of the more important features is that the service registry is highly available and scalable. All our services will be using the service registry to either announce and/or perform service lookups. If we are unable to perform a lookup, then we might not be able to find the service we need to send a request to. Most of the service registries use multiple redundant nodes so that if one node goes down the application is able to connect to another.

Service Announcement and Lookup API

It’s important that our service announcement implementations are able to register changes and that services are able to perform lookups. Service announcement and lookup client tools contain integrations with different technologies, and this can influence your decision as to which technology you select.

Notifications

When a service changes, such as when instances are added, removed, moved, and so on, it’s sometimes necessary to be notified of these changes. Technologies like Confd (https://github.com/kelseyhightower/confd) or Consul Template (https://github.com/hashicorp/consul-template) can monitor changes and update configuration based on the data. This is useful when maintaining a list of back ends in something like NGINX or HAProxy.

Health Checks

Some solutions, like Consul, can be configured to perform health checks and maintain health metrics about the services that are registered. This can be used for monitoring and also for routing logic. Shared circuit breaker state might be maintained here, and if the service is having problems, the client might not call it.

DNS Protocol Integrations

DNS has been around for a long time. It is used for name resolution. It’s widely supported and easy to use. This can be used to provide lookup discovery with no implementation changes. Service registration can be exposed exclusively through DNS or as an additional alternative.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.217.220