Spring Cloud Alibaba 2022 is officially released, the startup speed is increased by 10 times, and all aspects take off directly!

Hello everyone, I am the stack leader.

After more than 7 months after the release of the first candidate version 2022.0.0.0-RC1 of Spring Cloud Alibaba 2022, there is still a version 2022.0.0.0-RC2 in the middle. Just a few days ago, the official version of Spring Cloud Alibaba 2022.0.0.0 was finally official announced.

Spring Cloud Alibaba 2022.0.0.0

Dependency update

Due to the great changes between Spring Boot versions, especially Spring Boot 2.4 and 3.0 versions, Spring Cloud Alibaba uses Spring Boot 3.0 and 2.4 as the dividing line, and maintains three versions of 2022.x, 2021.x, and 2.2.x at the same time. version branch.

The basic dependencies of the Spring Cloud Alibaba version are as follows:

Spring Cloud Alibaba Spring Cloud Spring Boot JDK
2022.0.0.0 Spring Cloud 2022.0.0 3.0.2 17+
2021.0.5.0 2021.0.5 2.6.13 8+
2021.0.4.0 Spring Cloud 2021.0.4 2.6.11 8+
2021.0.1.0 Spring Cloud 2021.0.1 2.6.3 8+
2.2.9.RELEASE Spring Cloud Hoxton.SR12 2.3.12.RELEASE 8+

Spring Cloud Alibaba 2022.0.0.0 is mainly adapted to Spring Cloud 2022.0.0, Spring Boot 3.0, and JDK 17. These four technologies are actually interdependent. The former is based on the latter, and any version of any technology cannot Feel free to replace.

The version number of Spring Cloud Alibaba follows the version of Spring Cloud, but it will not be updated synchronously with each version. For example, Spring Cloud Alibaba does not synchronize Spring Cloud 2021.0.2, 2021.0.3 versions.

Description of the version number of Spring Cloud Alibaba:

The first 3 digits of the version are the Spring Cloud version number, and the last digit is the extended version number.

For example, the first version of Spring Cloud Alibaba corresponding to Spring Cloud 2022.0.0 version is: 2022.0.0.0, the second version is: 2022.0.0.1, and so on.

component update

Different versions of Spring Cloud Alibaba may adapt to different underlying component versions, and the dependent component versions are as follows:

Spring Cloud Alibaba Sentinel Nacos RocketMQ Set
2022.0.0.0 1.8.6 2.2.1 4.9.4 1.7.0
2021.0.5.0 1.8.6 2.2.0 4.9.4 1.6.1
2021.0.4.0 1.8.5 2.0.4 4.9.4 1.5.2
2021.0.1.0 1.8.3 1.4.2 4.9.2 1.4.2
2.2.9.RELEASE 1.8.5 2.1.0 4.9.4 1.5.2

The largest components of the Spring Cloud Alibaba 2022.0.0.0 update are Nacos and Seata, and there will be certain compatibility issues in the update.

Other details update

There are still a lot of detailed updates, and the stack leader will not list them here. If you are interested, you can read the official release notes at the bottom. The content update of the 2022.0.0.0 version mainly involves three versions, including candidate versions. The official version release notes are not Contains all updates.

I personally think that the biggest function of the 2022.0.0.0 version is the support for static compilation. After adapting to Spring Boot 3.0, using GraalVM to build native application images, all aspects must take off directly.

What is GraalVM?

GraalVM is a cross-language general-purpose virtual machine that not only supports JVM-based languages ​​such as Java, Scala, Groovy, Kotlin, and LLVM-based languages ​​such as C and C++, but also supports other languages ​​such as JavaScript, Ruby, Python, and R.

GraalVM can be used to replace JVM. It precompiles Java applications through technologies such as Ahead Of Time (AOT), which makes Java applications start faster, occupy less memory, and be smaller.

The following is the official test done by Spring Cloud Alibaba:

test environment:

  • macOS 11.4
  • 2.6GHz 6-Core Intel Core i7 processor
  • 16G memory

The main test is the startup speed and memory usage during runtime, and the average value is obtained by simulating 3 times respectively.

From the above test results, it can be found that the latest Spring Cloud Alibaba application that supports Spring Boot 3.0 and is based on GraalVM has been significantly reduced in terms of startup speed, memory usage, and application package size.

Compare the test results of service registration and service consumption:

The startup speed of GraalVM-based applications has been increased by nearly 10 times, and the runtime memory usage has been reduced by nearly 2/3 compared with the original one. The effect is very obvious.

Therefore, after the release of Spring Boot 3.0, cloud-native applications based on Spring Cloud Alibaba have taken off directly, which can help enterprises perform elastic expansion and contraction faster and reduce cloud costs.

Spring Cloud Alibaba Popular Science

There are still many people who are not sure about Spring Cloud Alibaba, Spring Cloud, what is the relationship between them, and the stack manager will give you a popular science today.

1. What is Spring Cloud Alibaba?

Spring Cloud Alibaba is a one-stop solution for microservice development. Open sourced by Alibaba, it contains the necessary components for developing distributed applications, allowing developers to easily use these components to develop distributed application services through the Spring Cloud programming model.

Spring Cloud Alibaba has long been an official sub-project of Spring Cloud:

Through Spring Cloud Alibaba, you only need to add some annotations and a small amount of configuration to connect Spring Cloud applications to Alibaba's distributed application solutions, and quickly build distributed application systems through Alibaba middleware.

2. What is the relationship between Spring Cloud Alibaba, Spring Cloud and Spring Cloud Netflix?

  • Spring Cloud: This is a standard framework for distributed application development officially provided by Spring, and it can also be understood as a unified abstract programming model for microservice development.
  • Spring Cloud Netflix: This is the earliest Spring Cloud microservice framework. It integrates many open source components of Netflix based on the Spring Cloud programming model, such as: Eureka, Ribbon, Zuul, Hystrix, etc. Most of them have stopped maintenance now.
  • Spring Cloud Alibaba: This is Alibaba's open source microservice framework based on the Spring Cloud programming model, which integrates various Alibaba microservice open source components, such as Nacos, RocketMQ, Sentinel, Seata, etc.

To put it bluntly, Spring Cloud provides a unified abstract programming model for microservice development, that is, to formulate a standard. Both Spring Cloud Netflix and Spring Cloud Alibaba are based on the implementation of this abstract programming model, and integrate their own open source components to achieve All aspects of microservice development.

3. Which Spring Cloud is better to learn?

In addition to the three introduced above, I also know of Tencent's open source Spring Cloud Tencent on the market, but it is still relatively young and needs market testing.

Although Spring Cloud Netflix started early, the maintenance of various components has stopped. Version updates, component replacements, and compatibility are all big problems. It is not recommended to continue learning.

Therefore, learning Spring Cloud Alibaba is currently the most correct posture:

  • Spring Cloud Alibaba is built on the basis of Spring Cloud, and only provides packages for Alibaba components, such as: Nacos, Sentinel , etc. The top-level abstraction is still Spring Cloud, so learning Spring Cloud Alibaba is learning Spring Cloud.
  • Spring Cloud Alibaba, as the official top-level project of Spring Cloud , is also the most powerful microservice framework and de facto standard in China, not one of them.

Well, that's all for today's sharing, and the follow-up stack leader will continue to pay attention to and share more Java technology dry goods, pay attention to the public account Java technology stack to push it as soon as possible.

Copyright statement: This article is the original work of the public account "Java Technology Stack". Please indicate the source for reprinting and quoting the content of this article. Plagiarism and manuscript washing will all be complained of infringement, and the consequences will be at your own risk, and the right to pursue legal responsibility is reserved.

Reference documents:


course recommendation

In addition to sharing technology on the official account, the stack leader spent most of his rest time creating the latest " Spring Cloud Alibaba Microservice Practical Course ". Once it was launched, it received rave reviews. The course covered almost all operations of Spring Cloud Alibaba! ! !

Click to enlarge to view HD version

It has all been completed, and you can sign up to learn all the content at any time.

Recently, the stack leader has spent a lot of time updating to the third period, which is full of dry goods, including adapting to the latest Spring Cloud Alibaba 2022.0.0.0 version. Other content of the course has also been upgraded and strengthened, such as Nacos configuration encryption and decryption, OAuth 2 version Updates, etc., one subscription, free updates forever.

In short, if you want to systematically study the Spring Cloud microservice system, the architecture design of microservice projects, and the connection and application of various mainstream frameworks and middleware, this course is just right for you. After learning, write various micro-service technologies directly in your resume, and you will have more confidence when interviewing and changing jobs to discuss salary.

Friends who subscribed early, learn and follow along all the way, and you will know how valuable it is. Don’t waste time learning the old micro-service technology, and learn the latest Spring Cloud micro-service technology with the stack manager, and avoid detours.

To avoid ineffective communication, please refer to the following article for a detailed introduction to the course:

Stop learning about microservices, this is the correct posture to use Spring Cloud microservices!

If you are interested, you can scan the QR code and contact the manager on WeChat (160285345) to sign up, please note: 999.

Recent hot article recommendation:

1. 1,000+ Java interview questions and answers (2022 latest version)

2. Brilliant! Java coroutines are coming. . .

3. Spring Boot 2.x tutorial, too comprehensive!

4. Don't fill the screen with explosions and explosions, try the decorator mode, this is the elegant way! !

5. The latest release of "Java Development Manual (Songshan Edition)", download quickly!

Feel good, don't forget to like + forward!

Guess you like

Origin blog.csdn.net/youanyyou/article/details/132042573