Dubbo 3.0 forward-looking series: service discovery supports millions of clusters, bringing a scalable microservice architecture

Author | Liu Jun (Lu Gui)
Source | Alibaba Cloud Native Official Account

This article is a stress test article on Dubbo address push performance. We hope to show the performance improvement of Dubbo3 through comparison, especially the newly introduced application-level address model. But it should be noted that this is not the official version of the performance reference baseline, and due to environmental and time reasons, we did not collect part of the comparison data, but as long as we remember that we are only in the qualitative detection phase, these restrictions will not generally Have too much influence.

Summary

This article mainly focuses on the performance test of the next-generation microservice framework Dubbo 3.0 in the address push link. It is also a stage summary of the performance of Dubbo 3.0 in the process of landing in Ali. This round of testing Dubbo2 interface-level address discovery and Dubbo3 interface Level address discovery, Dubbo3 application level address discovery. The stress test data shows that in the stress test scenario of millions of instance addresses:

  • Based on the interface-level address discovery model, compared with Dubbo2, Dubbo3 has a more than 50% reduction in resident memory, and the Full GC interval is significantly longer.

  • Dubbo3's newly introduced application-level service discovery model can further achieve a substantial reduction in resource usage. The resident memory is further reduced by 40% compared to Dubbo3 interface-level addresses. The incremental memory allocation for application instance expansion and contraction scenarios is basically zero, the same cycle Within (1 hour) Full GC is reduced to 2 times.

As the core middleware supporting the business system in the future, Dubbo 3.0 will undoubtedly bring great help to the business system by improving its resource occupancy rate and stability.

Background introduction

1. Introduction to Dubbo 3.0, the next generation service framework

Summarizing Dubbo 3.0 in one sentence : It is a fusion product after HSF & open source Dubbo . It has made a comprehensive cloud native architecture upgrade based on the compatibility of the two frameworks. It will become the main product for Alibaba's internal and open source communities in the future .

The background of the birth of Dubbo 3.0 is that Alibaba is promoting the full-site business on the cloud. This provides our middleware products fully embracing the cloud business, providing internal and open source consistent products, and provides an opportunity to make middleware products promising. Completely get rid of the multi-line combat situation of self-research system and open source system, which is conducive to the realization of value maximization. On the one hand, the large-scale practice experience of Ali's e-commerce system can be exported to the community, and on the other hand, outstanding developers in the community can also participate in project contributions. Take the service framework as an example. Both HSF and Dubbo are very successful products: HSF internally supports the previous Double Elevens, with excellent performance and time-tested. On the open source side, Dubbo is firmly established as the first open source service framework in China. Very extensive.

Maintaining two highly homogenous products at the same time puts a very big test on R&D efficiency, business costs, product quality and stability. For example, first of all, the intercommunication between Dubbo and HSF system is a very big obstacle. Some ecological companies within Alibaba, such as Koala, Ele.me, etc., are using the Dubbo technology stack to achieve smooth and smooth communication. The intermodulation and intercommunication of HSF has always been a very big obstacle; secondly, the incompatibility of products has led to excessive output costs in the community, and the cost of quality acceptance has also increased. The service experience and results accumulated by internal business cannot directly empower the community , After the second transformation is adapted to Dubbo, the functionality and stability acceptance must be reinvested in verification. In order to completely solve the above problems, combined with the overall cloud, open source and cloud product output strategy of Ali Group's business mentioned above, we have formulated a plan for the comprehensive development of Dubbo 3.0.

1.png

2. Performance pressure test and comparison of different versions of Dubbo on the address push link

The following figure shows the basic working principle of the service framework. The orange path is the address push link that we focused on this time . We focus on the differences between the different versions of Dubbo Consumers, especially Dubbo, when millions of address instances are pushed. 3.0 actual performance.

2.png

For comparison, we selected the following scenarios for stress testing:

  • Dubbo2, the reference baseline for this stress test
  • Dubbo3 interface-level address discovery model, the same model used in Dubbo2
  • Dubbo3 application-level address discovery model, introduced by the cloud native version, please refer to this article for detailed explanation

Stress testing environment and methods

  • Pressure test data

This stress test simulates the scenario of 220w (interface level) cluster instance address push, that is, a single consumer process subscribes to the 220w address.

  • Stress test environment

8C16G Linux, the heap memory in the JVM parameter is set to 10G.

  • Pressure measurement method

The Consumer process subscribes to 700 interfaces, and the ConserverServer, as the registry, continues to simulate address changes and pushes in a certain proportion for a duration of 1 hour+. During this process, the Consumer process and various indicators of the machine are counted.

Analysis and comparison of optimization results

1. GC time consumption and distribution

3.png
Dubbo2 interface-level address model

4.png
Dubbo3 interface-level address model

5.png
Dubbo3 application-level address model

2. Incremental memory allocation

6.png
Dubbo2 interface-level address model

7.png
Dubbo 3.0 interface-level address model

8.png
Dubbo3 application-level address model

3. OLD area and resident memory

9.png
Dubbo2 interface level model

10.png
Dubbo3 interface level model

11.png
Dubbo3 application-level model

4. Consumer load

12.png
Dubbo3 interface level model

13.png
Dubbo3 application-level model

Detailed comparison and analysis

1. Dubbo2 interface model VS Dubbo3 interface model

Under the 200w address scale, Dubbo2 quickly ate up the entire heap memory space, and most of them could not be released. The frequent GC triggered by this made the entire Dubbo process unable to respond, so we did not collect data from stress testing. Lasts a long time.

The interface-level address model is also kept unchanged. The optimized Dubbo3 has only 3 Full GCs in one hour, and the unreleased memory during the continuous push is about 1.7G.

2. Dubbo3 interface model VS Dubbo3 application model

After switching to the Dubbo3 application-level service discovery model, the overall resource consumption has dropped significantly, which is reflected in:

  • The application process goes offline and the incremental memory increases very little (the MetadataData at the interface level is basically completely reused, and the new part is only from the configuration change of the newly expanded machine or part of the service).

  • Compared with the Dubbo3 interface level, the resident memory has dropped by nearly 40%, remaining at around 900M.

It is worth mentioning that the current application-level address push model has room for further optimization in code implementation, such as metadata reuse, URL object reuse, etc. This part of the work will be the focus of our subsequent exploration.

to sum up

Dubbo 3.0 has realized the full integration of Dubbo&HSF, and the cloud native solution is also in full progress. In the just past Double Eleven, Dubbo 3.0 has steadily supported the koala business, and has also passed some online pilots of some other e-commerce applications of Ali. In the future, we will focus on promoting the further improvement of Dubbo 3.0. On the one hand, we will honor the application-level service discovery, new service governance rules, and the next-generation Triple protocol. Non-functional goals.

The performance pressure test of the push link is a staged acceptance during the landing/development process. The application-level service discovery has significantly reduced resource consumption, which allows us to see the feasibility of the new architecture for building a truly scalable cluster in the future. This strengthens our confidence in the application-level service discovery architecture. In subsequent iterations, after continuing to improve the interface-level and application-level models and achieve the overall performance leadership of Dubbo 3.0, we will focus on the implementation of the migration solution to support the smooth and transparent migration from the old model to the new model.

Guess you like

Origin blog.51cto.com/13778063/2575769