Introduction to On July 2, 2021, the first offline event of the Alibaba Cloud User Group (AUG) was held in Jinan. Alibaba Cloud native senior expert Li Guoqiang combined his own experience in the field of microservices to share with dozens of Shandong enterprises the evolution and application practice of one of the representative technologies of cloud native "microservices". This article is organized based on the author's on-site speech.

On July 2, 2021, the first offline event of the Alibaba Cloud User Group (AUG) was held in Jinan. Alibaba Cloud native senior expert Li Guoqiang combined his own experience in the field of microservices to share with dozens of Shandong enterprises the evolution and application practice of one of the representative technologies of cloud native "microservices". This article is organized based on the author's on-site speech.

background

In the enterprise, it is divided into operation and maintenance or development, but in the end all things are done to solve business problems. If you do something with only technical goals and no business goals, failure is very common.

What kind of business demands will drive an enterprise to consider microservices?

With the evolution of the architecture, when your business becomes more and more complex, more and more components, the independence requirements for each business component or the heterogeneous cost of the technology stack becomes higher and higher, you will need to consider micro service. In other words, if the business is relatively stable and has no major challenges, there is no need to transform microservices.

1616e7b0a41643 Enterprises need to analyze whether they really need Many companies may have their own demands for communication, or architects and CTOs, who want this technology to lead the way in microservices, but they end up dismal. In fact, there are many such cases. The applicability of microservices must be considered from the perspective of a business driver, and what needs to be considered is the complexity of the business.

Comparing a difference between monoliths and microservices, under what circumstances it is needed, and complexity is very related. When the complexity of one of your business is relatively low and in the monolithic era, the front-end and back-end databases are integrated. When changes are needed, a data package goes up, and all this business goes up. And, when your business is simple enough, the single efficiency must be the highest.

Business continues to evolve, and when the complexity becomes higher and higher, unilateral releases may affect others. For example, I have a data packet that corresponds to a module. When this module goes online, I need to consider how other modules go online. When business traffic is expanded or contracted, it is necessary to communicate with the entire business instead of communicating with a single module. You will find that the waste of resources will be high. At this time, there will be some turning points. Whether it is your release or your resource utilization, there will be some problems, and production efficiency will begin to decrease. The inflection point of the efficiency of the monolithic application architecture is a point in time when customers consider whether they need a microservice architecture.

Application architecture of microservices

1. The evolution of application architecture

In the early days of microservices, they were actually single products. The current microservices have not placed some mainstream technology frameworks, such as the Double class of the two-quarters of the Java system, and other languages. But in fact, other languages have a lot of microservice frameworks to choose from, such as PDP, etc. will have some.

Before the Yunqi Conference conducted a statistics, the account system's status in the entire back-end development, 50% of the votes were for Java back-end development. But now that companies are becoming more and more diversified, the former dominance of Java has changed. Larger companies are basically diversified systems. There are many types of systems. Different business lines have different demands. Some business lines may be Java; some businesses tend to be front-end frameworks and use PAP and PYTHON; others are corporate Mergers and acquisitions will also bring many yuan systems.

The solution to multiple data is to use a variety of dimensional schemes or new technical forms, and then containerization. Many problems caused by microservices are solved through containers. Including micro-servers, some people may simply give up. The person in charge sees the Double system and directly uses the K8sS Service as its operating exposure unit. The advantage is that it has nothing to do with language. It can be a K8s Service in any system. However, there will be more problems exposed after using microservices, and we need to govern so many business components.

K8s itself is not strong, just to further solve this problem, more grid technology has been introduced. Last year, more and more companies began to build grid networks, which included the use of Service Mesh, a service network, to solve cross-language research and service governance. There is also a newer technology called Dapr that solves the problem of supply chain dependence.

It can be found that the evolution of application architecture is a business that constantly raises questions and then produces new frameworks. The new frameworks may introduce new problems and continuously promote the operation of the technology.

Alibaba application architecture evolution

The entire Alibaba has gone through the above process completely, because the rapid growth of the business has continuously challenged the technical team. PHP is the best and earliest language in the world, and Taobao Mall actually uses PHP. However, after business development, Taobao's volume became faster and faster, not only could not support this business, but also the expansion ability of PHP itself.

In 2009, Ali first did a distributed business. Ali officially changed from a single entity to a distributed business. At that time, the volume was already relatively large, and there was no Double Eleven, but it had already promoted Ali to build its own distributed framework internally. In addition to the distributed service framework, there are also some distributed databases and distributed corresponding regulations, which are called three carriages internally. These are also three things that must be solved when changing from a single to a distributed framework. .

In 2011, Ali began to explore containerization, first doing the T4 project, which is the technical realization of containerization, and finally became the realization of Pouch's containerization, which is also the realization of containerization that conforms to the container standard. This shows that containers are a very good solution for the operation and maintenance challenges brought about by microservices.

In 2013, the entire Oracle, including minicomputers, went offline in Ali, and all became its own open source technology stack. Since 2015, Alibaba has fully embraced cloud native technology, including the opening of container technology to the outside world, and the entire system has gradually deepened. From 2016 to 2019, Alibaba did cloud native migration, including the K8s system that has been fully embraced, as well as the transformation and governance of microservices.

Up to now, what we have done is the last stage drawn on the picture: based on the grid's further support for service points, multi-language is becoming more and more common. Many businesses of Alibaba are merged from outside. Alibaba’s original set of technology strategies are all Java, which is very unfriendly to users who merged from outside, because they cannot all be equipped to restart and have to adapt to Java. Therefore, what we are doing recently is to evolve a new generation of grid-based microservice architecture. There will be some technologies that will make the microservice framework itself better support for diversification, including governance that can also be decoupled. One reason for the higher cost.

2、Apache Dubbo 3.0

Dubbo 3.0 has released the latest version at the end of June, which is actually a very bumpy project. Dubbo was officially released internally in 2008 and officially open sourced in 2011. In the past, Dubbo and HMPK existed within Ali, but Ali hopes to be technically unified, and does not hope that there are two sets of technologies, and the two sides are not interoperable. These are two technology stacks, so a PK was conducted and Apache Dubbo won, so Alibaba is currently all Apache Dubbo. Now this is also the most popular Apache framework in the country. For a while, Ali's internal investment was relatively small. By 2017, our middleware team once again went to commercialization and restarted the entire Dubbo open source, which allowed Apache to complete the release from a complete project to a few days ago.

This project is very active, and the current contribution and utilization rate are very high. Dubbo 3.0 actually did a lot of things to embrace some of the latest concepts, such as support for Service Mesh, its protocol is also better compatible with GRP, and a series of brand new service discovery modes have been made. Now the 2.7 and 2.6 versions are more commonly used in China. After 3.0 is released, many companies prefer it once it is used. Before it was released, there was a user in the community who started testing with 3.0.

3、Spring Cloud Alibaba

Another thing that has to be praised is the Cloud system. It and Java's microservices are the two systems that are currently the most popular. The advantage of the Spring Cloud system is that the components are very rich. In the past two years, Dubbo has moved from the IPC framework to the mainstream server to the engine, and the beginning of Spring Cloud was to support the microservice data related departments.

Afterwards, Alibaba made Spring Cloud Alibaba, and Alibaba open sourced a series of middleware, including Double registration center, configuration center, current limit transaction rules and transactions, to help users solve the various problems in the microservice system just mentioned. .

Microservices are a whole system, not just a simple calling framework. Ali attaches great importance to the problems encountered in the implementation of microservices. It open-sources some of the important points, and combines the two parts together by combining with Alibaba Cloud to make the SDK sub-installation. One of the main purposes is to help users use the Spring Cloud system, and the other is to help users run Spring Cloud better on Alibaba Cloud. So, this is Alibaba's Cloud.

The Nacos, Sentinel and other middleware that most users know about actually have a very good foundation with some cloud products. We will also work with other companies to jointly develop and continuously evolve the project. Because at Alibaba, we believe that open source and commercialization are equally important. A team needs to undertake both open source projects and commercialized services.

Microservices are not a free lunch

1. Microservices will increase complexity

Microservices are not free, and they will bring a great increase in complexity, including the selection of the service framework and the stability of the registry. When a customer is large enough, he will face a big problem, that is, the stability of the registry may become a business bottleneck, including application monitoring, unified configuration management, task scheduling and a series of things will become Issues that need to be considered during the implementation of microservices.

In this process, the challenge to the entire enterprise is still relatively large. Not every enterprise has the ability to operate and maintain all the development components of the entire microservice by itself. If all these components are operated and maintained by themselves, the requirements are still relatively high. Therefore, it is hoped that companies will pay more attention to some of the relatively operational aspects of the business, and cloud vendors may solve them in other ways, or if the company is strong enough, they can also go through open source and self-built methods. solve.

2. There is a "step difference" between software architecture requirements and infrastructure capabilities

I just mentioned that Spring Cloud and Dubbo are very easy to use, but in fact there are problems, that is, the SDK upgrade will become very difficult, because this upgrade has no value to the business, and the business side is unwilling to cooperate. In many cases, the system says that there are bugs in 2.6, and you need to upgrade to version 2.7. At this time, you need to push the business side to do it, because he cited the SDK. If there is a bug or an enhancement after the introduction, it needs to be done in the SDK. At this time, the business side is often unwilling. This problem also exists within Ali.

In fact, this involves a relatively large topic, that is, where is the boundary between business developers and infrastructure operation and maintenance personnel. Does the matter of SDK belong to business personnel or basic knowledge? This question is very abstract, and it is a question of everyone's responsibility boundary. Business developers think that the SDK is for operation and maintenance testing, because I only need the interface, and the remaining updates, governance, engineering, and business development have nothing to do. Operation and maintenance personnel have to let R&D personnel to cooperate with business research and development. This is a vague boundary and conflicts will inevitably occur.

Therefore, from a cloud perspective or from a computing perspective, when we discuss the so-called software architecture speed and the richness of infrastructure capabilities, can we reduce all the capabilities that are not so related to the business and the completion of the business to the operation of the infrastructure? The dimension team, this is a question that has been thinking about. Have experienced several generations in the drill:

  • The first generation is cloud computing. It turns the infrastructure thing down from the business side, and business personnel no longer need to care about basic resources.
  • The second is container and promotion security. After the operation and maintenance becomes simpler, developers will not care about this layer, but the SDK intrusion is an aggression for business developers.
  • The problem of stripping is also done on the technology of Service Mesh. It filters all running state governance capabilities and traffic management capabilities from the user-side, development and test SDKs, and no longer needs to do SDK production. This also means that after using Service Mesh, users do not need to do language binding, which also solves the problem that is difficult to solve in the fuzzy area just mentioned. This may be considered for companies that are currently using Spring Cloud. Will this thing be a replacement for any single-language microservice framework technology?
  • In the future, there is actually another kind of dependence. For example, when you need a middleware, you must make a selection, which requires the cooperation of business developers. A separate idea is that I can let you sink this middleware into the infrastructure. At this time, all business developers really only need to care about the business code, and all these infrastructures are downloaded, which is to continuously enrich the infrastructure capabilities to meet the independent development trend of upper-level business.

3. Service Mesh strips service and traffic management capabilities

Service Mesh is a framework for service governance and traffic governance. In the original design, it was part of the business, with the business code above and these capabilities below. One of the most important things that Service Mesh can do is to strip these capabilities into Istio. The business belt is purely business functions with clear boundaries. The service governance and traffic governance framework are served by the operation and maintenance team.

All upper-layer languages and all lower-layer infrastructures are abstracted through layers of unified interfaces. Regardless of whether Rock MQ or Rabbit MQ is used, it is insensitive to the upper-layer business. It will give the upper-layer business a unified abstract API, and it is an enterprise API such as HTTP or gRPC. The developer no longer cares about what is underneath, and further decouples the developer from the following.

Target ideal architecture

In the end, what is the real ideal framework? Where is the boundary between developers and business people? We drew an ideal frame.

  • For the upper level, we expect that different business units can choose different languages and frameworks. For example, some are monolithic, and some are Spring Cloud or Dubbo. From the calling level, they are completely interoperable and can be connected to the technology of Service Mesh, or the existing framework
  • For the container service in the middle, the business will no longer be aware of the specific middleware.
  • Further down is the container service, which serves as a support for the entire location.
  • On the right is its support system, such as microservices will bring some complexity, you need to monitor your Devops process CICD or security support through observability.

At this time, you can let your business developers use the language they like to develop the business they want, and no longer care about all the problems that the infrastructure team needs to solve. This is actually in terms of application frameworks or microservices. The ultimate goal.

Microservices practice case

1. Micro Service Engine (MSE)

When we do microservices, we will encounter some problems. One way to solve this is to build the country itself, which is relatively heavy for some companies. Alibaba Cloud will turn some of these common things into products to provide. For example, if you want to build a microservice, you need to configure functions, gateways, and governance capabilities. Alibaba Cloud will give you directly in the form of a product, instead of building it yourself. It's as if I originally built it by myself, and now the data that affects his startup is different. For you, Nacos, which was originally built by myself, is now a cloud product provider.

2. Chanjet

In another case, Chanjet is a wholly-owned subsidiary of UFIDA. This client specializes in financial systems for small and micro enterprises. It is fully uploaded to Alibaba Cloud, turning all its financial systems into a SaaS-based delivery model. Everyone knows that the traditional financial system ERP, etc. are all based on a single architecture, and Chanjet's entire financial system has also undergone a transformation from a virtual machine to K8s. In the beginning, we ran the microservice from the virtual machine, and then switched from the virtual machine to K8s. On the whole, the scale of the cloud is very large, and it also serves a lot of customers.

The process from containerization to microservices is basically the same problem. It is hoped to improve the system's microservice governance and monitoring capabilities, and to ensure the stability and robustness of the system in the rapid launch of new businesses and frequent version iterations. It used some Alibaba Cloud projects at the beginning, and later wanted to turn it into Spring Cloud. Now it is a combination of the two.

3. Alibaba Cloud Service Grid ASM

The product technology of the service grid was probably released for production last year, but in fact, the companies that really landed in production are still constantly trying. Alibaba Cloud is the same. It uses a product to reduce users' use of Service Mesh, because Mesh is just a technical concept for many companies. What companies want is a diversified microservice capability, and ASM service network products will help Users do a landing of the service network.

4. Sunmi Technology completes microservices through Service Mesh

Shanghai's Commodity Technology is used to make various Internet of Things devices. The problem it encountered is that the internal technical framework and language system are relatively complex, and various languages and services have encountered difficulties. It hopes to carry out a unified traffic management for these services, including traffic management at the time of release, so it finally chooses to use the technology of Service Mesh to solve multiple microservices. It can be seen from these business value data that, for example, update iterations, exception investigation, and control surface resource costs have been greatly optimized.

The above is about the evolution and practice sharing of microservices. I hope to bring you some sort of microservice systems.

Copyright Notice: content of this article is contributed spontaneously by Alibaba Cloud real-name registered users. The copyright belongs to the original author. The Alibaba Cloud Developer Community does not own its copyright and does not assume corresponding legal responsibilities. For specific rules, please refer to the "Alibaba Cloud Developer Community User Service Agreement" and the "Alibaba Cloud Developer Community Intellectual Property Protection Guidelines". If you find suspected plagiarism in this community, fill in the infringement complaint form to report it. Once verified, the community will immediately delete the suspected infringing content.

阿里云开发者
3.2k 声望6.3k 粉丝

阿里巴巴官方技术号,关于阿里巴巴经济体的技术创新、实战经验、技术人的成长心得均呈现于此。


引用和评论

0 条评论