Author|Wang Chen et al.

The essence of Serverless is to realize the concentration and freedom of business layer development by shielding the underlying computing resources. But the more abstract it is, the more complicated the implementation of cloud vendors at the bottom. Function computing further splits the service into the granularity of the function, which will inevitably bring new challenges to development, operation and maintenance, and delivery, such as how to perform terminal-cloud joint debugging of functions, how to observe and debug functions, and how to Optimize the cold start of GB-level mirroring? In the past, the granularity of services was not a problem, and it became a stumbling block to the large-scale implementation of serverless in the core production business of enterprises.

At the 2021 Yunqi Conference, Alibaba researcher and general manager of Alibaba Cloud's intelligent cloud native application platform Ding Yu (Sutong) announced seven major technological innovations and breakthroughs in functional computing, accelerating the innovation of modern application architecture.

11.png

Serverless Devs 2.0: Desktop is the first in the industry, supporting device-cloud joint debugging and multi-environment deployment

Open source for nearly a year, Serverless Devs 2.0 version of the Serverless developer platform was officially released. Compared with 1.0, 2.0 has achieved all-round improvements in performance and user experience. The industry's first desktop client, Serverless Desktop, has finely designed the desktop client with both aesthetics and pragmatism, and has stronger enterprise-level service capabilities.

As the industry's first cloud-native full lifecycle management platform that supports mainstream serverless services/frameworks, Serverless Devs is committed to creating a one-stop service for serverless application development for developers. Serverless Devs 2.0 proposes a multi-mode debugging solution, including connecting online and offline Environment; the terminal-cloud joint debugging program that connects the environment locally and debugs, the local debugging program that directly performs development debugging locally, and the online debugging/remote debugging program of cloud operation and maintenance debugging. The new version adds multi-environment deployment and deployment capabilities. Serverless Devs 2.0 already supports more than 30 one-click deployment frameworks, including Django, Express, Koa, Egg, Flask, Zblog, Wordpress, etc.

The industry's first instance level can be observed and debugged

The instance is the atomic unit that can be scheduled with the smallest function resource, analogous to the pod of the container. Serverless highly abstracts heterogeneous basic resources, so the "black box problem" is the core pain of the large-scale popularization of Serverless. Similar products in the industry have not revealed the concept of "instance", and have never revealed indicators such as CPU and memory in the observable function, but observability is the eyes of the developer. Without observability, how can we talk about high availability?

Function computing is heavily released for instance-level observability, real-time monitoring and performance data collection of function instances, and visual display, providing developers with an end-to-end monitoring and troubleshooting path for function instances. Through instance-level indicators, you can view core indicator information such as CPU and memory usage, instance network conditions, and the number of requests within an instance, so that the "black box" is not black. At the same time, function computing will open some instances to log in, so that it can be observed and debugged.

The industry's first instance reservation strategy with a fixed number, timing, and water level auto-scaling

The cold start of function computing is affected by many factors: code and image size, startup container, language runtime initialization, process initialization, execution logic, etc., which rely on the two-way optimization of users and cloud vendors. Cloud vendors will automatically allocate the most suitable number of instances for each function and perform cold start optimization on the platform side. However, some online business delays are very sensitive, and cloud vendors cannot substitute users for deeper business optimization, such as streamlining of codes or dependencies, selection of programming languages, process initialization, and algorithm optimization.

Similar products in the industry generally adopt a strategy of reserving a fixed number of instances, that is, allowing users to configure N concurrency values. Unless manually adjusted, they will not be extended or contracted after N instances are allocated. This solution only solves the cold start delay of some business peaks, but greatly increases operation and maintenance costs and resource costs. It is actually not friendly to businesses with irregular peaks and valleys such as red envelope promotions.

Therefore, Function Computing takes the lead in granting users the scheduling authority of some instance resources, allowing users to reserve appropriate function instances through multi-dimensional instance reservation strategies such as fixed number, timed scaling, water level scaling, and hybrid scaling to meet the business curve. Relatively stable (such as AI/ML scenarios), clear peak and valley time periods (such as games interactive entertainment, online education, new retail, etc.), unexpected traffic (such as e-commerce promotion, advertising, etc.), mixed services (Such as Web background, data processing, etc.) and other scenarios, so as to reduce the impact of cold start on delay-sensitive services, and truly achieve the ultimate goal of flexibility and performance.

The industry's first to launch GPU instances

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

With the vigorous development of hardware acceleration in the dedicated field, various GPU manufacturers have introduced dedicated ASICs for video encoding and decoding, such as: NVIDIA integrates dedicated video encoding circuits from the Kepler architecture, and integrates dedicated video decoding circuits from the Fermi architecture.

Function Computing officially launched a GPU instance based on the Turning architecture, allowing serverless developers to sink the video codec workload to GPU hardware acceleration, which greatly accelerates the efficiency of video production and video transcoding.

Up to 2w instances/minute can be delivered

The so-called "serverless" does not mean that software applications can run without a server, but that users do not need to care about the status, resources (such as CPU, memory, disk and network) and quantity of the underlying servers involved when the software application is running. . The computing resources required for the normal operation of software applications are dynamically provided by cloud computing vendors, but in fact, users still care about the resource delivery capabilities of cloud vendors and respond to access fluctuations caused by insufficient resources in burst traffic scenarios.

Function computing relies on Alibaba Cloud's powerful cloud infrastructure service capabilities. Through the dual pools of Shenlong bare metal resource pool and ECS resource pool, it can achieve a maximum delivery of 2w instances/minute during peak business periods, which further improves function computing. The ability to deliver on the customer's core business.

VPC network connection optimization: from 10s to 200ms

When the user needs to access the resources in the user's VPC in the function, such as RDS/NAS, the VPC network needs to be opened. FaaS products in the industry generally adopt the method of dynamically attaching ENIs to achieve VPC connection, that is, creating an ENI in the VPC and attaching it to the machine that executes the function in the VPC. This solution allows users to link back-end cloud services very simply, but the ENI mounting speed generally takes more than 10 seconds, which brings great performance overhead in delay-sensitive business scenarios.

Function computing realizes the decoupling of computing and network by servicing the VPC gateway, and the scaling of computing nodes is no longer limited by the ability of ENI mounting. In this solution, the gateway service is responsible for the mounting of ENI, the high availability and automatic scaling of gateway nodes, while the function computing focuses on the scheduling of computing nodes. When the VPC network is finally established, the function cold start time is reduced to 200 ms.

GB-level mirror startup: optimized from minute to second

Function Computing was the first to release the function deployment method of container mirroring in August 2020. AWS Lambda Re-Invent in December 2020, and domestic friends also announced the heavy function of FaaS to support containers in June 2021. Cold start has always been a pain point of FaaS. The introduction of container images that are dozens of times larger than the code compression package has increased the delay caused by the cold start process.

Function computing innovatively invented Serverless Caching. According to the characteristics of different storage services, it builds a data-driven, intelligent and efficient caching system, realizes the collaborative optimization of software and hardware, and further enhances the Custom Container experience. So far, function computing has optimized the image acceleration to a higher level. In the public use case of function computing ( https://github.com/awesome-fc), we selected and adapted them to several large cloud vendors at home and abroad for horizontal comparison. Invoke the above mirror at 3 hour intervals and repeat several times.

Experiments have proved that in the scenario of a GB-level mirroring cold start, functional computing has achieved a leap from minutes to seconds.

Go ahead and aim for a thousand miles

In 2009, Berkeley put forward six predictions on the emergence of cloud computing at the time, including the possibility of paying on demand for services and greatly increasing the utilization of physical hardware. These have all become facts in the past 12 years. In 2019, Berkeley once again predicted that Serverless computing will become the default computing paradigm in the cloud era and replace the Serverful (traditional cloud) computing model.

With reference to the 12-year development history of cloud computing, Serverless is in the third year of verifying Berkeley's forecast, just over a quarter. In the past 3 years, from the beautiful vision of the future of the cloud, to the Serverless First advocated by cloud vendors and large-scale investment, to enterprise users taking full advantage of the advantages of Serverless to optimize the existing architecture, and objectively facing the impact of Serverless large-scale enterprises. The stumbling block of the core business, and to this day, through technological innovation and breakthroughs to resolve the common pain points of the industry. This requires not only the courage and courage to take the first step, but also the mission and responsibility of a thousand miles.

22.png

Special thanks to Mo Yan, Dai Xin, Xiao Jiang, and Liu Yu for their contributions to this article.

Click the link below to view the function calculation FC homepage! !
https://www.aliyun.com/product/fc?spm=5176.19720258.J_8058803260.52.485f2c4aaM43ka


阿里云云原生
1k 声望302 粉丝