Home  >  Article  >  What are the principles of the five major components of springcloud

What are the principles of the five major components of springcloud

小老鼠
小老鼠Original
2023-07-17 15:12:271496browse

The principles of the five major components of springcloud are: 1. Eureka is used to simplify the interaction with the server, act as a polling load balancer, and provide failover support for services; 2. Ribbon mainly provides client-side software load balancing Algorithm; 3. Hystrix can help quickly reject an operation that is likely to fail, instead of waiting for a request that the operation times out, to maintain the system's response time; 4. Zuul is like nginx, the function of a reverse proxy; 5. Config is still.

What are the principles of the five major components of springcloud

Five major components of springcloud

Service discovery--Netflix Eureka

Customer-side load balancing--Netflix Ribbon

Circuit Breaker—Netflix Hystrix

Service Gateway—Netflix Zuul

Distributed Configuration—Spring Cloud Config

1, Eureka

What are the principles of the five major components of springcloud

A RESTful service used to locate middle-tier services running in AWS Regions.

consists of 2 components: Eureka server and Eureka client.

Eureka server is used as a service registration server.

The Eureka client is a java client used to simplify interaction with the server, act as a polling load balancer, and provide failover support for services.

Netflix uses an alternative client in its production environment that provides weighted load balancing based on traffic, resource utilization, and error status. /

2. Ribbon

What are the principles of the five major components of springcloud

Ribbon mainly provides client-side software load balancing algorithms.

The Ribbon client component provides a series of complete configuration options, such as: connection timeout, retry, retry algorithm, etc.

Ribbon has built-in pluggable and customizable load balancing components.

The following are some load balancing strategies used:

Simple round-robin load balancing

Weighted response time load balancing

Region-aware round-robin load balancing

Random Load Balancing

Ribbon also includes the following features:

Easy to integrate with service discovery components (such as Netflix's Eureka)

Completed using Archaius Runtime configuration

Use JMX to expose operation and maintenance indicators, use Servo to publish

Multiple pluggable serialization options

Asynchronous and batch operations (coming soon)

Automatic SLA Framework (coming soon)

System Management/Indicator Console (coming soon)

3, Hystrix

What are the principles of the five major components of springcloud

## A circuit breaker prevents an application from trying multiple times to perform an operation that is likely to fail, allowing it to continue without waiting for a failure to recover or wasting CPU cycles while it determines that the failure is persistent.

Circuit breaker mode also enables applications to detect whether the fault has been resolved.

If the problem appears to have been corrected, the application can try to call the operation.

What are the principles of the five major components of springcloud

Circuit breakers add flexibility and stability to a system, providing stability while the system recovers from a failure and minimizing the impact of this failure on performance .

It can help quickly reject a request for an operation that is likely to fail, rather than waiting for the operation to time out (or not return) to maintain the system's response time.

If a circuit breaker raises an event each time it changes state, this information can be used to monitor the health of the system components protected by the circuit breaker, or to alert an administrator when a circuit breaker trips to in the open state.

What are the principles of the five major components of springcloud

Flow chart

What are the principles of the five major components of springcloud

4、Zuul

What are the principles of the five major components of springcloud

Just like nginx, it has the function of reverse proxy, but Netflix itself has added some features to cooperate with other components.

5. Spring Cloud Config

This is static and needs to be coordinated with Spring Cloud Bus to achieve dynamic configuration updates.

What are the principles of the five major components of springcloud

The above is the detailed content of What are the principles of the five major components of springcloud. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn