Introduction: On the scene of 2021 Cloud Computing Conference, Ding Yu (Shutong), alibaba researcher and general manager of Aliyun Intelligent cloud native application platform, released 7 major technological innovations and breakthroughs in function computing, accelerating the innovation of modern application architecture.

The essence of Serverless is to achieve the concentration and freedom of business layer development by shielding the underlying computing resources. But the higher the abstraction, the more complex the cloud vendor’s implementation becomes at the bottom. Function calculation will further split the service to the granularity of the function, which is bound to bring new challenges to the development, operation and maintenance, delivery, etc., such as how to carry out the end cloud tuning of the function, how to conduct observation and debugging of the function, how to optimize the gB-level cold start of the mirror? The granularity of these services in the past, are not a problem, has become a stumbling block to the large-scale implementation of the core production business of Serverless enterprises.

On the scene of the 2021 Cloud Conference, Alibaba researcher and General manager of Ali Cloud intelligent cloud native application platform Ding Yu (Shu Tong) released the seven major technological innovations and breakthroughs of function computing, accelerating the innovation of modern application architecture.

Serverless Devs 2.0: the first Desktop in the industry, supporting end-to-end cloud coordination and multi-environment deployment

Serverless Developer platform Serverless Devs 2.0 has been released after nearly a year of open source. Compared with 1.0, 2.0 has achieved all-round improvement in performance and use experience. Serverless Desktop, the first Desktop client in the industry, has carried out fine design for the Desktop client with aesthetic feeling and pragmatism, and has stronger enterprise-level service capability.

As the industry’s first cloud native full life cycle management platform supporting mainstream Serverless services/frameworks, Serverless Devs is committed to creating Serverless application development one-stop service for developers. Serverless Devs 2.0 proposes multi-mode debugging solutions. Including open online and offline environment; The end cloud joint debugging scheme, the local debugging scheme, and the online debugging/remote debugging scheme of the cloud operation and maintenance state debugging. Serverless Devs 2.0 supports more than 30 one-click deployment frameworks, including Django, Express, Koa, Egg, Flask, Zblog, WordPress, etc.

Industry-first instance level observation and debugging

An instance is the smallest schedulable atomic unit of a function resource, analogous to a container’s Pod. Serverless highly abstracted heterogeneous basic resources, so the “black box problem” is the core of Serverless’s large-scale popularization. Similar products in the industry have not revealed the concept of “instance”, nor have indicators such as CPU and memory been revealed in observable functions. However, observable is the developer’s eye, without observable, how can we talk about high availability?

The function calculates the observability of blockbuster release instance level, conducts real-time monitoring and performance data collection for function instances, and makes visual display, providing developers with end-to-end monitoring and investigation paths for function instances. Instance-level indicators enable you to view core indicators such as CPU and memory usage, instance network status, and number of requests within an instance to ensure that the black box is not black. At the same time, function calculation will open part of the instance login permission, so that it can not only observe, but also debug.

The first instance reservation strategy with fixed quantity, timing and automatic water level expansion in the industry

Function calculation of cold start is influenced by several factors: code and image size, startup container, language runtime initialization, process initialization, execution logic, etc., which depends on two-way optimization between user and cloud vendor. The cloud vendor automatically assigns the most appropriate number of instances for each function and optimizes cold startup on the platform side. However, as the delay of some online services is very sensitive, cloud vendors cannot carry out deeper business optimization on behalf of users, such as streamlining code or dependencies, programming language selection, process initialization, algorithm optimization, etc.

Similar products in the industry generally adopt the policy of reserving a fixed number of instances. That is, users are allowed to configure N concurrent values, which will not be extended or contracted after allocating N instances unless manually adjusted. This scheme only solves the cold start delay of some business peak periods, but greatly increases the operation and maintenance costs and resource costs. It is not friendly to the business with irregular peaks and valleys, such as hongbao promotion.

Therefore, function computing takes the lead in granting users the scheduling permission of part of instance resources, allowing users to reserve an appropriate number of function instances through multi-dimensional instance reservation policies such as fixed number, timed scaling, water-level scaling, and mixed scaling. Meet the demands of different scenarios, such as relatively stable business curve (such as AI/ML scenario), clear peak and valley time (such as game interactive entertainment, online education, new retail and other scenarios), unpredictable burst traffic (such as e-commerce promotion, advertising and other scenarios), mixed business (such as Web background, data processing and other scenarios). Thus, the impact of cold start on delay-sensitive services is reduced and the ultimate goal of flexibility and performance is achieved.

The industry was the first to launch GPU instances

Function computing provides two instance types: elastic instance and performance instance. The size of elastic instance ranges from 128 MB to 3 GB, and the isolation granularity is the smallest in the entire cloud ecosystem, which can truly achieve 100% resource utilization in universal scenarios. The performance instance specification range includes 4 GB, 8 GB, 16 GB, and 32 GB. With a higher resource upper limit, it is mainly suitable for compute-intensive scenarios, such as audio and video processing, AI modeling, and enterprise-class Java applications.

With the vigorous development of dedicated hardware acceleration, GPU manufacturers have launched special ASICS for video coding and decoding. For example, Nvidia integrates video coding special circuit from Kepler architecture and video decoding special circuit from Fermi architecture.

Function computing officially launched the GPU instance based on Turning architecture, enabling Serverless developers to load video codec to GPU hardware acceleration, thus greatly speeding up the efficiency of video production and video transcoding.

Delivers up to 2W instances/minute

The so-called “serverless” does not mean that software applications can run without servers, but that users do not need to care about the state of the underlying server, resources (such as CPU, memory, disk and network) and the number of software applications. The computing resources required for the normal running of software applications are dynamically provided by cloud computing vendors. However, users still care about the resource delivery capability of cloud vendors and the access fluctuation caused by insufficient resources in the case of sudden traffic.

Function computing relies on the powerful cloud infrastructure service capability of Ali Cloud, and achieves the maximum delivery of 2W instances/minute in peak business hours through the mutual backup of DCP bare metal resource pool and ECS resource pool, which further improves the delivery capability of function computing in customers’ core business.

VPC network connection optimization: optimized from 10 seconds to 200ms

To access resources, such as RDS or NAS, in a VPC, you need to connect the VPC network. FaaS in the industry generally use dynamic ENI mounting to connect a VPC. That is, create an ENI in the VPC and mount it to the machine that performs functions in the VPC. This solution makes it very easy for users to interconnect with back-end cloud services, but ENI typically takes more than 10 seconds to mount, resulting in significant performance overhead in delay-sensitive business scenarios.

Functional computing decouples computing and network by servising the VPC gateway, and scaling of compute nodes is no longer limited by ENI mounting capabilities. In this solution, the gateway service is responsible for ENI mounting, high availability and automatic scaling of gateway nodes, while the function computing focuses on computing node scheduling. Finally, the cold startup time of the function is reduced to 200 ms when the VPC network is established and connected.

GB image startup: Optimized from minute to second

Function Computing was the first to release the function deployment mode of container image in August 2020, AWS Lambda was re-invented in December 2020, and Domestic friends also announced the heavyweight function of FaaS supporting containers in June 2021. Cold start has always been a pain point of FaaS, and the introduction of container images dozens of times larger than the code compression package aggravates the delay caused by cold start process.

Function computing innovatively invented Serverless Caching. Based on the characteristics of different storage services, it builds a data-driven, intelligent and efficient Caching system to achieve software and hardware co-optimization and further improve the Custom Container experience. So far, function calculations have optimized image acceleration to a high level. Our public use case in function evaluation (github.com/awesome-fc)… 4 typical images, and adapt them to several large cloud vendors at home and abroad for horizontal comparison, call the above images every 3 hours, repeat several times.

Experimental results show that the function calculation has achieved a leap from minute to second level in the scenario of GB mirroring cold start.

One step ahead, aim for a thousand miles

In 2009, Berkley made a six-point prediction about the then emerging cloud computing, including the possibility of pay-as-you-go services and a huge increase in the utilization of physical hardware, which has come true over the past 12 years. In 2019, Berkley again predicted that Serverless computing will become the default computing paradigm in the cloud era, replacing the Serverful (traditional cloud) computing paradigm.

Given the 12-year history of cloud computing, Serverless is just over a quarter of the way through its third year of testing Berkeley’s predictions. During these three years, from the beautiful imagination of the future of cloud, to Serverless First and large-scale investment advocated by cloud manufacturers, to enterprise users making full use of the advantages of Serverless to optimize the existing architecture, and objectively facing the obstacles affecting the large-scale implementation of Serverless enterprise core business, To today, through technological innovation and breakthrough to resolve the common pain points of the industry. This requires not only the courage and courage to go ahead, but also the mission and responsibility to be ambitious.

The original link

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