Microservices Chapter 3 Introduction to Spring Cloud

Table of Contents of Series Articles

Chapter 1 Application of Java Thread Pool Technology
Chapter 2 Application of CountDownLatch and Semaphone
Chapter 3 Introduction to Spring Cloud
Insert image description here


Foreword: Spring Cloud is a microservice framework based on Spring Boot

Spring Cloud is not a ready-to-use framework. It is a microservice specification with the following two generations of implementation:

  • First generation implementation: Spring Cloud Netflix
  • Second generation implementation: Spring Cloud Alibaba

1. The common components of Spring Cloud are shown in the table below.

Insert image description here

Spring Cloud components describe
Spring Cloud Netflix Eureka The service governance component in Spring Cloud Netflix includes the implementation of the service registration center, service registration and discovery mechanism.
Spring Cloud Netflix Ribbon Service invocation and client-side load balancing components in Spring Cloud Netflix.
Spring Cloud Netflix Hystrix Known as "Brother Porcupine", Spring Cloud Netflix's fault-tolerance management component provides strong fault-tolerance for delays and failures in the service.
Spring Cloud Netflix Feign Declarative service calling component based on Ribbon and Hystrix.
Spring Cloud Netflix Zuul The gateway component in Spring Cloud Netflix provides functions such as intelligent routing and access filtering.
Spring Cloud Gateway A gateway framework developed based on technologies such as Spring 5.0, Spring Boot 2.0 and Project Reactor. It uses the Filter chain to provide basic functions of the gateway, such as security, monitoring/indicators, and current limiting.
Spring Cloud Config Spring Cloud's configuration management tool supports the use of Git to store configuration content, implements external storage of application configurations, and supports operations such as refreshing, encrypting, and decrypting configurations on the client.
Spring Cloud Bus Spring Cloud's event and message bus is mainly used to propagate events or status changes in the cluster to trigger subsequent processing, such as dynamically refreshing configurations.
Spring Cloud Stream Spring Cloud's message middleware component integrates message middleware such as Apache Kafka and RabbitMQ, and perfectly implements the isolation between applications and message middleware by defining a binder as the middle layer. By exposing a unified Channel to applications, applications can easily send and receive messages without having to consider various message middleware implementations.
Spring Cloud Sleuth Spring Cloud distributed link tracking component can perfectly integrate Twitter's Zipkin.

2. The difference and connection between Spring Boot and Spring Cloud

2.1. Spring Boot and Spring Cloud have different divisions of labor

Spring Boot is a rapid development framework based on Spring, which can help developers quickly build Web projects.
Spring Cloud is a one-stop solution under microservice architecture

  • Spring Cloud is implemented based on Spring Boot
  • Spring Boot and Spring Cloud have different number of dependencies
  • Spring Cloud cannot run independently of Spring Boot

Spring Cloud version selection

spring-cloud Spring Boot
Hoxton.SR12 >=2.2.0.RELEASE and <2.4.0.M1
2020.0.6 >=2.4.0.M1 and <2.6.0-M1
2021.0.0-M1 >=2.6.0-M1 and <2.6.0-M3
2021.0.0-M3 Spring Boot >=2.6.0-M3 and <2.6.0-RC1
2021.0.0-RC1 Spring Boot >=2.6.0-RC1 and <2.6.1
2021.0.5 Spring Boot >=2.6.1 and < 3.0.0-M1
2022.0.0-M1 Spring Boot >=3.0.0-M1 and < 3.0.0-M2
2022.0.0-M2 Spring Boot >=3.0.0-M2 and < 3.0.0-M3
2022.0.0-M3 Spring Boot >=3.0.0-M3 and < 3.0.0-M4
2022.0.0-M4 Spring Boot >=3.0.0-M4 and < 3.0.0-M5
2022.0.0-M5 Spring Boot >=3.0.0-M5 and < 3.0.0-RC1
2022.0.0-RC1 Spring Boot >=3.0.0-RC1 and < 3.0.0-RC2
2022.0.0-RC2 Spring Boot >=3.0.0-RC2 and < 3.1.0-M1

Guess you like

Origin blog.csdn.net/s445320/article/details/132939152