Chapter 5. Service Discovery

Introduction to Service Discovery

As described in Chapter 1, CoreDNS is designed to be flexible for new use cases that are not part of the traditional DNS landscape. Many of these use cases come out of the current industry-wide movement from monolithic application architectures to microservice-based architectures.

In microservice architectures, applications are broken into small, independent functional components. Each of these components is the master of its own set of functionality and associated data. For example, a simple online retail application might be broken down into the following independent microservices:

  • User Profile
  • Product Catalog
  • Shopping Cart
  • Checkout
  • Shipping Cost
  • Payment

Microservices

There are many ways to break up any given application into microservices. Often complex applications can be broken into dozens or even hundreds of microservices. For more on this, see Sam Newman’s Monolith to Microservices (O’Reilly).

For the application to complete complex workflows and logic, varying microservices must communicate with one another. For example, for the Checkout service to calculate the final price, it needs to gather the list of items from the Shopping Cart, the item prices from the Product Catalog, and the shipping fees from the Shipping Cost service. In a microservice architecture, each of these services provides an application programming interface (API) (as a network service) from which the data can be collected. How does ...

Get Learning CoreDNS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.