Summary: If Serverless solves any problem, the core is to save cost and energy.
! [](https://pic2.zhimg.com/80/v2-7023af3154cf9416a0fafb8a7c4d49ba_720w.jpeg)

In recent years, Serverless has been growing at a high rate and showing increasing influence. Mainstream cloud service providers continue to enrich the cloud product system, providing better development tools, more efficient application delivery pipeline, better visibility, more delicate integration between products, but it is just beginning.

Some large domestic companies have some mature Serverless application cases, and some start-up companies have also begun to join the Serverless camp. If Serverless solves any problems, the core is to save costs and energy. Blue Ink is a high-tech company founded by American students who have returned to China. It focuses on new technology research and platform operation in the field of digital publishing and mobile learning in the era of mobile Internet. Relying on the core technology system of blue Ink mobile interactive digital teaching materials independently developed, For publishers, schools and teachers to provide mobile interactive digital textbooks, campus mobile learning platform and teachers self-help digital publishing solutions.

Since its establishment in 2012, Blue Ink’s business has maintained a high growth rate, and its technical team is gradually developing and expanding. From the beginning, the technical team of Lanmo has great enthusiasm for some open new technologies, and is willing to apply the rapid iteration of new Internet technologies to ensure the stable operation of its business system. During the epidemic, the demand for online education has exploded. Lanmo has increased efforts to integrate high-quality course resources in the industry and continuously expand its business boundaries. While winning opportunities, the technical team has also faced unprecedented challenges.

The video processing related business is one of the most difficult problems encountered by the blue Ink technical team. Blue Ink has to deal with a large number of video teaching materials every day, involving a series of complex technical work such as video editing, segmentation, combination, transcoding, resolution adjustment, client adaptation and so on. In the technical practice of the past few years, the blue Ink technical team has established a set of autonomous and controllable video processing mechanism through FFmpeg and other technologies, which supports the rapid development of business. However, this year’s business growth rate is beyond blue Ink’s engineers’ expectation, the peak of the video processing demand dozens of times more than in previous years, the existing architecture is overwhelmed, seriously affecting the user experience.

How to do? Blue Ink’s first idea was to expand!

Horizontal scaling is an immediate solution, but throughout the day, the demand for video processing has very steep peaks and troughs, with a large number of tasks occurring at several peak times and with some degree of suddenness. If the system capacity is planned according to the peak demand, a large amount of computing resources will be wasted, and it is difficult to predict the peak demand. If staggered peak processing is adopted, the cost of computing resources can be reduced, but the demand of users can not be timely processed.

The horizontal expansion scheme was abandoned.

If horizontal expansion fails, can the efficiency be improved from the perspective of video processing? For example, video transcoding services provided by cloud vendors are similar to BaaS. In such a solution, the problem of capacity planning is not considered at all, and cloud services can be invoked according to the actual traffic volume. It seemed feasible, but considering the actual situation of Lanmo’s own business, the technical team was hesitant. Blue ink video processing mechanism is very sophisticated, which contains a lot of custom business logic, need to use the code to achieve, and these functions are the third party video transcoding services can not be realized.

Knock it down and start again! Blue Ink’s core appeal is summarized in three aspects: cost saving, extreme flexibility, and free operation and maintenance. These are exactly the problems that Serverless is best at solving. After the investigation of Serverless services provided by domestic cloud manufacturers, the blue Ink technical team agreed that Ali Cloud function computing is the most suitable solution for them in the field of video processing.

Function Compute (FC) is an event-driven, fully managed Serverless computing service. For users, there is no need to manage servers and other infrastructure, just write and upload the code. Function Compute prepares the computing resources and runs the code in an elastic and reliable manner. Because FC is fully compatible with existing code logic and supports a wide variety of major development languages, the blue Ink technical team can migrate code logic from the original architecture to FC in a nearly seamless manner at a very low cost. By connecting OSS triggers, when a new video source file is uploaded on the OSS, the compute instance of the function can be automatically pulled up to start a video processing service life cycle. By integrating Serverless workflow, the distributed tasks can be arranged uniformly, and the complex operation of parallel processing and final merging of large files after slicing can be realized, which further improves the processing efficiency.

For Blue Ink’s technical team, functional computing is a completely on-demand Serverless solution that takes full advantage of the elastic capabilities of cloud computing. On the one hand, functional computing FC can quickly mobilize computing resources of tens of thousands of instances in a short time to realize the fast execution of video processing tasks; On the other hand, because there is no need to reserve computing resources or maintain the underlying hardware and software, the operating cost can be greatly reduced and the blue Ink technical team can focus more on the implementation of complex business logic. Compared with the traditional method, the Serverless scheme based on FC calculation can help Blue Ink save about 60% of IT cost in video processing scenarios.

! [](https://pic3.zhimg.com/80/v2-eb83bf85e85947920af3a32b0f717a27_720w.png)

The value of Serverless is self-evident. Ali Cloud is the first batch of domestic enterprises to launch Serverless computing services, and Function as a Service is the most representative product form of Serverless. It can be said that Blue Ink is not the first enterprise to enjoy the great value of functional calculation FC, Sina Weibo, Graphite Document, Mango TV and other supporters of functional calculation. Not long ago, at the 2020 Trusted Cloud Line Summit, Ali Cloud Function Computing FC passed 21 tests including basic capability requirements, platform observability, service performance, service and service measurement accuracy, and passed the trusted cloud function as service capability certification with full marks. Earlier, in the report released by Forrester, Ali Cloud computing was given a “strong performer” evaluation.

In addition to expanding more diversified product forms, Ali Cloud function computing has also been constantly optimizing user experience, including doing industry-leading practices such as hard disk mounting, reserved instances, mirror acceleration, large-scale instances, and so on. We really put user needs in the first place and set our heart to make more valuable products for users.

Therefore, LAN Mo firmly chose function computing, and actively explored Serverless transformation scenarios in other business fields other than video processing, and successfully implemented the integration of FC and log services. When flowing write logs to flow through, logging service will automatically trigger function calculation FC to deal with the data, the analysis of important information in the log, realize the exception event alarm, and according to the business rules to store your log is compressed and converted into other media, to better safeguard system stable and efficient operation.

The person in charge of the blue Ink technical team said that in the future, Blue Ink will integrate more scenes with functional computing FC, fully enjoy the technical bonus of cloud native, and improve the fighting strength of the whole team. And Ali cloud will always stand together with users, and win the next beautiful battle!

Author: Middleware little brother

The original [link] (https://developer.aliyun.com/article/769681?utm_content=g_1000169626)

This article is the original content of Aliyun and shall not be reproduced without permission.