How does the e-commerce live broadcast platform use containers and middleware to increase R&D efficiency by 100%?

Introduction: After actual scenario verification and comprehensive user evaluation, the e-commerce live broadcast platform uses comprehensive cloud-native containerization capabilities and middleware product capabilities to greatly increase the efficiency of development, deployment, operation and maintenance by 50% to 100%, which greatly improves user experience , Lay a solid foundation for the sustainable development of the business.

Preface

Live streaming is a new e-commerce model that has developed very rapidly in the near future. The construction of an e-commerce live broadcast platform can be roughly divided into video live broadcast services, CDN, front-end (H5/small programs), big data, and various business backends, such as live broadcast interaction, merchants and operating platforms from a technical perspective. Compared with traditional e-commerce systems, e-commerce live broadcast platforms have some similarities. For example, the system needs to have high concurrency to deal with traffic peaks; but at the same time, live broadcast services also have some unique characteristics:

1. The tidal characteristics of live broadcast services require stronger flexibility and cost optimization solutions.

2. After microservices, higher development efficiency and more refined flow control are required.

3. Live broadcast interaction has very high real-time performance, and the system needs to have the ability to integrate front and back monitoring.

4. The live broadcast business involves the processing of audio and video in the later stage and requires a reasonable allocation of computing resources.

It can be seen that the above features are some non-business requirements. In order to achieve this goal, companies need to invest a lot of additional manpower in IDC for infrastructure construction and maintenance. At present, more and more companies have migrated to or are in the process of migrating to the cloud platform. If these non-business functions can be submerged and the products & technologies provided by the cloud platform can be used to undertake these capabilities, the company will be completely You can focus on the business itself, achieve rapid iteration, independent and efficient, and reduce costs.

The cloud native architecture was born for this.

What is cloud native architecture?

Cloud native architecture is a set of architectural principles and design patterns based on cloud native technology. It aims to maximize the stripping of non-business code parts of cloud applications, so that cloud facilities can take over a large number of original non-functional features in the application ( Such as flexibility, resilience, security, observability, grayscale, etc.), so that the business is no longer troubled by non-functional business interruption, and at the same time has the characteristics of light weight, agility, and high automation.

In order to realize a cloud-native architecture, it is necessary to rely on various cloud-native concepts, practices, and technologies, that is, services such as containers, microservices, DevOps, Service Mesh, Serverless, and middleware provided by the cloud platform. Judging from the definition of CNCF, the adoption of cloud-native technology and management methods will better bring the business to the "cloud" or migrate to the cloud platform, so as to enjoy the efficient and continuous service capabilities of the "cloud".

What cloud native solutions do e-commerce live broadcasts need?

In order to meet the rapid development of the business, the e-commerce live broadcast platform system needs to have some additional capabilities (of course, this may only be a part). Let's take these as examples for the time being to further summarize and abstract the requirements, which can be roughly summarized as the following points:

1. Extreme flexibility and cost;

2. Microservice governance and flow control;

3. Three-dimensional monitoring;

4. Audio and video processing is automated, and computing resources are used on demand.

In order to solve the above pain points, the next step is to focus on the e-commerce live broadcast platform, and introduce in detail a set of cloud native solutions provided by Alibaba Cloud in some typical business scenarios.

Container Service ACK solves the demand for cost and extreme flexibility

Traditional architectures often face the three major pain points of low publishing and iteration efficiency, slow expansion during peak periods, and high complexity of operation and maintenance when dealing with new Internet-based services such as "e-commerce live broadcast". At the same time, the live broadcast service has a typical instantaneous traffic impact problem, the peak value cannot be effectively estimated, and the peak period is sensitive to delay, and the expansion of the K8s Node node solution cannot meet the business needs.

The live broadcast business can use the Alibaba Cloud container service ACK + VK (Serverless ECI infrastructure) architecture to solve the live broadcast business's demand for cost and extreme flexibility, which is specifically reflected in:

  1. R&D efficiency increased by 100%;
  2. Operation and maintenance resources are basically liberated;
  3. Elastic Serverless ECI reduces resource cost by 60%~70%.

At the same time, through the management registration form, other cloud platforms and IDC self-built K8s clusters can be unified management, helping customers smooth out the differences in log collection, monitoring and other operation and maintenance management in the multi-cloud architecture, and greatly improving the overall operation and maintenance efficiency .

The microservice engine MSE provides a comprehensive microservice governance solution

During the live broadcast, merchants and viewers interact with each other to place orders, and the live broadcast front-end and back-end business systems frequently interact. The live broadcast background business system adopts a microservice + container architecture, and the business system has been split into microservices according to different modules (such as stores, commodities, and orders). At the same time, in order to meet business needs, the business system needs to have the ability to control flow, that is, to deploy multiple versions of certain microservices, and divert specific user requests to a specific version for processing.

As we all know, after the system adopts micro-service deployment, the call link becomes complicated. In addition, in the container environment, factors such as the instability of the POD IP have brought certain difficulties to the realization of flow control. We can use the microservice governance solution provided by Alibaba Cloud Microservice Engine (MSE).

The microservice engine MSE provides a comprehensive microservice governance solution for microservice applications, including service authentication, lossless offline, outlier instance removal, service degradation, canary publishing, label routing and other functions. Among them, the label routing function can simply and perfectly realize the ability of flow control in the K8s environment. During the microservice publishing process, you only need to edit the YAML file to add custom tags, and at the same time bind the request parameters (such as http header, etc.) with the previously created tags in the MSE console.

 

Through this scheme, not only can the problem of flow control be solved non-invasively in the production environment, but also the label routing function can be applied to scenarios such as branch testing in the development and test environment.

ARMS provides a complete three-dimensional full-link monitoring solution

The e-commerce live broadcast system includes the H5 page and the front-end layer of the applet, the microservice application layer, the middleware layer (MQ, Redis, etc.), the database layer, and the basic resource layer. Any problem in any link in the system may lead to a business request. abnormal. Combining business requirements, operation and maintenance efficiency, resource costs and other factors, applications deployed on the cloud can provide a complete set of three-dimensional full-link monitoring solutions for live broadcast services through Alibaba Cloud Application Real-time Monitoring Service (ARMS).

Panorama of the ARMS field

In the live broadcast scenario, the functions provided by ARMS solve several practical problems such as the following:

  1. During the live broadcast process, if the user makes an error in the front-end ordering and other operations, the front-end and back-end chain tracking functions provided by ARMS can be used to connect the front-end and the back-end to achieve one-stop troubleshooting.
  2. After slow calls occur in the system, it is necessary to locate the bottleneck in the entire link. This bottleneck may occur in network delays, microservice applications, or components such as caches and databases that applications rely on. Development and operation personnel can use ARMS provides white-screen link monitoring and problem diagnosis capabilities to quickly locate.
  3. The ARMS console is equipped with complete monitoring and alarm capabilities for core business and resources, and it is pushed to engineers through SMS, DingTalk, Webhook and other methods for the first time to investigate, find problems in time and reduce business losses.

Alibaba Cloud Function Computing solves problems of automation and efficiency

After the live broadcast initiated by the live broadcast platform ends, there are usually some playback videos that need to be processed, such as transcoding the video or other processing before performing secondary distribution. Usually, in order to realize this function, we need to build our own transcoding server, but due to the natural tidal nature of the live broadcast business, most of the time these transcoding servers are in the idle stage and cannot achieve the maximum utilization of computing resources and cost optimization.

Alibaba Cloud Function Computing FC event trigger mechanism perfectly solves the problems of automation and resource utilization. Developers can deploy transcoding logic to function calculations and configure OSS event triggers. When new live playback videos are uploaded to OSS, function calculations can be automatically triggered for transcoding and distribution.

The advantages of this program are:

  • Quick  launch : Users are based on FFmpeg's self-built transcoding service. Many of the command parameters in it are parameters that are well practiced online. Function calculation supports seamless migration of user commands. The version of FFmpeg can also be customized.
  • Flexible and highly available: Computing power is no longer a bottleneck, and a large number of computing resources are quickly mobilized for acceleration and parallel transcoding.
  • Cost reduction:  Video transcoding is CPU-intensive, and pay-as-you-go based on function calculations, which can greatly reduce transcoding costs.

to sum up

Combining the content discussed above, let's look at the deployment architecture of a complete e-commerce live broadcast platform after adopting the Alibaba Cloud cloud native solution as follows:

After actual scenario verification and comprehensive user evaluation, the e-commerce live broadcast platform greatly improves the development, deployment, operation and maintenance efficiency by 50% to 100% with the help of comprehensive cloud-native containerization capabilities and middleware product capabilities, which greatly improves user experience. A solid foundation has been laid for continuous business development.

Author: deer mysterious, Ali cloud solutions architect

Original link

This article is the original content of Alibaba Cloud and may not be reproduced without permission

Guess you like

Origin blog.csdn.net/xxscj/article/details/113879427