Function calling method and system
By introducing scheduling devices and dynamically adjusted carrier resource pools into the function computing system of cloud computing, the problem of function cold start delay is solved, and a lower cold start delay and a better user experience is achieved.
Patent Information
- Application Number
- CN202210527313.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-05-16
AI Technical Summary
In cloud computing, the function cold start delay is long, resulting in poor user experience under burst traffic. Especially for cold start delay-sensitive applications, the existing technology is difficult to effectively solve.
By introducing a scheduling device and a computing node in the function computing system, the scheduling device determines an idle target computing node from the multiple computing nodes and sends a function call request to the target computing node. The computing node obtains the idle carrier from the carrier resource pool and calls the objective function on it. The number of carriers in the carrier resource pool is dynamically adjusted by the computing node according to its own resource occupation status.
It reduces the cold start delay time of function under burst traffic, simplifies the upper-level scheduling strategy, reduces the carrier scheduling time, and thus improves the user experience.
Smart Images

Figure CN114816713B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to cloud computing technology, and more particularly to a function calling method and system. Background Art
[0002] With the continuous development of cloud computing technology, more and more businesses tend to use cloud servers to provide services to customers. Among them, the serverless function computing platform can provide users with elastic FAAS (Function as a service) services.
[0003] In the related art, for burst traffic, when a function is called for calculation based on an event trigger, the time required for the function to cold start is often long, and delay glitches are prone to occur, resulting in a poor user experience, which is often unacceptable, especially for applications that are sensitive to cold start delays. Summary of the invention
[0004] The embodiments of the present application provide a function calling method and system, which can reduce the cold start delay of a function under burst traffic and improve the user experience.
[0005] In a first aspect, an embodiment of the present application provides a function calling method, which is applied to a function computing system, wherein the function computing system includes a scheduling device and multiple computing nodes, and the method includes:
[0006] In the case where the scheduling device obtains a function call request for the target function, determining an idle target computing node from a plurality of computing nodes through the scheduling device;
[0007] Sending a function call request to a target computing node, wherein a carrier resource pool is respectively set in each of the plurality of computing nodes, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding computing node according to the resource occupation status in the computing node itself;
[0008] Obtaining a target idle carrier from a target carrier resource pool according to a function call request through a target computing node, and obtaining a target function corresponding to the function call request;
[0009] The target function is called in the target idle carrier through the target computing node.
[0010] In a second aspect, an embodiment of the present application provides a function calling method, which is applied to a function computing system, wherein the function computing system includes a scheduling device and multiple bare metal servers, and the method includes:
[0011] When the scheduling device obtains a function call request for the target function, the scheduling device determines an idle target bare metal server from a plurality of bare metal servers;
[0012] Sending a function call request to a target bare metal server, wherein a carrier resource pool is respectively set in each of the multiple bare metal servers, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding bare metal server according to its own resource occupancy status;
[0013] Obtain a target idle carrier from a target carrier resource pool according to the function call request through the target bare metal server, and obtain a target function corresponding to the function call request;
[0014] The target function is called in the target idle carrier through the target bare metal server.
[0015] In a third aspect, an embodiment of the present application provides a function computing system, the system comprising a scheduling device and a plurality of computing nodes;
[0016] A scheduling device, for determining an idle target computing node from a plurality of computing nodes when a function call request for a target function is obtained;
[0017] The scheduling device is further used to send a function call request to a target computing node, wherein a carrier resource pool is respectively set in each of the plurality of computing nodes, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding computing node according to the resource occupation status in the computing node itself;
[0018] The target computing node is used to obtain a target idle carrier from a target carrier resource pool according to a function call request, and to obtain a target function corresponding to the function call request;
[0019] The target computing node is also used to call the target function in the target idle carrier.
[0020] In a fourth aspect, an embodiment of the present application provides a function computing system, the system comprising a scheduling device and a plurality of bare metal servers;
[0021] A scheduling device, configured to determine an idle target bare metal server from a plurality of bare metal servers when a function call request for a target function is obtained;
[0022] The scheduling device is further used to send a function call request to a target bare metal server, wherein a carrier resource pool is respectively set in each of the multiple bare metal servers, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding bare metal server according to its own resource occupancy status;
[0023] The target bare metal server is used to obtain a target idle carrier from a target carrier resource pool according to the function call request, and to obtain a target function corresponding to the function call request;
[0024] The target bare metal server is also used to call the target function in the target idle carrier.
[0025] In a fifth aspect, an embodiment of the present application provides a computer device, the computer device comprising: a memory and a processor;
[0026] Memory for storing computer programs;
[0027] A processor is used to execute a computer program stored in a memory, and when the computer program is run, the processor executes the steps of the function calling method in any one of the embodiments of the first aspect.
[0028] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a computer device, the computer device executes the steps of the function calling method in any one of the embodiments of the first aspect.
[0029] In a seventh aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the function calling method in any embodiment of the first aspect.
[0030] The function calling method and system in the embodiment of the present application divides the function computing system into two layers, and the scheduling device is responsible for selecting idle target computing nodes from multiple computing nodes in the upper layer, and the computing nodes in the lower layer obtain idle carriers from the carrier resource pool, and the number of carriers in the carrier resource pool of the lower layer is dynamically adjusted by each computing node according to its own resource occupancy. In this way, the upper-layer scheduling device does not need to care about the distribution of specific carriers, nor does it maintain the specific information of the carriers, which can simplify the upper-layer scheduling strategy and reduce the carrier scheduling time, thereby reducing the function cold start delay under burst traffic and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The present application may be better understood from the following description of specific embodiments of the present application in conjunction with the accompanying drawings, wherein the same or similar figure numbers represent the same or similar features.
[0032] Figure 1 is an architecture diagram of an example applicable to the function calling method provided by this application;
[0033] Figure 2 is a structural diagram of an example of a function computing system resource pool provided by this application;
[0034] Figure 3It is a flowchart of a function calling method provided by an embodiment of the present application;
[0035] Figure 4 is a schematic diagram of an example of an image used by a computing node provided in the present application;
[0036] Figure 5 is a flowchart of a function calling method provided by another embodiment of the present application;
[0037] Figure 6 is a flowchart of a function calling method provided in yet another embodiment of the present application;
[0038] Figure 7 It is a flowchart of an example of a strategy for dynamically adjusting the number of idle carriers provided by the present application;
[0039] Figure 8 is a schematic diagram of an example of a carrier life cycle provided by the present application;
[0040] Fig. 9 is a flowchart of a function calling method provided by another embodiment of the present application;
[0041] Fig.10 is a structural diagram of a function computing system provided by an embodiment of the present application;
[0042] Fig.11 is a structural diagram of a function computing system provided by another embodiment of the present application;
[0043] Fig.12 It is a schematic diagram of the structure of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0044] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present application and are not configured to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0045] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0046] The following is an explanation of the terms that may be involved in this application:
[0047] Container: A lightweight resource packaging unit;
[0048] Function: A function is a unit of system scheduling and operation. A function can be understood as each code file in the warehouse. The file can be one code function or multiple code functions.
[0049] Serverless: Serverless is a new R&D and operation model that does not require users to worry about server operations.
[0050] FAAS: “Function as a Service” allows developers to build, compute, run, and manage applications in the form of functions without having to maintain their own infrastructure;
[0051] Cold start: code download, function instance container startup, runtime initialization, code initialization, etc. in the function call link;
[0052] ECS: ECS (Elastic Compute Service) is a simple, efficient, and elastically scalable computing service that provides users with virtual machine instances.
[0053] Runtime: Function runtime, which is used to provide an environment for different languages to run in the execution environment. The function runtime can serve as a relay between function computing and user functions, passing function call events, context information, and responses;
[0054] Dynamic mount: refers to dynamically modifying the contents of a container directory by updating the Volume / Mount configuration of a created container.
[0055] Function layer: Users can extract the public libraries that functions depend on into layers to reduce the size of code packages during deployment and updates. The contents of each layer can be merged and deployed to the / opt directory in sequence.
[0056] Bootstrap entry: An executable file in the serverless runtime that is used to launch user function codes.
[0057] Currently, for the FAAS platform, user sudden function calls will cause a large number of container cold starts, resulting in jitter and delay when calling functions, affecting the user experience. For example, during the function cold start process, since it is necessary to go through the steps of container startup, code download, runtime initialization, service logic initialization, etc., these times added together may increase the processing time of function call requests to 500ms-30s. For delay-sensitive applications (<100ms), such delays are unacceptable.
[0058] In order to solve the problems of the prior art, the embodiment of the present application provides a function calling method and system. The function calling method provided by the present application can be applied to Figure 1 In the architecture shown, the specific Figure 1 Provide detailed explanation.
[0059] Figure 1 This is an example architecture diagram applicable to the function calling method provided in this application.
[0060] like Figure 1 As shown, the architecture diagram may include a function computing system 10 and at least one electronic device 11. The function computing system 10 may establish a connection with at least one electronic device 11 through a network and exchange information. The electronic device 11 may be a mobile phone, tablet computer, laptop computer, desktop computer, or other device that can access cloud services. The function computing system 10 may be a platform with function computing capabilities, such as a server cluster including multiple cloud servers. The function computing system 10 may include a scheduling device and multiple computing nodes, wherein a computing node may be a virtual machine instance, and the scheduling device may be used to perform resource scheduling so as to provide function computing services to the electronic device 11.
[0061] In the above architecture, function computing can be triggered based on multiple events. In some examples, when a user uses a target application on an electronic device 11, if the target application is an application based on FAAS services, when the target application triggers a target event, the target function can be triggered to be called. In this case, the electronic device 11 can send a function call request for the target function to the function computing system 10, so that the function computing system 10 calls the target function in the cloud according to the function call request, thereby providing services to the user. Among them, the target function can be, for example, a function corresponding to a deep learning model.
[0062] Based on the above architecture, the function calling method provided in the embodiment of the present application can be applied to the scenario of function calling based on FAAS service.
[0063] In some of these application scenarios, a video recommendation event in a device application can trigger a call to multiple functions corresponding to a video recommendation model in the cloud, so that the cloud provides video recommendation services to the application. Exemplarily, after a video recommendation event is generated or started in an application of an electronic device, the electronic device can send a function call request for a function related to the video recommendation model to the corresponding function computing system in the cloud. For each function, after receiving the function call request for the function, the scheduling device in the function computing system can determine an idle target computing node from multiple computing nodes according to the function call request, and send a function call request to the target computing node. The target computing node obtains a target idle carrier from a target carrier resource pool according to the function call request, and a function corresponding to the function call request, and calls the function in the target idle carrier to implement the call of the video recommendation model related function through the function computing system, and provide video recommendation services to the electronic device.
[0064] In other application scenarios, an image generation event in a device application may trigger a call to multiple functions corresponding to an image generation model in the cloud, so that the cloud provides the application with an image generation service that generates corresponding cartoon images based on real images. Exemplarily, after an image generation event is generated or started in an application of an electronic device, the electronic device may send a function call request for a function related to the image generation model to a function computing system corresponding to the cloud. For each function, after receiving a function call request for the function, the scheduling device in the function computing system may determine an idle target computing node from multiple computing nodes according to the function call request, and send a function call request to the target computing node. The target computing node obtains a target idle carrier from a target carrier resource pool according to the function call request, and a function corresponding to the function call request, and calls the function in the target idle carrier to implement a call to the image generation model through the function computing system, and provide image generation services to the electronic device.
[0065] It should be noted that the application scenarios described in the above-mentioned embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0066] Based on the above application scenarios, the problem of function cold start delay, such as Figure 2 As shown, the embodiment of the present application divides the resource pool in the function computing system into two layers, one of which is the virtual machine layer and the other is the carrier layer. In the virtual machine layer, the scheduling device can be used to manage the node resource pool 21 containing multiple computing nodes, in which a list of virtual machines can be maintained; in the carrier layer, an execution engine module is deployed in each computing node, and the execution engine module can be used to manage the carriers in the carrier resource pool 22. The upper-layer scheduling device does not care about the distribution of specific carriers, and the management of the resource pool carriers is handed over to the specific computing nodes of the lower layer. In this way, the upper-layer scheduling strategy can be simplified, and the extension of the cold start time caused by the carrier scheduling time can be reduced.
[0067] It should be noted that the carrier in the embodiment of the present application may include any form such as a container, a virtual machine, etc. that can support the running of a function application.
[0068] Based on the above-mentioned resource pool stratification, the function calling method provided in the embodiment of the present application is introduced below.
[0069] Figure 3 is a flow chart of a function calling method provided by an embodiment of the present application. The function calling method can be applied to Figure 1 The function calculation system shown.
[0070] like Figure 3 As shown, the function calling method may specifically include the following steps:
[0071] S310, when the scheduling device obtains a function call request for the target function, the scheduling device determines an idle target computing node from multiple computing nodes;
[0072] S320, sending a function call request to a target computing node, wherein a carrier resource pool is respectively set in each of the multiple computing nodes, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding computing node according to the resource occupation status in the computing node itself;
[0073] S330, obtaining a target idle carrier from a target carrier resource pool according to the function call request through the target computing node, and obtaining a target function corresponding to the function call request;
[0074] S340 . Call the target function in the target idle carrier through the target computing node.
[0075] Therefore, by dividing the function computing system into two layers, the scheduling device is responsible for selecting idle target computing nodes from multiple computing nodes in the upper layer, and the computing nodes in the lower layer obtain idle carriers from the carrier resource pool, and the number of carriers in the carrier resource pool in the lower layer is dynamically adjusted by each computing node according to its own resource occupancy. In this way, the upper-layer scheduling device does not need to care about the distribution of specific carriers, nor does it maintain the specific information of the carriers, which can simplify the upper-layer scheduling strategy and reduce the carrier scheduling time, thereby reducing the function cold start delay under burst traffic and improving the user experience.
[0076] The specific implementation methods of the above steps are introduced below.
[0077] In some implementations, in S310, the scheduling device obtains the function call request in a manner including, but not limited to, receiving a call request for a target function sent by an electronic device, or a function call request related to the service generated based on a service request of an application service.
[0078] In addition, the target computing node may be determined by, for example, randomly selecting a computing node from idle nodes of multiple computing nodes as the target computing node. Of course, the idlest computing node may also be selected from multiple computing nodes as the target computing node.
[0079] Based on this, in some examples, determining an idle target computing node from multiple computing nodes in S310 may specifically include:
[0080] Calculate the amount of idle resources of each computing node among the multiple computing nodes;
[0081] The computing node with the largest amount of idle resources among multiple computing nodes is selected as the target computing node.
[0082] Here, the amount of idle resources includes but is not limited to memory resources, storage resources, and traffic resources, etc. Exemplarily, the scheduling device can calculate the amount of idle resources on each computing node in real time, and when receiving a function call request, based on the amount of idle resources on each computing node, hit the computing node with the largest amount of idle resources as the target computing node.
[0083] Thus, through the above implementation, the currently most idle computing node can be allocated to the target function for function calling, thereby ensuring the computing resources required for the function calling to the greatest extent.
[0084] In some implementations, in S320, after determining the target computing node, the scheduling device may send a function call request for the target function to the target computing node, so that the target computing node obtains an idle carrier from the resource pool and calls the target function based on the carrier. In this way, the scheduling logic of the upper-level scheduling device is simplified, thereby improving the ability to handle burst traffic and reducing function cold start delay.
[0085] In addition, in this embodiment, each computing node is provided with a corresponding carrier resource pool, and the size of the carrier resource pool is dynamically changed. That is, each computing node will dynamically adjust the number of idle carriers in the carrier resource pool in the node according to the resource occupancy in its own node. For example, when the resource occupancy is high, the number of idle carriers in the carrier resource pool can be reduced to reduce the resource occupancy rate in the node; when the resource occupancy is low, the number of idle carriers in the carrier resource pool can be increased to improve the function computing capability and reduce the function call delay under high traffic conditions.
[0086] In some implementations, in S330 and S340, after receiving the function call request sent by the scheduling device, the target computing node may obtain an idle carrier from the carrier resource pool within the node as the target idle carrier, and perform a function call based on the target idle carrier.
[0087] Exemplarily, after receiving the function call request sent by the scheduling device, the execution engine module in the target computing node can determine whether there is an idle carrier in its own carrier resource pool. If there is no idle carrier, a new idle carrier is created as the target idle carrier; if there is an idle carrier, an idle carrier is randomly obtained as the target idle carrier.
[0088] After obtaining the target idle carrier, the execution engine module can dynamically mount the function code, layer, etc. in the target idle carrier. According to the bootstrap entry, the bootstrap pull-up process is executed to realize the call of the target function.
[0089] In addition, in order to improve the stability and reliability of the computing nodes, the embodiment of the present application may also set a recycling time for each computing node so that it can be recycled upon expiration. Based on this, in some implementations, the function calling method provided by the embodiment of the present application may also include:
[0090] Obtaining the recycling time corresponding to each computing node in the plurality of computing nodes through the scheduling device;
[0091] When the system time reaches the first recycling time corresponding to the first computing node, the virtual machine corresponding to the first computing node is deleted by the scheduling device, wherein the first computing node includes any node among the plurality of computing nodes;
[0092] A virtual machine corresponding to a new computing node is created through a scheduling device.
[0093] Here, the scheduling device can also dynamically maintain the number of computing nodes in the node resource pool. The virtual machine corresponding to each computing node can be set with a default recycling time. After this time, the scheduling device can recycle the timed-out computing node from the node resource pool, for example, by deleting the virtual machine instance corresponding to the computing node. This ensures that virtual machines that may have faults or security risks can be eliminated in a timely manner. After the recycling is completed, the system can fill the node resource pool with virtual machines through the scheduling device to maintain the stability of the number of computing nodes in the node resource pool.
[0094] In this way, by dynamically maintaining the number of computing nodes, while ensuring the system's required function computing capabilities, the stability and reliability of existing computing nodes in the system can be improved, thereby improving the stability of the system's function computing services.
[0095] In addition, the embodiment of the present application also provides a unified image for different users, and sets the runtimes corresponding to multiple function running environments in one image. In this way, there is no need to worry about what runtime the user function is specifically configured with. The runtime corresponding to the current function can be obtained from the image and configured in the carrier, thereby realizing random selection of any carrier in the carrier resource pool, and the function can be deployed to run.
[0096] Based on this, in some implementations, the above S340 may specifically include:
[0097] According to the running environment configuration information corresponding to the target function, the target function running time corresponding to the target function is obtained from the image, wherein the image includes function running times corresponding to multiple function running environments;
[0098] When running based on the target function, the target function is called in the target idle carrier.
[0099] Here, the operating environment configuration information may include information about the type of programming language used by the function code. Function codes corresponding to different language types require different function operating environments, and thus correspond to different function runtimes.
[0100] For example, Figure 4 As shown, the image can include runtimes corresponding to multiple languages such as Node.js, Python3, Php7.2, Java11, etc. If the target function uses code written in Node.js, when the target computing node executes the Bootstrap pull-up process, the runtime corresponding to Node.js can be pulled up from the image according to the configuration information of the target function to perform function calls.
[0101] In order to further improve the affinity of tenants between carriers, in some embodiments, the carrier runtime environment is isolated between idle carriers. For example, the carrier runtime environment can use a lightweight virtual machine, which can achieve better isolation, so that the upper-level scheduling device and the execution engine module in the computing node do not need to consider the affinity of tenants between carriers when performing function call operations.
[0102] In this way, by providing a unified image and using a carrier with runtime environment isolation, the carrier environment in the carrier resource pool can be unified. In this way, the computing node does not care about the specific runtime configured for the user function, so that any carrier randomly selected from the carrier resource pool can be deployed to run functions in different language environments.
[0103] It should be noted that the carriers in the carrier resource pool in the embodiment of the present application are not reused, and will be destroyed after not being called for a period of time, and new carriers will be dynamically filled in the carrier resource pool accordingly.
[0104] Based on this, in some embodiments, such as Figure 5 As shown, the function calling method provided in the embodiment of the present application may also include:
[0105] S510, each computing node among the multiple computing nodes respectively obtains the number of idle carriers in the carrier resource pool within its own computing node;
[0106] S520: When the number of idle carriers is less than the target number value, determine the carrier creation concurrency within the computing node itself through the computing node;
[0107] S530: When the carrier creation concurrency is less than a preset threshold, a new idle carrier is created in the carrier resource pool through a computing node.
[0108] Here, each computing node can maintain the number of idle carriers in the carrier resource pool within its own node to achieve dynamic filling of carriers. Among them, the target quantity values (i.e., Target) corresponding to different computing nodes can be the same or different. For the latter case, the target quantity value can be dynamically determined according to the resource occupancy status within the current computing node.
[0109] In addition, since each computing node may need to create new carriers outside the carrier resource pool in addition to creating new carriers in the carrier resource pool, the carrier creation concurrency here may include the concurrency of the carriers currently being created in the node. That is, the carrier creation concurrency includes the carrier creation concurrency within the carrier resource pool and the carrier creation concurrency outside the carrier resource pool, and the current number of carriers filled in the carrier resource pool shares the concurrency with the function instance production.
[0110] Exemplarily, each computing node detects the number of idle carriers in the carrier resource pool of the node according to a preset period. If the number of idle carriers is less than Target, it means that the number of idle carriers in the carrier resource pool is insufficient at this time. Then, it can be further determined by determining the carrier creation concurrency in the current computing node to determine whether to immediately fill the carriers; if the number of idle carriers is greater than or equal to Target, it means that the number of idle carriers in the carrier resource pool is sufficient at this time, and there is no need to fill the carriers. Further, in the case where the number of idle carriers is less than Target, if the carrier creation concurrency in the current computing node is less than a preset threshold, for example, less than 50% of the maximum concurrency, it means that the current carrier creation is not crowded, and the operation of creating a new carrier in the carrier resource pool can be performed until the number of idle carriers in the carrier resource pool reaches Target; if the carrier creation concurrency in the current computing node is not less than the preset threshold, for example, greater than or equal to 50% of the maximum concurrency, it means that the current carrier creation is relatively crowded. In order to avoid affecting other normal carrier creation processes in the node, it can be waited until the carrier creation concurrency is less than the preset threshold before performing the operation of creating a new carrier in the carrier resource pool.
[0111] In this way, through the dynamic filling strategy of the above-mentioned carrier resource pool, the size of the carrier resource pool can be dynamically adjusted without relying on too much data, making carrier scheduling more flexible, and based on the dynamic filling strategy of the computing node, the carrier deployment density in the function computing system can also be improved. In addition, the life cycle management of the resource pool carrier is delegated to the computing node for execution, and the upper-level scheduling carrier strategy is simplified, which can reduce the extension of the cold start time caused by the scheduling time. In addition, the carrier resource pool is filled according to a fixed period, and the node load and carrier creation concurrency are taken into account during filling, which can avoid the carrier filling process itself from occupying too many resources of the computing node.
[0112] Based on this, in order to determine the target quantity value, in some implementations, for example, different computing nodes correspond to different target quantity values. Figure 6 As shown, before the above S520, the function calling method provided in the embodiment of the present application may also include: S610-S630, as shown below.
[0113] S610: Determine the minimum number of carriers corresponding to the computing node according to the single-node request number limit per second through the computing node.
[0114] Here, the single-node QPS (Query Per Second) limit value can be used to characterize the maximum number of requests that a single computing node can process per unit time. In this way, a more reasonable value can be set as the minimum number of idle carriers in the resource pool, i.e., the lower limit of the target number value, with reference to the single-node QPS limit value, to ensure that the computing node has a certain request processing capability.
[0115] In some implementations, the above S610 may specifically include:
[0116] The product of the single-node request number limit per second and the first preset ratio is used as the minimum number of carriers corresponding to the computing node, where the first preset ratio is less than 1.
[0117] Exemplarily, the minimum number of idle carriers in the resource pool may be determined according to the formula Min=single-node QPS limit value*first preset ratio, wherein Min represents the minimum number of carriers, and the first preset ratio is less than 1.
[0118] In this way, the computing node can be guaranteed to have a certain request processing capability while not reaching the processing capacity limit, thereby retaining a certain amount of resources for processing other events.
[0119] S620: Determine the maximum number of carriers corresponding to the computing node according to the carrier number configuration value of the carrier resource pool, or the upper limit value of the number of carriers corresponding to the computing node and the current number of carriers.
[0120] Here, the carrier quantity configuration value is also the carrier resource pool size configuration value, which can be pre-configured according to the device type of the computing node; the upper limit value of the carrier quantity can be a fixed value set according to the device type of the computing node; the current carrier quantity value can be a dynamic value counted in real time by the computing node, including the carriers in use and idle carriers in the current computing node.
[0121] Exemplarily, the carrier quantity configuration value can be directly used as the maximum number of carriers for the idle carriers in the resource pool within the computing node. Of course, a suitable value can also be determined by referring to the difference between the upper limit of the carrier quantity and the current carrier quantity value, and this value can be used as the maximum number of carriers for the idle carriers in the resource pool within the computing node.
[0122] Based on this, in order to improve accuracy, in some implementations, the above S620 may specifically include:
[0123] Calculate the difference between the upper limit of the number of carriers and the current number of carriers, and multiply the difference by the second preset ratio to obtain the actual number of carriers, wherein the second preset ratio is less than 1;
[0124] The minimum value between the carrier quantity configuration value of the carrier resource pool and the actual value of the carrier quantity is used as the maximum value of the carrier quantity corresponding to the computing node.
[0125] Exemplarily, the maximum number of idle carriers in the resource pool may be determined according to the formula Max=min(pool_size configuration value, (upper limit of the number of carriers - current total number of carriers)*second preset ratio). Wherein, Max represents the maximum number of carriers, the pool_size configuration value is the configuration value of the number of carriers, and the second preset ratio is <1. In the embodiment of the present application, the second preset ratio may be, for example, 50%, and of course, it may be other values in (0,1), which are not limited here.
[0126] In this way, through the above-mentioned method of determining the maximum number of carriers, it can be dynamically ensured that the number of idle carriers in the resource pool does not exceed the maximum number of idle carriers that the carrier resource pool can accommodate, and does not exceed the maximum number of carriers allowed in the computing node.
[0127] S630. Determine a target quantity value according to a minimum value and a maximum value of a carrier quantity by calculating a node.
[0128] Here, the method of determining the target quantity value includes, but is not limited to, randomly selecting a value between the minimum value and the maximum value as the target quantity value. Of course, it can also be calculated according to a preset formula. The preset formula may be, for example, Target = (Max + Min) / 2.
[0129] In this way, by dynamically determining the target quantity value, the number of idle carriers in the carrier resource pool within the computing node can be dynamically adjusted, so that the function computing system can adapt to various burst traffic, thereby reducing the function cold start delay.
[0130] In addition, in order to save memory resources in the computing node, in some implementations, the function calling method provided in the embodiment of the present application may further include:
[0131] When the number of idle carriers is greater than the maximum number of carriers, some idle carriers in the carrier resource pool are deleted by computing nodes until the number of idle carriers in the carrier resource pool is no greater than the maximum number of carriers.
[0132] Here, when there are too many idle carriers in the carrier resource pool, the idle carriers in the resource pool can be destroyed to the maximum number of carriers determined above, so that the number of idle carriers does not become too large and occupy too much memory in the computing node, thereby saving memory resources in the computing node.
[0133] In order to better understand the strategy for dynamically adjusting the number of idle carriers provided in the embodiment of the present application, a specific example is given below based on the above-mentioned implementation modes.
[0134] like Figure 7 As shown, each computing node can calculate the Min, Max and Target of the number of carriers according to the preset cycle, determine the size of the resource pool relative to Max and Target, that is, determine the size of the number of idle carriers in the carrier resource pool relative to Max and Target. When the resource pool size is greater than Max, that is, the number of idle carriers in the carrier resource pool is greater than Max, destroy the carriers to Max, and then end the process; when Target≤resource pool size≤Max, that is, Target≤the number of idle carriers in the carrier resource pool≤Max, do not perform any action and end the process directly; when the resource pool size is less than Target, that is, the number of idle carriers in the carrier resource pool is less than Target, further determine whether the concurrency exceeds 50% of the maximum concurrency. If so, end the process; if not, increase the number of carriers to be filled by the execution node concurrency, and then fill new idle carriers into the carrier resource pool until the number of idle carriers reaches Target, and end the process.
[0135] In this way, through the above-mentioned periodic carrier resource pool size adjustment strategy, the carrier scheduling flexibility can be improved, thereby further improving the system's processing capability for burst traffic and reducing function cold start delay.
[0136] In addition, in order to facilitate the statistical management of the computing node on the carrier, in some implementations, before S620, the function calling method provided in the embodiment of the present application may further include:
[0137] Determine the carrier state corresponding to each carrier in its own computing node through the computing node;
[0138] The number of carriers in a preset carrier state is counted by a computing node to obtain a current carrier quantity value, wherein the preset carrier state includes an idle state, a ready state, and an in-use state.
[0139] In the embodiment of the present application, multiple states of each carrier from filling to destruction are clarified to facilitate unified management of computing nodes.
[0140] For example, the life cycle of a carrier can be as follows: Figure 8As shown, the carrier may correspond to different carrier states in different use stages. Among them, the carrier in the idle (Standby) state may be: a carrier filled in the resource pool, which may be in this state when the code is not dynamically mounted. In addition, before the carrier is bound to a specific function for execution, the carrier has been allocated some computing resources such as a network card. Prepared state: the state in which the Standby state carrier is in after the code is mounted. In-Use state: after starting to process the call request, the function process is started through the bootstrap entry file, and the carrier enters the In-Use state. Destroyed state: after a period of no call, the carrier enters the Destroyed state and is eventually destroyed, that is, the carrier in the to-be-destroyed state may be a carrier that has been bound to a function and the function has not been called within a preset time period. Error state: during the entire life cycle of the carrier, some errors may cause the carrier to fail, and then enter this state.
[0141] Based on the definitions of the above-mentioned carrier states, each computing node can determine the carrier state corresponding to each carrier in the node, and manage the carriers in a unified manner according to the carrier state, such as counting the number of idle carriers, counting the current carrier number value when calculating the maximum number of carriers, etc.
[0142] Taking the current carrier quantity value as an example, the computing node can determine the carrier state corresponding to each carrier in the node according to the above state rules, and then count the number of carriers in the idle state, ready state and in-use state. The statistical result is the current carrier quantity value.
[0143] In this way, by clarifying the carrier status corresponding to each carrier, it is convenient for the computing node to classify and statistically manage carriers in different states.
[0144] In addition, in some implementations, the function calling method provided in the embodiments of the present application may further include:
[0145] Delete the carrier in the state of being destroyed through the computing node.
[0146] Here, in order to promptly clean up carriers that have not been called in a short period of time, the carriers in the computing node that are in a state of being destroyed can be deleted regularly. In this way, the occupied resources can be released in time, and the computing node can be encouraged to create new idle carriers to the carrier resource pool to wait for the call of other functions.
[0147] The following is a detailed introduction to the function calling method provided by this application in conjunction with a bare metal server.
[0148] Fig. 91 is a flow chart of a function calling method provided by another embodiment of the present application. The function calling method can be applied to a function computing system, which can include a scheduling device and multiple bare metal servers.
[0149] like Fig. 9 As shown, the function calling method may specifically include the following steps:
[0150] S910. When the scheduling device obtains a function call request for a target function, the scheduling device determines an idle target bare metal server from a plurality of bare metal servers;
[0151] S920: Send a function call request to a target bare metal server, wherein a carrier resource pool is respectively set in each of the multiple bare metal servers, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding bare metal server according to its own resource occupancy status;
[0152] S930, obtaining a target idle carrier from a target carrier resource pool according to the function call request through the target bare metal server, and obtaining a target function corresponding to the function call request;
[0153] S940. Call a target function in a target idle carrier through a target bare metal server.
[0154] Here, the computing node in the above embodiment can be a bare metal server, which can be regarded as a special ECS with better performance and larger specifications. The explanation of other related steps can be found in the relevant description in the above embodiment, which will not be repeated here.
[0155] Therefore, by deploying carriers on large-scale bare metal instances, since fewer resources are consumed for carrier management, more resources in each bare metal server can be used to set up more carriers, saving node resources and further improving carrier deployment density.
[0156] Based on the same inventive concept, the present application also provides a function calculation system. Fig.10 Provide detailed explanation.
[0157] Fig.10 It is a structural diagram of a function computing system provided by an embodiment of the present application.
[0158] like Fig.10 As shown, the function computing system 1000 may include a scheduling device 1001 and multiple computing nodes 1002. A carrier resource pool is respectively set in each of the multiple computing nodes, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding computing node according to the resource occupation status in the computing node itself.
[0159] The scheduling device 1001 is used to determine an idle target computing node 10021 from the plurality of computing nodes 1002 when a function call request for a target function is obtained;
[0160] The scheduling device 1001 is also used to send a function call request to the target computing node 10021;
[0161] The target computing node 10021 is used to obtain a target idle carrier from a target carrier resource pool according to a function call request, and to obtain a target function corresponding to the function call request;
[0162] The target computing node 10021 is also used to call the target function in the target idle carrier.
[0163] The function computing system 1000 is described in detail below, as follows:
[0164] In some of the embodiments, the computing node 1002 is further configured to respectively obtain the number of idle carriers in the carrier resource pool within the computing node itself;
[0165] The computing node 1002 is further configured to determine the carrier creation concurrency within its own computing node when the number of the idle carriers is less than the target number value;
[0166] The computing node 1002 is further configured to create a new idle carrier in the carrier resource pool when the carrier creation concurrency is less than a preset threshold.
[0167] In some of the embodiments, the computing node 1002 is further used to determine the minimum number of carriers corresponding to the computing node according to the single-node request number per second limit value through the computing node;
[0168] The computing node 1002 is further configured to determine the maximum number of carriers corresponding to the computing node according to the carrier number configuration value of the carrier resource pool, or the upper limit value of the number of carriers corresponding to the computing node and the current number of carriers;
[0169] The computing node 1002 is further configured to determine the target quantity value according to the minimum value of the number of carriers and the maximum value of the number of carriers.
[0170] In some of the embodiments, the computing node 1002 is further used to use the product of the single-node request number limit per second and a first preset ratio as the minimum number of carriers corresponding to the computing node, wherein the first preset ratio is less than 1.
[0171] In some embodiments, the computing node 1002 is further configured to calculate a product of a difference between the upper limit of the number of carriers and the current number of carriers and a second preset ratio to obtain an actual number of carriers, wherein the second preset ratio is less than 1;
[0172] The minimum value between the carrier quantity configuration value of the carrier resource pool and the actual value of the carrier quantity is used as the maximum value of the carrier quantity corresponding to the computing node.
[0173] In some of the embodiments, the computing node 1002 is further used to delete some idle carriers in the carrier resource pool when the number of idle carriers is greater than the maximum number of carriers, until the number of idle carriers in the carrier resource pool is no greater than the maximum number of carriers.
[0174] In some of these embodiments, the computing node 1002 is further configured to determine a carrier state corresponding to each carrier in the computing node itself;
[0175] The computing node 1002 is further configured to count the number of carriers in a preset carrier state to obtain the current carrier quantity value, wherein the preset carrier state includes an idle state, a ready state, and an in-use state.
[0176] In some embodiments, the carrier state also includes a to-be-destroyed state, and the carrier in the to-be-destroyed state includes a carrier to which a function has been bound and the function has not been called within a preset time period; the computing node 1002 is also used to delete the carrier in the to-be-destroyed state.
[0177] In some embodiments, the target computing node 10021 is further used to obtain a target function runtime corresponding to the target function from the image according to the operating environment configuration information corresponding to the target function, wherein the image includes function runtimes corresponding to multiple function operating environments;
[0178] The target computing node 10021 is further configured to call the target function in the target idle carrier when the target function is running.
[0179] In some of the embodiments, the scheduling device 1001 is further used to obtain the recycling time corresponding to each computing node in the plurality of computing nodes;
[0180] The scheduling device 1001 is also used to delete the virtual machine corresponding to the first computing node when the system time reaches the first recycling time corresponding to the first computing node, wherein the first computing node includes any node among the multiple computing nodes;
[0181] The scheduling device 1001 is also used to create a virtual machine corresponding to a new computing node.
[0182] In some of the embodiments, the scheduling device 1001 is further used to calculate the amount of idle resources of each computing node in the plurality of computing nodes;
[0183] The scheduling device 1001 is further configured to use a computing node with the largest amount of idle resources among the multiple computing nodes as the target computing node.
[0184] In some of the embodiments, the idle carriers have carrier operating environments isolated from each other.
[0185] Therefore, by dividing the function computing system into two layers, the scheduling device is responsible for selecting idle target computing nodes from multiple computing nodes in the upper layer, and delegating the carrier scheduling strategy to the computing nodes in the lower layer for execution, and the number of carriers in the carrier resource pool of the lower layer is dynamically adjusted by each computing node according to its own resource occupancy. In this way, the upper-layer scheduling device does not need to care about the distribution of specific carriers, does not maintain the specific information of the carriers, can simplify the upper-layer scheduling strategy, reduce the carrier scheduling time, and reduce the cold start delay. At the same time, the dynamic adjustment of the number of carriers can enable the system to cope with various load flow scenarios. Therefore, the embodiment of the present application can reduce the function cold start delay under burst traffic and improve the user experience.
[0186] The present application also provides a function calculation system. Fig.11 Provide detailed explanation.
[0187] Fig.11 1 is a structural diagram of a function computing system provided by another embodiment of the present application. The function computing system 1100 includes a scheduling device 1101 and multiple bare metal servers 1102. A carrier resource pool is respectively set in each of the multiple bare metal servers, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding bare metal server according to its own resource occupancy status.
[0188] like Fig.11 As shown, the function computing system 1100 may include:
[0189] The scheduling device 1101 is used to determine an idle target bare metal server 11021 from multiple bare metal servers 1102 when a function call request for a target function is obtained;
[0190] The scheduling device 1101 is further used to send a function call request to the target bare metal server;
[0191] The target bare metal server 11021 is used to obtain a target idle carrier from a target carrier resource pool according to the function call request, and to obtain a target function corresponding to the function call request;
[0192] The target bare metal server 11021 is also used to call the target function in the target idle carrier.
[0193] Therefore, by deploying carriers on large-scale bare metal instances, since fewer resources are consumed for carrier management, more resources in each bare metal server can be used to set up more carriers, saving node resources and further improving carrier deployment density.
[0194] Fig.12 It is a schematic diagram of the hardware structure of a computer device provided in one embodiment of the present application.
[0195] like Fig.12 As shown, the computer device 1200 includes an input device 1201 , an input interface 1202 , a processor 1203 , a memory 1204 , an output interface 1205 , and an output device 1206 .
[0196] The input interface 1202, the processor 1203, the memory 1204, and the output interface 1205 are connected to each other through the bus 1210, and the input device 1201 and the output device 1206 are connected to the bus 1210 through the input interface 1202 and the output interface 1205, respectively, and then connected to other components of the computer device 1200. Specifically, the input device 1201 receives input information from the outside, and transmits the input information to the processor 1203 through the input interface 1202; the processor 1203 processes the input information based on the computer executable instructions stored in the memory 1204 to generate output information, temporarily or permanently stores the output information in the memory 1204, and then transmits the output information to the output device 1206 through the output interface 1205; the output device 1206 outputs the output information to the outside of the computer device 1200 for the user to use.
[0197] In one embodiment, Fig.12 The computer device 1200 shown may be implemented as a data processing device, which may include: a memory configured to store a program; and a processor configured to run the program stored in the memory to execute the data processing method described in the above embodiment.
[0198] In one embodiment, the memory can also be used to store the above multiple information and combine the above Figures 1 to 9 The calculation result of each step in the function call process described is as follows. As an example, the calculation result at least includes: the minimum number of carriers, the maximum number of carriers, the target number value, etc.
[0199] According to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer-readable storage medium. For example, an embodiment of the present application includes a computer-readable storage medium, which includes storing a program or instruction on the computer-readable storage medium, and when the program or instruction is executed by a computer device, the computer device performs the steps of the above method.
[0200] According to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network, and / or installed from a removable storage medium.
[0201] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions, and when it is run on a computer, the computer executes the method described in each of the above embodiments. When loading and executing computer program instructions on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integrations. The available media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid-state drives), etc.
[0202] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A function calling method, applied to a function computing system, wherein the function computing system includes a scheduling device and a plurality of computing nodes, and the method includes: In the case where the scheduling device obtains a function call request for the target function, determining an idle target computing node from the plurality of computing nodes through the scheduling device; Sending the function call request to the target computing node, wherein a carrier resource pool is respectively set in each of the plurality of computing nodes, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding computing node according to the resource occupation status in the computing node itself; Obtaining, through the target computing node, a target idle carrier from a target carrier resource pool according to the function call request, and obtaining the target function corresponding to the function call request; Calling the target function in the target idle carrier through the target computing node; The calling of the target function in the target idle carrier includes: According to the operating environment configuration information corresponding to the target function, obtaining the target function runtime corresponding to the target function from the image, wherein the image includes function runtimes corresponding to multiple function operating environments; Based on the target function execution, the target function is called in the target idle carrier.
2. The method according to claim 1, further comprising: Each computing node among the multiple computing nodes respectively obtains the number of idle carriers in the carrier resource pool within its own computing node; When the number of the idle carriers is less than the target number value, determining, by the computing node, a carrier creation concurrency within the computing node itself; When the carrier creation concurrency is less than a preset threshold, a new idle carrier is created in the carrier resource pool by the computing node.
3. The method according to claim 2, wherein: When the number of idle carriers is less than the target number value, before determining, by the computing node, the concurrency of carrier creation in the computing node itself, the method further includes: Determine, by the computing node, a minimum number of carriers corresponding to the computing node according to a single-node request number limit per second; Determine, by the computing node, a maximum value of the number of carriers corresponding to the computing node according to a configuration value of the number of carriers in the carrier resource pool, or an upper limit value of the number of carriers corresponding to the computing node and a current value of the number of carriers; The target quantity value is determined by the calculation node according to the minimum value of the carrier quantity and the maximum value of the carrier quantity.
4. The method according to claim 3, wherein: The determining, according to the single-node request number limit per second, a minimum number of carriers corresponding to the computing node, comprises: The product of the single-node request number limit per second and a first preset ratio is used as the minimum number of carriers corresponding to the computing node, wherein the first preset ratio is less than 1.
5. The method according to claim 3, wherein: The determining, according to the carrier quantity configuration value of the carrier resource pool, or the upper limit value of the carrier quantity corresponding to the computing node and the current carrier quantity value, the maximum value of the carrier quantity corresponding to the computing node includes: Calculate the difference between the upper limit of the number of carriers and the current number of carriers, and multiply the difference by a second preset ratio to obtain an actual number of carriers, wherein the second preset ratio is less than 1; The minimum value between the carrier quantity configuration value of the carrier resource pool and the actual value of the carrier quantity is used as the maximum value of the carrier quantity corresponding to the computing node.
6. The method according to claim 3, further comprising: In the case that the number of the idle carriers is greater than the maximum number of carriers, some idle carriers in the carrier resource pool are deleted by the computing node until the number of the idle carriers in the carrier resource pool is no greater than the maximum number of carriers.
7. The method according to claim 3, wherein: Before determining, by the computing node, the maximum number of carriers corresponding to the computing node according to the carrier number configuration value of the carrier resource pool, or the upper limit value of the number of carriers corresponding to the computing node and the current number of carriers, the method further includes: Determine, by the computing node, the carrier state corresponding to each carrier in the computing node itself; The current carrier quantity value is obtained by counting the number of carriers in a preset carrier state through the calculation node, wherein the preset carrier state includes an idle state, a ready state, and an in-use state.
8. The method according to claim 7, wherein the carrier state further includes a to-be-destroyed state, and the carrier in the to-be-destroyed state includes a carrier to which a function has been bound and the function has not been called within a preset time period; the method further includes: The carrier in the to-be-destroyed state is deleted through the computing node.
9. The method according to claim 1, further comprising: Obtaining, by the scheduling device, a recycling time corresponding to each computing node in the plurality of computing nodes; When the system time reaches the first recycling time corresponding to the first computing node, deleting the virtual machine corresponding to the first computing node through the scheduling device, wherein the first computing node includes any node among the multiple computing nodes; A virtual machine corresponding to a new computing node is created by the scheduling device.
10. The method according to claim 1, wherein: The step of determining an idle target computing node from the plurality of computing nodes comprises: Calculating the amount of idle resources of each computing node among the multiple computing nodes; The computing node with the largest amount of idle resources among the multiple computing nodes is used as the target computing node.
11. The method according to claim 1, wherein: The carrier operating environments are isolated between the idle carriers.
12. A function calling method, applied to a function computing system, wherein the function computing system includes a scheduling device and multiple bare metal servers, and the method includes: When the scheduling device obtains a function call request for the target function, the scheduling device determines an idle target bare metal server from the plurality of bare metal servers; Sending the function call request to the target bare metal server, wherein a carrier resource pool is respectively set in each of the multiple bare metal servers, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding bare metal server according to its own resource occupancy status; Obtaining, through the target bare metal server, a target idle carrier from a target carrier resource pool according to the function call request, and obtaining the target function corresponding to the function call request; Calling the target function in the target idle carrier through the target bare metal server; The calling of the target function in the target idle carrier includes: According to the operating environment configuration information corresponding to the target function, obtaining the target function runtime corresponding to the target function from the image, wherein the image includes function runtimes corresponding to multiple function operating environments; Based on the target function execution, the target function is called in the target idle carrier.
13. A function computing system, comprising a scheduling device and a plurality of computing nodes; The scheduling device is used to determine an idle target computing node from the multiple computing nodes when a function call request for a target function is obtained; The scheduling device is further configured to send the function call request to the target computing node, wherein: A carrier resource pool is respectively set in each of the plurality of computing nodes, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding computing node according to the resource occupation status in the computing node itself; The target computing node is used to obtain a target idle carrier from a target carrier resource pool according to the function call request, and to obtain the target function corresponding to the function call request; The target computing node is further used to call the target function in the target idle carrier; The target computing node, when calling the target function in the target idle carrier, is specifically used to: obtain the target function runtime corresponding to the target function from the image according to the operating environment configuration information corresponding to the target function, wherein the image includes function runtimes corresponding to multiple function operating environments; based on the target function runtime, call the target function in the target idle carrier.
14. A function computing system, comprising a scheduling device and a plurality of bare metal servers; The scheduling device is used to determine an idle target bare metal server from the multiple bare metal servers when a function call request for a target function is obtained; The scheduling device is further configured to send the function call request to the target bare metal server, wherein: A carrier resource pool is respectively set in each of the multiple bare metal servers, and the number of idle carriers in the carrier resource pool is dynamically adjusted by the corresponding bare metal server according to its own resource occupancy status; The target bare metal server is used to obtain a target idle carrier from a target carrier resource pool according to the function call request, and to obtain the target function corresponding to the function call request; The target bare metal server is further used to call the target function in the target idle carrier; The target bare metal server, when calling the target function in the target idle carrier, is specifically used to: According to the operating environment configuration information corresponding to the target function, the target function runtime corresponding to the target function is obtained from the image, wherein the image includes function runtimes corresponding to multiple function operating environments; based on the target function runtime, the target function is called in the target idle carrier.
Citation Information
Patent Citations
Function calculation cold start acceleration method and device, equipment and storage medium
CN111475235A
Function calculation cold start acceleration method based on lightweight security container
CN113672343A