[SpringCloud] SpringCloud of Eureka Registry (b)

About Eureka

  Eureka is a based on the REST (Representational State Transfer) service, mainly for location services in the cloud AWS to achieve load balancing and failover server intermediate layer. We call this service for Eureka Server. Eureka also comes with a Java-based client components Eureka Client, it makes it easier to interact with the service. The client also has a built-in load balancing, a loop can perform basic load balancing. In Netflix, more sophisticated load balancer Eureka packaged to provide a variety of factors weighted load balancing traffic, resource usage, error conditions based, in order to provide excellent flexibility.

  Git Address: https://github.com/Netflix/eureka

  Service Management

  In the traditional framework of remote rpc call, the management of each service between the service dependencies more complex, so the need to use the service governance, management services and the dependencies between services, service calls can be achieved, load balancing, fault tolerance, achieve service discovery and registration

  Spring Cloud encapsulates Netflix developed to implement the service management module Eureka

  Service Registration

  Eureka using the CS design architecture, Eureka Server as a Service registration server, which is a registered service centers, and other services in the system, use the client to connect to Eureka Eureka Server and maintain a heartbeat connection. Such systems maintenance personnel can monitor each micro system service is functioning properly by Eureka Server. In the service registration and discovery, there is a registration center. When the server starts, will present information on their own servers, such as the service address, mailing address, etc. Register an alias to the registry, and the other (consumer | service provider) to the alias way to the registry get the actual service address, and then implement local RPC calls RPC remote invocation framework core design philosophy: that the registration center, since the use of a registry dependencies between each service and service management (service governance concept). In any rpc remote framework, there will be a registry (storage service address information (interface address))

Eureka two components

  Eureka Server

  Eureka Server service registration services, after each micro started by serving node configuration, will be registered in EurekaServer, so EurekaServer in the service registry will store information about all the available service node, information service nodes in the interface can be intuitively see.

  Eureka Client    

  Eureka Client registry is accessed through a Java client to simplify the interaction, the client Eureka Server and also to have a built-in polling (round-robin) load load balancing algorithm. After the application starts, it will send a heartbeat to the Eureka Server (default period is 30 seconds). If Eureka Server does not receive a heartbeat within a node in multiple heartbeat period. Eureka Server service node will be removed from this service registry (default 90 seconds)

Eureka architecture

  

  Description:

    Register (registration services): The register their IP and port to Eureka.

    Renew (service contract): sending a heartbeat packet every 30 seconds. Eureka tell he was still alive.

    Cancel (Services offline): When the provider will send a message to close Eureka, to remove yourself from the list of services. Prevent consumer calls to non-existent service.

    Get Registry (for service registration list): Get a list of other services.

    Replicate (data cluster synchronization): data replication and synchronization eureka cluster.

    Make Remote Call (remote call): complete remote service invocation.

Eureka Server stand-alone

  Reference: [SpringCloud] SpringCloud Quick Start (a)

 

Guess you like

Origin www.cnblogs.com/h--d/p/12638674.html