After handling core concerns in our distributed system through a gateway, we will now talk about service registry and discovery in this chapter. The more services we have, the more complicated it becomes to handle them using only predefined ports. In the previous chapter, we saw the gateway interacting with the service registry, which maintains the service location in a database. The client request is dispatched to service based on the information contained in a database. In this chapter, we will see how the service registry is populated, and in what ways services, clients, and gateways interact with it.
This chapter will commence by understanding service discovery, how the service registry is maintained dynamically, different ways of registering services in the registry, and pros and cons of each way. We will understand the end to end process of maintaining a service registry and how a service is discovered based on a registry. We will see the available...