Five major components of springcloud: 1. Eureka implements service governance; 2. Ribbon mainly provides client-side software load balancing algorithms; 3. Hystrix circuit breaker, protection system, and control fault scope; 4. Zuul, api gateway, Routing, load balancing and other functions; 5. Config configuration management.
The operating environment of this article: windows10 system, spring cloud 2.4.x, thinkpad t480 computer.
Five major components of springcloud:
1, Eureka
Role: Implement services Governance (service registration and discovery)
Introduction: Spring Cloud Eureka is the service governance module under the Spring Cloud Netflix project.
consists of two components: Eureka server and Eureka client.
The Eureka server is used as a service registration center. Support cluster deployment.
Eureka client is a java client used to handle service registration and discovery.
When the application starts, the Eureka client registers its own service information with the server and caches the server's service information locally. The client will periodically conduct heartbeat interactions with the server to update service leases and service information.
2. Ribbon
Function: Ribbon mainly provides client-side software load balancing algorithms.
Introduction: Spring Cloud Ribbon is a client-side load balancing tool based on HTTP and TCP, which is implemented based on Netflix Ribbon. Through Spring Cloud's encapsulation, we can easily automatically convert service-oriented REST template requests into client-side load-balanced service calls.
Look at the picture above. The key point is to convert external REST calls into microservice calls according to the load balancing strategy. Ribbon has many load balancing strategies, which will be explained later.
3. Hystrix
Function: circuit breaker, protection system, control fault scope.
Introduction: In order 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 guarantee 100% availability. If there is a problem with a single service, thread blocking will occur when calling this service. At this time, if a large number of requests pour in, the thread resources of the Servlet container will be consumed. , causing service paralysis. Due to the dependencies between services, faults will propagate and have catastrophic consequences for the entire microservice system. This is the "avalanche" effect of service failures.
4. Zuul
Function: 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 microservice architecture, back-end services are often not directly open to the calling end, but are routed to the corresponding service through an API gateway based on the requested URL. When an API gateway is added, a wall is created between the third-party caller and the service provider. This wall directly communicates with the caller for permission control, and then distributes requests to the backend server in a balanced manner.
5. Config
Function: Configuration management
Introduction: SpringCloud Config provides server and client . The default implementation of the server storage backend uses git, so it easily supports a tagged version of the configuration environment, as well as providing access to a variety of tools for managing content.
This is still static and must be coordinated with Spring Cloud Bus to achieve dynamic configuration updates.
The above is the detailed content of What are the five major components of springcloud. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 English version
Recommended: Win version, supports code prompts!

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment