Introduction to Spring Cloud Service Discovery (Eureka)

Eureka is a service discovery framework developed by Netflix. SpringCloud integrates it into its own sub-project spring-cloud-netflix to implement SpringCloud's service discovery function. 
Why use Eureka, because in a complete system architecture, any single-point service cannot be guaranteed to not be interrupted, so we need a service discovery mechanism. After a node is interrupted, other nodes can continue to provide services to ensure that The entire system is highly available. 
There are two modes of service discovery: one is client-side discovery mode and the other is server-side discovery mode. Erueka uses a client-side discovery model.

Eureka Server will provide service registration service. After each service node is started, it will be registered in Eureka Server, so that Eureka Server has information of all service nodes, and Eureka has a monitoring page, you can see all the information on the page intuitively. The registered service's condition. At the same time, Eureka has a heartbeat mechanism. When a node service does not send a heartbeat signal within a specified time, Eureka will remove the service node from the service registry. Eureka also provides a mechanism for client caching. Even if all Eureka Servers are down, the client can still use the information in the cache to call the service of the service node. Eureka is generally used in conjunction with Ribbon. Ribbon provides the function of client load balancing. Ribbon uses the service information read from Eureka to load reasonably when calling the services provided by the service node. 
Eureka ensures high availability and flexibility of the system through mechanisms such as heartbeat detection, health check, and client cache.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324883712&siteId=291194637