Summary
In this chapter, we saw an overview of service discovery and compared its different models. You have learned what the service registry is and what its main service discovery models are. We have illustrated how to use a client-side service discovery model by providing two implementations, one using an in-memory set of data and another using HashiCorp Consul. We have also plugged the Consul-based implementation into our microservices to demonstrate how to use it in the microservice logic. Now, you know how to add and use service discovery in your applications: this knowledge will help you to scale up your services and establish service deployments, which we will cover in Chapter 8, Setting Up Service Deployments.
In the next chapter, we are going to discuss another important topic: serialization. You will learn how to encode and decode the data transferred between the services to establish communication between them.