Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The Evolution and thinking of Serverless from the Perspective of functional Computing Architecture

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Author | Yang Haoran Alibaba Senior Technical expert

Guide: cloud computing can become a subversive force in the DT era because its essence is to break the traditional architecture model, reduce costs and simplify the architecture, with a new way of thinking to better meet the needs of users. Serverless computing (Serverless Computing), as the evolution product of the next stage of this huge market, will really help enterprises to focus on business and building applications without worrying about IT infrastructure, which will also become the key to the competition of cloud service providers in the future.

What is serverless computing

The Cloud Native Computing Foundation (Cloud Native Computing Foundation, CNCF) defines serverless computing as follows:

Serverless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment.

Serverless computing means that developers do not need to manage infrastructure such as servers when building and running applications. Applications are decoupled into fine-grained functions, which are the basic units of deployment and operation; users only pay for the resources actually used. It can be seen that serverless computing can help application developers get rid of the burden of underlying infrastructure management such as servers and focus on the innovation of the business layer.

Figure 1-characteristics of serverless computing

The development history of serverless computing

Actually, Serverless is not a new concept. Many services in computing, storage and other areas are serverless mode. For example, the first cloud service launched by Aliyun, object Storage (OSS), is a storage service in the form of serverless. Users do not need to care about how the data is stored on the underlying server, but only pay for the storage resources actually used.

Statistics show that in recent years, more than 70% of the new services / features launched by various cloud service providers are in the form of serverless. With the increasing variety of serverless services in the cloud, users can quickly use a variety of services to build elastic and highly available cloud native applications. Therefore, serverless computing is becoming more and more popular.

Figure 2-serverless computing is ubiquitous

On the characteristics of serverless computing from the perspective of function computing architecture

In serverless computing, platform services take over the management of the underlying infrastructure, so platform services must deal with problems such as fault tolerance and resource scaling in order to give full play to the power of serverless computing.

From the Ali cloud function computing architecture diagram, it is not difficult to see that the API service layer completes authentication, metadata reading and writing and other functions.

When the function is called synchronously, the API service module obtains the available function execution engine from the resource scheduling module, sends the request, and finally retrieves the result; when the function is called asynchronously, it writes the event to the message queue and returns. Events are distributed by the event distribution module, and the whole process is similar to synchronous calls.

Figure 3-Ali Cloud function Computing Architecture

Real-time auto scaling is the core advantage of function computing. When there are peaks in user load, the system can expand resources in real time and deal with peak access smoothly. Taking asynchronous event handling as an example, the whole processing process is divided into three steps:

The event is written into the event queue calculated by the function; the event dispatcher reads the event from the queue and calls the corresponding function to handle the event; the user function handles the event.

Figure 4-Real-time scaling of function calculation

The function computing system monitors the load change of the user, and each component can scale dynamically according to the user load. As shown in the figure above, when the event generation rate of user An increases, the system will automatically allocate more resources to An in each link to match the event processing capability.

The function calculation adopts the multi-level resource scheduling strategy, and the system will predict the demand according to the user load and the water level of the resource pool, and prepare the computing resources in advance. Relying on the technology accumulation of Aliyun Feitian distributed system platform for many years, it has achieved a good balance in real-time and accuracy of scheduling, and has the ability of millisecond elastic scaling.

Typical application scenarios of serverless computing

With the help of function computing, users can build almost any type of application or back-end service, including Web application back-end service, large-scale file processing, real-time data streaming and so on.

For example, with the integration of object storage and function computing, users only need to write functions to deal with a single video. When a large number of video files are uploaded to the object storage service, multiple function instances will be automatically triggered for concurrent processing.

Figure 5-Serverless Video Transcoding Service

Using HTTP triggers evaluated by functions, the user only needs to write a function to handle a single request. When the TPS increases, the function calculation automatically expands the computing resources to execute multiple function instances to process requests.

Figure 6-Serverless website back-end service

The value of serverless computing to users

Since the launch of Ali cloud function computing, it has been widely used by developers in large-scale multimedia data parallel processing, log / Internet of things data streaming processing and website back-end services and other scenarios. From the perspective of practical use, serverless computing has brought great value to users in terms of engineering efficiency, reliability, performance, cost and security.

Engineering efficiency: with the integration of functional computing and other cloud services, users only need to write a small amount of code to concatenate multiple services to complete complex functions. Users do not need to bear the tedious work of server configuration / upgrade, resource expansion / reduction, and the cost of operation and maintenance is greatly reduced.

Reliability: users do not need to purchase or maintain any servers or install any software. with the help of function calculation, the system can automatically deal with various errors in the infrastructure layer, reduce downtime, network outages and other crises, and improve the reliability of the system.

Auto scaling: the scaling of the computing resources required by the application can be done automatically by the serverless computing platform at the millisecond level, and users are not responsible for increasing or decreasing the number of servers.

Low cost: no need to reserve capacity for services such as computing and storage. If the code is not running, there is no charge. The research data show that more than 70% of the server resources are not fully utilized, and the function calculation adopts a new mode, with a resource utilization rate of 100%. The practice results show that it can usually save 10% and 90% of the cost.

In other words, functional computing means that developers can focus on product code without having to manage and operate cloud or local servers or runtimes. In production practice, users can implement an image processing service with a scale of hundreds of millions of lines of code and billions of calls a day.

From Cloud Computing 1.0 era to 2.0 era

In the era of cloud computing 1. 0, the IaaS of infrastructure provides users with almost the same experience as the traditional IT environment, allowing users to seamlessly migrate applications to the cloud. When everyone can get the computing resources needed, how to manage and use computing resources more efficiently, function as a service (FaaS) is the most important issue in the era of cloud computing 2.0. Serverless computing services such as Ali Cloud function Computing can bring great value to users in terms of engineering efficiency, reliability, performance, cost and security, and open a door to a beautiful new world for developers.

On October 9, Aliyun announced the official launch of functional Computing 2.0 solution to provide users with Serverless computing services that are more cost-effective and more efficient to develop operation and maintenance experience. Function Computing 2.0 provides rich billing methods, new instance types, flexible custom runtime, and omni-directional upgrade tool chain.

Figure 7-prepaid and postpaid

Through a series of innovative functions, function Computing 2.0 solves the pain points of current Serverless computing services in terms of cost, performance, application construction and so on.

The world's first to launch a prepaid (annual and monthly plan) billing model. Compared with post-payment, the prepaid unit price is reduced by more than 70%. The stable part of the resources required by the application uses the prepaid mode, the unit price is low, and the flexible part is paid after use, resulting in high resource utilization. With the combination of prepaid and post-payment, users can significantly reduce costs.

Figure 8-reserved and by-quantity examples

More importantly, function calculation 2.0 adds reserved instance types, allowing users to manage the application and release of instances on their own.

By reserving an instance, users can preheat the function in advance or keep the instance resident for a long time, eliminating the request delay caused by instance startup. When the load exceeds the reserved instance processing capacity, the system will automatically expand the capacity and use the number of instances to process requests. At the same time, function calculation provides detailed instance usage indicators to help users easily reserve a reasonable number of instances.

Figure 9-user experience

Users build elastic and highly available cloud native applications on the functional computing platform. If there are no useful development, debugging, operation and maintenance tools, the experience will be greatly reduced.

Function Computing 2.0 greatly enhances the user experience in Serverless application construction, operation and maintenance. Users can create sandboxie in their local development machine environment, which is consistent with the cloud running environment, and perform operations such as dependency package installation, breakpoint debugging, and so on.

Function Computing 2.0 also provides plug-ins for popular development tools such as VSCode,Intellij Idea,PyCharm, which further reduces the threshold for the use of tools through the interaction of graphical user interfaces.

"Alibaba Yun × × icloudnative × × erverless, containers, Service Mesh and other technical fields, focusing on cloud native popular technology trends, cloud native large-scale landing practice, to do the best understanding of cloud native development × ×

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report