Distributed architecture and cloud Nativity reshape the game rules of middleware , This provides a historical opportunity for domestic developers to redefine middleware .
Before the popularity of distributed architecture , Abroad IT Manufacturers are leading the development of the middleware market , And closed source 、 Business oriented service forms ; With the popularity of cloud computing and the Internet , Ali will RPC frame 、 Message queue 、 Service discovery 、 Configuration center 、 Distributed transactions 、 Core application middleware technologies such as current limiting and degradation are open source , Accelerate the implementation of distributed architecture in China , It also enables developers to Spring There is an alternative to the technology stack . Cloud native implements middleware to BaaS or SaaS The form of , After the implementation of distributed application architecture , Middleware in capacity management 、 deliver 、 Operation and maintenance 、 The problem of disaster recovery , Users through standardized API You can complete the call to the middleware , So as to improve the overall development and operation and maintenance efficiency of the enterprise .
This article describes the past of Alibaba cloud's core open source projects in the field of application middleware 、 Present and future , Length is longer than the , The story line is listed below :
Sentinel: For the first time, it involves the field of service governance , But it's not just current limiting degradation , The milestone version will be released soon 2.0
from RPC Framework to fully embrace cloud native infrastructure
Apache Dubbo( hereinafter referred to as Dubbo) It's Alibaba in 2012 Open source distributed service governance framework in , Is the most influential in China 、 The most widely used open source RPC One of the frames ,2017 Donate to Apache The foundation ,2019 Officially graduated in .
Dubbo And community developers
“ It is an honor to graduate from an incubator , But this is not the end , It's another start . It's a bit like studying , Graduation does not mean a break in study , But the beginning of exerting greater social value . Graduation is more like a rite of passage , signify Dubbo The team has met Apache Requirements for a mature open source project , And began to have the ability to develop independently .” Beiwei, a senior technical expert of Alibaba cloud, replied in an interview .
from Apache Incubator graduation , It's not the end . The service framework is like a railway track , It is the basis of interoperability , Only by solving the interworking of service framework , It is possible to complete higher-level business interoperability , Therefore, adopting the same standard is the inevitable trend of the development of the new generation service framework .2021 year ,Dubbo Official release 3.0 edition ,Dubbo3.0 yes Dubbo2.0 And HSF From fusion , Alibaba is facing internal business 、 commercial 、 The only open source standard service framework .
come from Dubbo Website home page
Dubbo3.0 Release , It also comes from the core evolution direction of comprehensively embracing cloud native infrastructure
With K8s Become the de facto standard for resource scheduling ,Service Mesh From its proposal to development, it has been gradually accepted by more and more users .Dubbo This kind of Java Microservice governance system is facing many new demands , Including the expectation that the application can start faster 、 The protocol penetration of application communication can be higher 、 Be able to support multi language more friendly, etc . therefore ,Dubbo3.0 A new service discovery model is proposed for the first time 、 The next generation RPC New capabilities such as protocols and adapting cloud native infrastructure .
Dubbo 3.0 Support application level service discovery
:Dubbo Originally, the interface level registration method was adopted , The data stored in the registry will have duplicate content to a large extent , With the growth of service scale , The amount of data in the registry will explode , Support application level service discovery , Not only greatly reduce the memory pressure of the registry , For greater performance , what's more , It has broken through the gap in address discovery with other micro service systems , It is fitting Kubernetes And other infrastructure , An important step forward .
Dubbo 3.0 Put forward the next generation RPC agreement —— Triple
: This is a base HTTP/2 The design is fully compatible gRPC The openness of the agreement , It has high gateway friendliness and penetration , Fully compatible with gRPC The protocol is natural and has advantages in multilingual communication . This also solves the problem of ecological non interoperability in the previous generation protocol 、 The protocol header can no longer carry more diverse data information .
from Messaging To Streaming and Eventing
If you put RPC As the implementation mechanism of synchronous communication , Then the message queue can be regarded as the implementation mechanism of asynchronous communication . In addition to asynchronous communication , Message queuing can also be used for decoupling 、 Peak shaving and valley filling 、 Scenarios such as distributed transactions , This pair of message queuing in performance 、 Put forward higher requirements for stability .
2011 year , At that time, Shuang 11 Messages are often delayed for half a day or more , The problem that the merchant cannot see the goods that the buyer has purchased . The essence of solving this problem is how to achieve high-speed reading and writing , But based on the previous architecture , Can't solve the problem completely . that , We need to design a new storage architecture . Responsible for the task of new product design , It just landed on RocketMQ founder & Author wangxiaorui .
But there were only two people , One person is responsible for Notify, Wangxiaorui is responsible for the design of new products . But open source , It can gather hundreds of people 、 Thousands of people 、 Tens of thousands of people have come together to develop , It can also absorb all companies 、 industry 、 Business scenario requirements , Bring together the greatest productivity . therefore , From the first day ,RocketMQ Is hosted in GitHub On , In other words, the first line of code is open to all developers and users , The whole development process is also open to users , This has also attracted a lot of developers , Everyone help Review Code 、 test Bug,RocketMQ With the participation of many developers, it has made rapid progress .
2016 That year's double 11,RocketMQ For the first time, the team applied the low latency storage solution to dual storage 11 The support of , Withstood the big test of traffic , The whole promotion period ,99.996% The delay is in 10ms within , The established goal of ensuring the stability of transactions has been achieved , For a distributed messaging engine with an almost balanced read-write ratio , This technological breakthrough , Even on a global scale , It is absolutely commendable . meanwhile ,“ double 11” The volume of news reached trillions on that day , Peak value TPS Tens of millions , It also created the largest information flow record in the world at that time .
RocketMQ And community developers
2016 year , In the diachronic period 3 After months of open source reinvention ,RocketMQ The team started to Apache The donation path of the software foundation , After nearly a year's efforts , stay 2017 year 9 month 25 Japan ,Apache The software foundation officially announced , Alibaba donated to Apache Open source projects in the community RocketMQ from Apache Community graduation , Become Apache Top projects (TLP), This is the first non Hadoop Of the ecosystem Apache Top projects in the community .
It is worth mentioning that , According to the statistics before graduation ,RocketMQ Eightypercent of the new features and ecological integration come from the contribution of the community .
2021 year , Through the continuous efforts of many developers in the community ,RocketMQ 5.0 Official release , The core of the new version includes two new highlights :
First , The message core scenario is fully expanded ,
RocketMQ 5.0 It is no longer limited to the message decoupling scenario , Change the application scenario of the message from Messaging Extended to Streaming and Eventing field
;
2022 year , Batch message index 、 Logical queue publishing RocketMQ-MQTT、RocketMQ-Connect、RocketMQ-Streams, From the business message platform to 『 news 、 event 、 flow 』 Upgrade of integrated fusion processing platform . Developers can implement a message store , Supports streaming computing 、 Asynchronous delivery 、 Integration drive and other scenarios . Realize one-stop solution to technical problems , Greatly reduce the technical complexity and operation and maintenance cost , Simplify enterprise application architecture .
The landing of distributed applications , Just one RPC A framework and an asynchronous messaging system are not enough , You also need a series of components around the distributed application architecture .
Midsummer night for technologists
2018 In the summer , Domestic application middleware open source field , Welcome two new members .
As two important open source components in the micro service ecosystem ,Nacos Focus on dynamic service discovery 、 Configuration and service management ,Sentinel It focuses on current limiting and degradation .
Nacos and Sentinel All in Ali 10 Generated by precipitation under the core business scenario for many years , Their open source is an effective supplement to the open source technical solutions in the field of domestic application middleware , At the same time, it also emphasizes the integration into the open source ecosystem , In addition to compatibility Dubbo, Also support Spring Cloud and Kubenetes Isoecology , To enhance their own vitality .
“Nacos Originated within Alibaba , After more than ten years of double 11 Three products tested by Hongfeng - VIPServer/Configserver/Diamond , It's easy to use 、 Stable and reliable 、 The core competitiveness of excellent performance , And attracted 200 Many excellent contributors , Co iterations 44 A version , Service tiger tooth 、 Good future 、 Xiaomi and other enterprises , stay 2.0 On the milestone version of , Fully upgraded the communication protocol 、 Service consistency model 、 Support service grid ecology and multilingual ecology .” Yanlin is Nacos star breakthrough 2w After that, he shared .
Nacos 2.0 Release , yes Nacos star breakthrough 2w Another milestone in . With Nacos Growth in user size , And user business is becoming more and more complex ,Nacos 2.0 The release of is a necessity .Nacos 1.x Time :
The service found that the performance was not strong enough : stay 10W、5W Under the client level , The server is completely in Full GC state , Push completely failed , Cluster not available ; stay 2W On a client scale , Although the server is running normally , But because the heartbeat is not handled in time , A large number of services are repeated during the removal and registration phases , So it's not stable ,CPU Always high ;1.2W On a client scale , Stable operation , But in steady state CPU Consumption is on a larger scale 2.0 Of 3 More than times .
The configuration management performance is not strong enough : The number of connected clients has reached 6000 when , Steady state CPU Always high , And GC frequent ; When the client scale reaches 1.2w when , It's no longer stable , So it can't support the number of clients of this magnitude . The push scale reaches 3000TPS when , Account for the 80% Of CPU resources ; Once reached 6000TPS when ,CPU Resources have risen to 90%.
Nacos And community developers
Nacos2.0 As a cross generational version , The architecture has been comprehensively upgraded , Once and for all Nacos1.X Performance problems of , Scenarios for service discovery ,Nacos2.0 In the 10w At the next level , Stable operation , comparison Nacos1.X Version of 1.2w scale , Ascension approx 10 times ; For configuration management scenarios ,Nacos2.0 A single machine can support 4.2W Client connection , comparison Nacos1.X, Promoted 7 times , And the performance of push is better than 1.X.
On one side, Nacos Announced that the open source , Gradually iterate to 2.0 edition , Provide enterprise version MSE, On the other side is Spring Cloud The service registration and discovery components under the ecosystem announced that the open source investment was stopped , The game of the brave is full of variables , But in Nacos It seems the team , This game can go to the end by itself : stay 2021 In a survey conducted by a third-party media on the open source solution adopted by the registry in ,Nacos Our market share has exceeded 50%.
Nacos Just one of Alibaba cloud's many open source middleware projects , Then there are more open source projects feeding back to the community , Form ecology , For example, lightweight current limiting degraded components Sentinel.
Factors affecting the stability of the production environment , From the source , We can usually generalize into two categories , One is during the release process , The risk of introducing code changes , One is the risk caused by external irregular traffic . and Sentinel As a high availability open source project , What he wants to solve is the stability risk caused by external traffic .
Middleware developers Meetup ShenZhen Railway Station
2018 year 7 month , Middleware developers Meetup Shenzhen station site , It can only hold 400 Human space , Coming close 700 Developers .Sentinel The founder Zijin announced the lightweight current limiting degraded component on the spot Sentinel The open source .“Sentinel Experienced 10 Multi year double 11 The test of , It covers all the core scenarios of Alibaba , As a result, a large number of traffic consolidation scenarios and production practices have been accumulated .Sentinel Take flow as the starting point , Slave flow control 、 Fusing the drop 、 Multiple dimensions such as system load protection protect the stability of services .”
flow control : The upper limit for a service is 1 Second processing 3000 individual QPS, But if the actual situation is higher than 3000 Of QPS How to solve it ?Sentinel Through traffic statistics , When the traffic exceeds the threshold , Will help the service through direct rejection 、 Cold start 、 The homogenizer has three ways to deal with , So as to play the role of flow control .
Fusing the drop : There will be interdependencies between services , For example, service A 1 It can process tens of thousands per second QPS, But service B Do not have such a high processing capacity , So how to guarantee the service A Call the service at high frequency B when , service B It still works ?Sentinel By limiting the number of concurrent threads and degrading resources in response time , These two methods are used to realize fusing or degradation , So as to ensure the service B It works .
2019 year ,Sentinel Contributing
spring-cloud-circuitbreaker-sentinel
The module was formally merged by the community into Spring Cloud Circuit Breaker, thus ,Sentinel And joined in Spring Cloud Circuit Breaker Club , Become Spring Cloud One of the official mainstream recommended choices .
Open source projects need to continue to expand their capabilities to maintain sustained vitality ,Sentinel More than current limiting degradation , Whether it can also help developers solve many stability risks during the release of new versions , This is about to be released Sentinel2.0 Questions to answer .
Spring Cloud The official recommended microservice solutions are more than Sentinel One , also Spring Cloud Alibaba.
2018 year , China's Java A big thing happened in the circle .Spring Cloud cofounder Spencer Gibb stay Spring The blog page of the official website announced : Alibaba open source Spring Cloud Alibaba, And released the first preview version . And then ,Spring Cloud official Twitter This news has also been released .
come from Spring Cloud official Twitter
Spring Cloud Alibaba The project consists of two parts : Alibaba open source components and Alibaba cloud product components , For the purpose of Java Developers use Alibaba cloud products at the same time , By using Spring The design patterns and abstractions of the framework , Inject Spring Boot and Spring Cloud The advantages of .
Spring Cloud It's a set of microservice specifications , It's not a ready to use framework , and Spring Cloud Alibaba Open source provides developers with the implementation of this specification , This implementation method is very friendly to calling alicloud resources and cloud product capabilities ,
This is for domestic developers 、 Alibaba cloud 、Spring For the three parties , It's all good news .
After summer , The popularity of open source continues
The advantage of efficiency lies in , We can focus our attention and time on things that need more creativity , Do something more fulfilling . For developers working in the field of Engineering , They are more efficient .
2018 year 9 month , Ali will widely use Java Online diagnostic tools are open source , The name Arthas ( Alsace ). Maybe it hit the pain point of developers' online troubleshooting ,Arthas It is the first time since open source Release Version of the release only 147 God , You get more than 1w Of star Count , And there are 40 Many bits Contributors Participate in open source contributions .
Arthas Contributors
from , We not only see Arthas The popularity of this kind of tool based open source projects in the developer community , We also found that more and more domestic developers began to participate in open source contributions , And as a community honor .
technical field , The achievement of all milestones , All come from a technical feeling . So far ,Arthas It's close to 3w star and 146 position Contributors, For an online diagnostic tool , It is a good answer .
The time came to 2019 year .
If the production stage is compared to the college entrance examination , that Sentinel It solves the problem of stability in the matter , Once the traffic increases , It can be handled by current limiting and degradation , and 2019 Open source in Chaosblade Is more ways to improve the high availability of the architecture , Through the establishment of fault drill mechanism , Rehearse all kinds of foreseeable faults in advance , For example, randomly kill nodes 、 Delayed response , Even interrupt the computer room .
Chaosblade and Sentinel Teachers come from the same school , It comes from Alibaba's full link voltage test 、 Online traffic control 、 This set of highly available core technologies precipitated on the fault drill . Zhongting, a senior Alibaba cloud technical expert, said :“ Ali has diversified business scenarios and increasingly complex technical architecture , There will be various faults , The difficulty of fault management has increased by several steps .Chaosblade from 2011 Year begins , Experienced strong and weak dependent governance and construction 、 Local disaster recovery drill 、 Try to rehearse the three phases in the transaction and middleware links , after 6 Years of polishing , Finally, the best practices and tool framework will form a unified standard , Open source externally , help DevOps People shorten the path of building chaotic engineering .”
Today, the microservice architecture is widely implemented , Data consistency problems caused by distributed transactions 、 Performance problems are becoming more and more difficult . Distributed transactions are a bit of a barrier to understanding , But everywhere , He is relative to local affairs , Services and services can be completed without crossing the network , Call it local affairs , Need to cross the network to complete , Call it distributed transaction , For example, the transfer business between banks in the financial industry can only be completed across the network , The e-commerce trade orders call the external inventory system 、 The logistics system needs to cross the network to complete .
Although there are some open source solutions for distributed transactions in the industry , But either the performance is poor 、 Or the data consistency is not enough 、 Or it is highly invasive , Not easy to land . All in all , A little bit. “ Not great ”.
announce Seata Open source Meetup The scene
And this kind of “ Not great ” It is centrally reflected in the distributed transaction open source middleware Seata On , Qing mingzai 2019 year 1 Month middleware developer Meetup Announce distributed transaction middleware on Seata Within a week after the official open source ,Seata And then you get 3000+ star, Community discussion issue reach 58 individual .
Alibaba is one of the first companies in China to carry out application distribution ( Micro service ) Transformed enterprises , Therefore, we have encountered the problem of distributed transactions under the microservice architecture for a long time .2014 Released in TXC, Start to provide distributed transaction services for intra group applications .2016 year ,TXC After product transformation , With GTS Go online as Alibaba cloud , At that time, it became the only commercial product in the industry that provided distributed transactions on the cloud .2019 year , be based on TXC and GTS Technology accumulation , Open source Seata, Build a distributed transaction solution with the community .2022 year , After years of polishing ,Seata Released 1.5.0 Milestone version , This version has 61 name contributor Contributed nearly 7w+ Code , At the same time Seata Enterprise Edition , And in the microservice engine MSE Provide commercial services on . Compared with the open source kernel, the enterprise version RT Reduce 20% above ,TPS Performance improvement 30%, It also solves the transaction processing in high concurrency scenarios “ skin needling ” problem .
TXC/GTS/Seata/MSE In line , The vision is to make the use of distributed transactions the same as that of local transactions , Simple and efficient .
From distributed application architecture to distributed application governance
Governance is not just a continuation of the architecture , It is also the evolution direction of the next generation application middleware technology .
The requirements of distributed application architecture include RPC frame 、 Message queue 、 Service discovery 、 Configuration center 、 gateway 、 Distributed transactions, etc , The solution is the implementation of distributed applications , But as the number of services increases 、 The dependencies between services are more complex , Distributed application governance has become a more urgent need , Including traffic management 、 Develop test governance 、 Database governance 、 Chaos Engineering 、 How to live , The solution is to make good use of 、 Manage the problems of distributed applications .
But apparently , just Sentinel、Chaoblade It is not enough for developers to make good use of 、 Manage the open source demands of distributed applications , So Alibaba cloud once again opened two projects in the field of distributed application governance ,Appactive and OpenSergo.
stay 2022 year 1 At the cloud native actual combat summit in June , Shutong, the person in charge of cloud native application platform, announced that the application is flexible Appactive Official open source . thus ,Sentinel、Chaosblade and AppActive Three highly available carriages have been formed , Help enterprises build stable and reliable enterprise production systems , Improve the ability of enterprises to face disaster tolerance 、 Fault tolerance 、 Capacity control and other steady-state system construction capacity .
2013 year , At that time, Taobao finished going O It didn't take long , The scale of "double 11" has further soared over the previous year . Ali's engineers are facing the following two problems , On the one hand, the computer room resources are very tight , Capacity is insufficient , On the other hand, there is a rare hot weather in Hangzhou , The machine room faces the risk of power failure , The multi live architecture in different places is hatched under this background . later , As the business scale of Taobao evolves , Remote multi activity also ranges from close-up local dual computer rooms to remote remote remote dual activity , And then to unit 4, three places 、 Live more , It has accumulated rich experience in computer room level application .
AppActive The open source , One is to provide a unified specification and definition for dojo , On this basis , We can share mature practical experience , In order to avoid the cost of infrastructure caused by cognitive bias 、 Application transformation cost 、 Operation and maintenance costs and other costs , So that “ How to live ” Become a de facto inclusive technology ; The second is based on standards , Provide the realization of multiple active capabilities at all levels .
In the specification of applying multiple activities , Defined LRA( How much life there is in the same city )、UDA( Different live )、HCA( Mixed clouds live more ) and BFA( The business flow is flexible )4 Layer capabilities . stay AppActive In the first release , Provides BFA and UDA The basic ability of ,BFA and UDA Strengthening ability of 、LRA and HCA The capability of will become the direction of subsequent evolution .
With the help of the above abilities , Enterprises can achieve :
Make full use of resources :
There is no problem of idle resources , Make full use of multiple computer rooms and resources , Avoid waste of resources .
High handover success rate :
Relying on the mature multi activity technology architecture and visual operation and maintenance platform , Compared with the existing disaster recovery architecture , High handover success rate , The success rate of Alibaba's internal flow cutting thousands of times a year is as high as 99.9% above .
Accurate flow control
:
The application of multiple active supports the flow from top to bottom , Relying on the accurate drainage ability, the specific business flow will be sent to the corresponding computer room , Based on this advantage, enterprises can incubate global enterprises 、 Focus on flow guarantee and other characteristics .
Open source in the field of distributed application governance , It's not just open source capabilities , What is more important is the unification of specifications and definitions ,AppActive such ,OpenSergo Also is .
In the pre conference questionnaire of the first Alibaba cloud middleware Developer Conference , Adopt a variety of microservice frameworks or RPC The proportion of developers who mix frameworks is up to 24%.“ The heterogeneity of language and service framework will increase the cost of service governance exponentially , First, the definitions, concepts and capabilities of each open source framework and protocol for microservice governance are inconsistent , Second, our governance models and governance rules are also different , Third, under the cloudy trend , Related to service governance provided by different cloud vendors PaaS service ( For example, Alibaba cloud's Serverless Application engine SAE) Also different , This will make developers have very big limitations in both cognitive and technical iterations .”OpenSergo Founder Wang Tao is accepting InfoQ In my interview, I mentioned .
2022 year 4 month ,OpenSergo Open source , The project is sponsored by Alibaba cloud 、bilibili、 byte , as well as Spring Cloud Alibaba、Nacos、Apache Dubbo、Sentinel、Sofa Community joint maintenance , It aims to build a language independent 、 It has nothing to do with technical form , However, the unified service governance specification and implementation close to the business . His positioning and ability are just like the name of the project ,Open It means open ,Sergo It takes the two English words of service governance Service Governance The first part of the letter Ser and Go, Together, it is an open service governance project .
OpenSergo It contains the following three parts :
Control surface
: Developers can use CRD perhaps Dashboard Way to view 、 Modify the service governance configuration , And distribute these control information to the data surface , thus Unified the rules of service governance , Developers no longer have to bind to an open source solution 、 On the services provided by a cloud vendor .
Data side
:JavaAgent、Servcie Mesh、 Each access OpenSergo All microservice frameworks can receive service governance configuration , And apply it to the current business flow . All data planes can recognize OpenSergo Specified service governance configuration 、 Flow labels and other information , Make sure developers understand the cost .
OpenSergo Spec
:Spec Specifies the communication agreement between the control plane and the data plane , Make sure the user uses a Spec Different frameworks can be described 、 Different protocols 、 Microservice architecture in different languages , Let developers no longer need to pay attention to the underlying differences .
On top of that , And then gradually gray the whole link 、 Lossless online and offline 、 Traffic marking and other capabilities are integrated , Provide a complete set of service governance specifications and implementation schemes .
thus ,10 Open source projects , Covering architecture to governance , Pour out the technologies deposited by Alibaba cloud in the field of application middleware . Start with architecture , Good at management . They are both open source projects that run independently , Developers can cooperate with other open source components to form their own open source technology stack , It is also a complete set of open source solutions for distributed applications , At the same time, multiple open source projects are used to realize the rapid delivery of applications .
The story of open source is not over , Cloud Nativity continues to reshape the rules of the middleware game . The open source category of application middleware has been expanded with containers and Serverless The popularity of technology has been upgraded to the application cloud native , They and Koordinator、KubeVela、OpenYurt、sealer、OpenKurise、Serverless Devs And so on together constitute the open source panorama of Alibaba cloud in the application cloud native field .
The first Alibaba cloud middleware developer conference will be held soon ,
Click on
, Sign up for the conference to get a survey report on the current situation of open source middleware adoption in China .
原网站版权声明
本文为[InfoQ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207061833528570.html