Introduction to Spring Cloud Alibaba

Spring Cloud Alibaba is committed to providing a one-stop solution for microservice development. This project contains the necessary components for developing distributed application microservices that developers can easily use to develop distributed application services through the Spring Cloud programming model.

Relying on Spring Cloud Alibaba, you only need to add some annotations and a little configuration, you can plug Spring Cloud application into Ali Micro service solution, and quickly build distributed application system through Ali middleware.

Alibaba combined with its own micro service practice, open source micro service bucket

Widely used in the industry, there have been many successful cases

The main function

Service traffic limiting degradation: Default support for WebServlet, WebFlux, OpenFeign, RestTemplate, Spring Cloud Gateway, Zuul, Dubbo and RocketMQ traffic limiting degrade function access, You can modify traffic limiting degradation rules in real time through the console at runtime and view the Metrics of traffic limiting degradation.

Service Registration and Discovery: It ADAPTS to the Spring Cloud Service Registration and Discovery standard and integrates Ribbon support by default.

Distributed configuration management: Supports external configuration in distributed systems, and automatically refreshes configuration changes.

Message driven capabilities: Build message driven capabilities for microservice applications based on Spring Cloud Stream.

Distributed Transactions: Solve distributed transaction problems efficiently and without intrusion to the business using the @GlobalTransactional annotation.

Ali Cloud object storage: Ali Cloud provides massive, secure, low-cost and highly reliable cloud storage services. Supports storage and access of any type of data in any application, anytime, anywhere.

Distributed task scheduling: provides second-level, precise, highly reliable, and highly available scheduled (Cron expression based) task scheduling services. It also provides a distributed task execution model, such as grid tasks. Grid tasks allow quantum tasks to be evenly distributed to all workers (schedulerx-client) for execution.

Ali Cloud SMS service: global SMS service, friendly, efficient and intelligent interconnection communication capabilities, help enterprises quickly build customer access channels.

component

Sentinel: The stability of protection services from multiple dimensions, such as flow control, fusing downgrading and system load protection, takes flow as the entry point.

Nacos: A dynamic service discovery, configuration management, and service management platform that makes it easier to build cloud-native applications.

RocketMQ: An open source distributed messaging system that provides low-latency, highly reliable message publishing and subscription services based on highly available distributed clustering technology.

Dubbo: Apache Dubbo™ is a high-performance Java RPC framework.

Seata: Alibaba open source product, an easy-to-use high-performance microservices distributed transaction solution.

Alibaba Cloud ACM: an application configuration center that centrally manages and pushes application configurations in a distributed architecture environment.

Alibaba Cloud OSS: Alibaba Cloud Object Storage Service (OSS) is a massive, secure, low-cost and highly reliable Cloud Storage Service provided by Alibaba Cloud. You can store and access any type of data in any application, anytime, anywhere.

Alibaba Cloud SchedulerX: a distributed task scheduling product developed by Alibaba Middleware team, which provides second-level, accurate, highly reliable and highly available timed (Cron expression based) task scheduling service.

Alibaba Cloud SMS: global SMS service, friendly, efficient and intelligent interconnected communication capabilities, to help enterprises quickly build customer access channels.

Spring Cloud Alibaba and Spring Cloud

The Hoxton version of SpringCloud replaces most of the original components with new ones, which are now in a more persistent state than the previous version.

See the following figure for details (x represents the previous component, now stopped; √ indicates the new replacement component) :

Description:

Service Registry:

Eureka: Updates are officially stopped and better alternatives are available, but they are no longer officially recommended (for severe cases).

Zookeeper: Some of the older systems used Zookeeper + Dubbo, but when they did a technical upgrade, they found that SpringCloud’s Eureka stopped working, so they used Zookeeper as the registry with the least amount of technical switching.

Consul: Go is also an excellent framework for registering services, but it is used less and has been upstage by Nacos.

Nacos: from SpringCloudAlibaba, which has passed the test of millions of registration in enterprises, can not only perfectly replace Eureka, but also replace other components, so it is strongly recommended to use it, which is the focus of learning.

Service invocation:

Ribbon: Has also gone into maintenance and stopped updating, but Spring is officially still in use (mild patients).

LoadBalancer: A new component officially released by Spring that is intended to gradually replace the Ribbon, but is still in its infancy.

Service call 2:

Feign: Netflix has also stopped updating.

OpenFeign: The Spring community couldn’t wait for Netflix to update, so they built their own component without Feign.

Service degradation:

Hystrix: It is not recommended on the official website, but it is still widely used in Chinese enterprises.

Resilience4J: It is recommended by the official website, but rarely used in China.

Sentienl: from SpringCloudAlibaba, replacing Hystrix components in Chinese enterprises, strongly recommended in China.

Service Gateway:

Zuul: A Netflix product. There was a split inside the company, and some people wanted to create their own Zuul2.

Zuul2: It was also a Netflix product, but due to internal disagreements, Zuul2 was stillborn.

Gateway: The Spring community’s own gateway component, officially introduced and highly recommended gateway service component.

Service configuration:

Config: currently in use, upstaged by Nacos.

Nacos: from SpringCloudAlibaba, which has taken the lead and replaced Config.

Service bus:

Bus: SpringCloud’s native service Bus component, now upstage by Nacos.

Nacos: from SpringCloudAlibaba, leapfrog and replaced Bus.

As you can see, Nacos is the most important component, and a single component replaces several components.

SpringCloudAlibaba (1) Introduction to SpringCloudAlibaba