In traditional software architecture, we usually use monolithic applications to build a system, and a monolithic application combines various business modules. At first, it is relatively easy to develop and maintain single applications when the business scale is not very large. However, with the development of enterprises, the business scale increases day by day, and the single application becomes more and more bloated. Because individual applications aggregate various business modules and are deployed in a single process, it is common for changes to one of these business modules to bring the entire application back online. In order to solve the problem of difficult maintenance when individual applications become large and swollen, microservices architecture has emerged.
Spring Cloud is a microservice framework based on Spring Boot implementation, which contains various components needed to implement the microservice architecture.
Note: Spring Boot is a framework to simplify the construction, configuration and composition of Spring projects. Because it is not directly related to building the microservice itself, Spring Boot is not expanded in this article. In addition, this article has some examples involving Spring and Spring Boot. It is recommended that you learn about Spring and Spring Boot before reading this article. The readers of this article are mainly those who have not been exposed to service architecture and want to have a macro understanding of it.
Spring Cloud, as the current mainstream microservice framework, enables us to realize microservice architecture more easily and quickly.
Spring Cloud does not remanufacture the wheel. It just combines the mature and practical service frameworks developed by various companies and encapsulates them in the Spring Boot style, masking the complex configuration and implementation principles. Finally, a simple and easy to understand, easy to deploy and easy to maintain distributed system development kit was set aside for developers.
Recently from an Ali bigshot collected this alibaba internal Spring Cloud tutorial, hope it can help you!
If it helps you or inspires you, I hope you can double click zan ha! If you need this study note, you can also click the link below to get it.
Shimo. Im/docs/Q3JjwR…
“The history of super complete Spring Cloud learning notes! (super 4W words, including Alibaba, Bytedance interview questions)”, can be copied after the link with graphite document App or small program to open, need to receive
To show you the contents of this tutorial:
1. First understanding of Spring Cloud and microservices
Microservices is a software architecture style that originated from micro-Web-services proposed by Dr. Peter Rodgers at the 2005 Cloud Computing Expo. The idea of microservices is to break up an independent system into small services that run in separate processes and communicate and collaborate with each other through RESTful apis based on HTTP.
2. Spring Cloud Eureka service governance
Set up eureka-Server service registry set up Eureka-client service provider Eureka-Server cluster Set up server-consumer Service Consumer Eureka-server Add authentication Eureka configuration
3. Spring Cloud Ribbon client load balancing
Ribbon Introduction RestTemplate Send a Get request Send a POST request Send a PUT request Send a DELETE request RestTemplates Field Spring Cloud Ribbon Configuration
4. Spring Cloud Hystrix service fault tolerance
Using Hystrix
@ HystrixCommand,
Service degradation
Exception handling
Naming and grouping
Hystrix cache
Request to merge
Hystrix properties
Commond
collapser
threadPool
5. The Spring Cloud Hystrix Dashboard
Monitor a single Hystrix instance
Monitoring of Turbine cluster
Using messaging middleware
6. Spring Cloud Feign declarative service invocation
Build Feign Consumer
Ribbon Configuration
Hystrix related configurations
Other Feign configurations
Request the compression
The log configuration
7. Spring Cloud Zuul Service Gateway
Getting started with Spring Cloud Zuul
The routing configuration
The traditional configuration
Based on the service name
Default route configuration rules
priority
The prefix configuration
Local jump
Header filtering & redirection
The filter
Core filter
Custom Zuul filter
8. Spring Cloud Config unified configuration management
Set up the Config – Server
Set up the Config – Client
Config-server Additional configuration
The use of placeholders
Subdirectory support
clone-on-start
Integration of the Spring Security
Encryption to decrypt
Config-client Additional configuration
Refresh the configuration
The cluster configuration
9. Refresh the configuration using Spring Cloud Bus
Spring Cloud Bus was introduced
WebHooks
10. Trace microservices using Spring Cloud Sleuth
The preparatory work
Create a Server – Provider1
Create a Server – Provider2
Test Spring Cloud Sleuth
Integrated Zipkin
Build Zipkin – Server
Microservices introduced Zipkin
test
Data is stored
Zipkin API
11. Spring Cloud Consul service governance
Install the Consul
Server-Provider
Server-Consumer
Consul cluster
12. Spring Cloud Alibaba Nacos Registry
Nacos installation
Frame structures,
Nacos as the registry
Test load balancing
Nacos registry configuration
Nacos is an open source software integrating service registration discovery, service configuration and management. This section mainly records the use of service registration discovery function of Nacos. With Spring Cloud Alibaba Nacos Discovery, we can easily experience the service registry Discovery feature of Nacos using the Spring Cloud programming model. The Spring Cloud version used in this section is Hoxton.SR3, Spring Cloud Alibaba version is 2.2.0.release, and Spring Boot version is 2.2.3.release.
13. Spring Cloud Alibaba Nacos Configuration Center
Frame structures,
The basic use
Obtaining configuration Rules
Configuration division actual combat
Configure a rollback
Get multiple configurations
Multi-configuration sharing
Commonly used configuration
14.Spring Cloud Alibaba Sentinel console details
Installation console
Setting up the client
Flow control rules
QPS fails directly
Number of threads failed directly
associated
link
Preheat a Warm Up
Waiting in line
Drop rules
RT
Abnormal proportion
Number of abnormal
Hot rules
Rules of the system
Authorization rules
15. Spring Cloud Alibaba Sentinel@SentinelResource
Frame structures,
Basic usage
Other attributes
If it helps you or inspires you, I hope you can double click zan ha! If you need this study note, you can also click the link below to get it.