- Mastering Spring Cloud
- Piotr Minkowski
- 255字
- 2021-08-27 18:57:03
Service Discovery
Before we got to this point, we had discussed service discovery many times in previous chapters. In fact, it is one of the most popular technical aspects of microservice architecture. Such a subject could not have been omitted from the Netflix OSS implementation. They did not decide to use any existing tool with similar features, but designed and developed a discovery server especially for their own needs. Then, it had been open sourced along with several other tools. The Netflix OSS discovery server is known as Eureka.
The Spring Cloud library for integration with Eureka consists of two parts, the client side and the server side. The server is launched as a separate Spring Boot application and exposes an API that allows for the collection of a list of registered services and adding a new service with a location address. The server can be configured and deployed to be highly available, with each server replicating its state with the others. The client is included in the microservice application as a dependency. It is responsible for the registration after startup, the deregistration before shutdown, and for keeping the registration list up to date by polling the Eureka Server.
Here's a list of topics we will cover in this chapter:
- Developing an application that runs embedded Eureka Server
- Connecting to the Eureka Server from the client-side application
- Advanced discovery client configuration
- Enabling secure communication between client and server
- Configuring failover and peer-to-peer replication mechanisms
- Registering instances of a client-side application in different zones