MSE Serverless is officially commercialized to build a low-cost and highly elastic microservice architecture

Author: Wensi

The microservice architecture fully improves research and development efficiency and solves the problem of rapid iteration of complex business systems. However, with the evolution of business and technology, various microservice components have become increasingly complex. There are still many challenges in how to achieve more agile development, reduce microservice development and operation and maintenance costs, achieve full-link flexibility, and ensure the stability of the entire system.

For example, in the absence of unified specifications or collaboration between multiple development teams, microservice components and SDK versions may be inconsistent. However, considering factors such as version compatibility and upgrade impact scope, many users do not dare to upgrade, leaving hidden dangers. . When doing capacity planning, it is difficult for users to evaluate appropriate resource requirements based on business volume. The cost of using large-sized instances is too high, and using small-sized instances will affect stability when encountering sudden traffic. If the business is developed by an ISV, after the project delivery and acceptance is completed, the operation and maintenance responsibilities of some basic components are not clear. If there is a lack of professional inspection and monitoring and alarm mechanisms, it is easy to cause online failures.

Microservices Serverless Trend

As a major trend in the evolution of microservice architecture, Serverless technology can maximize technical dividends and resource utilization and solve the above problems. It allows developers to focus on business implementation without having to worry about where the underlying server is, whether resources are sufficient, and when to expand or upgrade.

In terms of R&D collaboration and iteration efficiency, microservices themselves are highly cohesive and reusable. With Serverless infrastructure, they can be upgraded to assembled R&D. At the same time, users can use the full-link traffic control capability of microservice governance to quickly build a logically isolated daily environment. While saving resource costs, the construction time of the development and test environment is reduced from days to minutes, which greatly liberates developers. productivity. For basic components such as gateways, registration configuration centers, MQ, databases, and Redis cache, it is obviously not economical to ensure their stability through resource redundancy.

Through Serverless cloud products, you can quickly achieve full-link resource elasticity and enjoy automatic upgrades and other operation-free capabilities. These basic components are provided through Backend as a Service. Developers do not need to get involved in complex configuration integration work, but focus on development tasks. For the business side, even after the ISV completes the delivery of the project and withdraws, there is no need to worry about the operation and maintenance, technical support and stability guarantee of the basic components.

MSE Serverless Features

It is in compliance with this technology trend that Alibaba Cloud MSE took the lead in the microservice industry to launch the Serverless version. It has three major functional highlights. The first is adaptive elasticity. The cloud native gateway and registration configuration center can automatically expand and contract according to business volume, eliminating the need for complex capacity planning for users. For the registration configuration center, its resource consumption is related to multiple factors, such as the number of service providers, the number of client connections, TPS, etc. But some indicators are difficult to observe and plan ahead. As a key traffic entrance, the gateway can predict daily business traffic, but it is difficult to judge unplanned traffic. Through the adaptive elasticity of cloud services, the stability of the entire technical architecture and cost control can be ensured.

The second point is that it can be used out of the box without operation and maintenance, which greatly reduces the user's operation and maintenance burden. MSE summarizes key events of the registration configuration center, cloud native gateway, and service governance, such as instance changes, node startup and shutdown, application online and offline, current limiting and circuit breakers, etc. into a unified view to facilitate problem analysis and troubleshooting. MSE Serverless instances will perform pre-checks and automatic upgrades during user-defined operation and maintenance time periods. It not only ensures that components are in the latest stable version, but also relieves users' concerns about compatibility or impact on business traffic. In addition, many users lack the awareness or experience to configure alarm rules. MSE Serverless instances also support default alarm configuration. When some serious events occur, users can be notified as early as possible and intervene in a timely manner.

Last but not least, MSE Serverless's billing method is related to business volume, and the threshold is lower. Ordinary instances are charged according to fixed specifications. For small-scale businesses in the early stages of entrepreneurship or during peak business hours, there will actually be a waste of resources. The MSE registration and configuration center Serverless is billed based on the number of client connections, and the cloud native gateway Serverless is billed based on the number of requests. This will save a lot of costs for test environments, tidal businesses, and small and medium-sized businesses.

Build a highly elastic microservice architecture

If users want to build a full-stack, highly elastic microservice architecture by themselves, they need to weigh factors such as the ease of expansion and contraction of each component, the speed of expansion and contraction, and the rate of change of business load. If it is based on the MSE Serverless version and combined with Alibaba Cloud's other cloud product capabilities, the above goals can be easily achieved. As shown in the figure below, user business traffic enters the cloud native gateway Serverless instance through NLB and is routed to applications deployed on ACK or SAE. Products on the entire link have adaptive elasticity capabilities.

When the number of application copies increases with business traffic, the number of connections and TPS required to access the registration configuration center will also increase, and Nacos and ZooKeeper Serverless instances will also be elastically scaled accordingly. As for service governance, it itself is application-level on-demand access. When an application on SAE or ACK turns on service governance, the expanded application copy will automatically enjoy the service governance capabilities. Alibaba Cloud now has more than 20 serverless products, and will continue to promote the comprehensive serverlessization of core products. Through Serverless cloud services, users can build an overall highly elastic and low-cost microservice architecture.

The following test case shows how the cloud native gateway Serverless instance cooperates with the ACK container cluster, using the QPS indicator in the log record and the container HPA mechanism to achieve overall expansion according to the request volume.

For the application load deployed in the container cluster, we create an HPA resource, set the minimum and maximum number of replicas, define QPS as the indicator, and trigger expansion when the average QPS of each replica reaches 50.

After running the stress test tool for 10 minutes, the requests sent to the gateway gradually increased from 400 TPS to 4000+ TPS. It can be seen that all stress test requests are 100% successful, and the average RT remains at the level of 9 to 10 milliseconds. In fact, the gateway service and application copies in the container cluster are automatically expanded. The entire process is completely transparent to users and has no business awareness.

MSE Serverless applicable scenarios

Although MSE Serverless has many advantages, it must be selected based on scenarios. How to choose between ordinary instances and Serverless instances? Here we list the similarities and differences in functions and applicable scenarios between the two. In terms of high availability, both instances support multi-availability zone deployment of multi-node clusters, but the SLA is slightly different. In terms of operation and maintenance, users need to manually upgrade the version of ordinary instances, pay attention to the underlying resource monitoring indicators, and manually change the configuration in time when the threshold is reached. Serverless instances will be automatically upgraded and elastically expanded and reduced. Users do not need to do complex capacity planning and manual configuration changes, nor do they need to care about monitoring and alarming of resources such as CPU and memory.

For cloud-native gateways, ordinary instances support slightly more communication protocols and authentication types, and have hardware acceleration and scalability capabilities. Serverless instances also support mainstream protocols and authentication methods, which can cover most user needs.

To sum up, Serverless instances are more suitable for small and medium-sized businesses, intermittent tidal scenarios, and test environments. Moreover, users hope to avoid operation and maintenance and use back-end services more easily. Ordinary instances are aimed at users with medium and large-scale businesses who want to control part of the operation and maintenance work and have more autonomy and scalability requirements.

How to reduce costs with MSE Serverless

Whether users build their own instances or use ordinary instances, they generally purchase relevant specifications based on high business loads and pay according to fixed resources. In this way, more resources are wasted during the trough period, and the overall cost is higher. If unexpected large business traffic occurs, insufficient resources will damage the business. Serverless instances can quickly and independently expand and shrink. While quickly responding to business changes, they can reasonably optimize usage costs and help enterprises reduce costs and increase efficiency.

Registration and Configuration Center Serverless instances are billed based on the total number of connections from the client to the server. Every ten connections are a billing unit, with tiered pricing and hourly billing. The specific prices are as shown in the table below. Assume that the user's business volume is stable, as shown in the line chart, the orange line represents the monthly price of Serverless instances, and the blue line represents the monthly price of the professional version cluster of ordinary instances. When the number of hourly connections is consistently ten or less, the monthly fee for a Serverless instance is 115 yuan. Even if the business volume reaches 50 connections, the cost of self-construction is lower than that of Nacos or ZooKeeper. Within 100 connections, Serverless instances are cheaper than ordinary instances, so they are better for small and medium-sized businesses.

The cloud native gateway Serverless instance counts the number of requests processed per hour. Every 10,000 requests is a billing unit. The pricing is tiered and billed hourly. The specific prices are as shown in the table below. Assume that the user's business volume is stable, as shown in the line chart, the orange line represents the monthly price of Serverless instances, and the blue line represents the monthly price of ordinary instance clusters. The cumulative number of requests per hour is within 50,000, and the cost of Serverless instances is lower than that of open source self-built instances, and the cost is within 200,000 requests, which is lower than that of ordinary instances.

The above assumption is that the business volume is small and maintains a certain level. In addition, Serverless has lower cumulative costs for intermittent and tidal scenarios. As shown in the histogram below, assume that the business volume changes significantly within 10 hours. At the beginning, the request volume per hour was 200,000 to 300,000, with a peak of 2 million per hour, and then gradually fell back. For key entrances such as gateways, ordinary instances need to reserve resources to ensure that they can support the business peak of 2 million requests. But for Serverless instances, its cost varies with business volume. Although the hourly cost of Serverless instances is higher during peak periods, when the costs for the entire period are accumulated, it is clearly more cost-effective.

The MSE Serverless version has been officially commercialized on November 17, and a corresponding savings plan has been launched. Users can prepay by committing a certain amount of consumption per day based on the daily cost of the registration configuration center and cloud native gateway Serverless instances, and can enjoy 8 Discount discounts ranging from 95% discount to 95% discount can further reduce users’ long-term usage costs. With a monthly consumption of less than 100 yuan, you can enjoy a three-in-one cloud native gateway including K8s Ingress, microservice gateway, and security gateway, or a stable, secure, and maintenance-free registration and configuration center. Come and build your serverless microservices Structure it!

Related Links:

Introduction to MSE Serverless instances:

https://help.aliyun.com/zh/mse/getting-started/mse-serverless-instance-introduction

Register the configuration center instance and version selection:

https://help.aliyun.com/zh/mse/product-overview/select-an-edition

Registration Configuration Center Serverless instance billing overview:

https://help.aliyun.com/zh/mse/product-overview/serverless-instance-billing-overview

Cloud native gateway instance selection:

https://help.aliyun.com/zh/mse/product-overview/select-a-gateway-instance

Cloud native gateway Serverless instance billing overview:

https://help.aliyun.com/zh/mse/product-overview/serverless-instance-billing-overview-1

Broadcom announces the termination of the existing VMware partner program deepin-IDE version update, replacing the old look with a new look Zhou Hongyi: Hongmeng native will definitely succeed WAVE SUMMIT welcomes its tenth session, Wen Xinyiyan will have the latest disclosure! Yakult Company confirms that 95 G data was leaked The most popular license among programming languages ​​in 2023 "2023 China Open Source Developer Report" officially released Julia 1.10 officially released Fedora 40 plans to unify /usr/bin and /usr/sbin Rust 1.75.0 release
{{o.name}}
{{m.name}}

Guess you like

Origin my.oschina.net/u/3874284/blog/10438875