Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the five components of springcloud?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

The editor will share with you what are the five components of springcloud. I hope you will gain a lot after reading this article. Let's discuss it together.

Springcloud five components: 1, Eureka to achieve service governance; 2, Ribbon mainly provides client-side software load balancing algorithm; 3, Hystrix circuit breaker, protection system, control fault range; 4, Zuul,api gateway, routing, load balancing and other functions; 5, Config configuration management.

The five components of springcloud:

1 、 Eureka

Role: implementing service governance (service registration and discovery)

Summary: Spring Cloud Eureka is a service governance module under the Spring Cloud Netflix project.

It consists of two components: Eureka server and Eureka client.

The Eureka server acts as a service registry. Cluster deployment is supported.

The Eureka client is a java client that handles service registration and discovery.

When the application starts, the Eureka client registers its own service information with the server, and caches the service information of the server locally. The client will periodically interact with the server to update the service lease and service information.

2 、 Ribbon

Function: Ribbon, which mainly provides software load balancing algorithm on the client side.

Summary: Spring Cloud Ribbon is a client-side load balancing tool based on HTTP and TCP, which is implemented based on Netflix Ribbon. Through the encapsulation of Spring Cloud, we can easily convert the service-oriented REST template request into the service call of the client load balance.

If you look at the figure above, the key point is to convert external rest calls into micro-service calls according to the load balancing strategy. Ribbon has a lot of load balancing strategies, which will be explained later.

3 、 Hystrix

Function: circuit breaker, protection system, control fault range.

Summary: to ensure its high availability, a single service is usually deployed in a cluster. Due to network reasons or its own reasons, the service cannot be guaranteed to be 100% available. If there is a problem with a single service, there will be thread blocking when calling the service. If a large number of requests pour in, the thread resources of the Servlet container will be consumed, resulting in service paralysis. The dependence between service and service, the fault will spread, which will cause disastrous serious consequences to the whole micro-service system, which is the "avalanche" effect of service failure.

4 、 Zuul

Functions: api gateway, routing, load balancing and other functions

Introduction: similar to nginx, reverse proxy function, but netflix itself has added some features to cooperate with other components.

In the micro-service architecture, the back-end service is often not directly open to the caller, but is routed to the corresponding service through an API gateway according to the requested url. When an API gateway is added, a wall is created between the third-party caller and the service provider, which communicates with the caller directly for permission control, and then distributes the request evenly to the backend server.

5 、 Config

Role: configuration management

Summary: SpringCloud Config provides server-side and client-side. The default implementation of the server storage backend uses git, so it easily supports a tagged version of the configuration environment, as well as access to a variety of tools for managing content.

This is still static and needs to be updated dynamically with Spring Cloud Bus.

After reading this article, I believe you have a certain understanding of the five components of springcloud, want to know more about it, welcome to follow the industry information channel, thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report