Example scheduling method and related apparatus, gateway device, and storage medium
Patent Information
- Application Number
- CN202211592228.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2042-12-08
AI Technical Summary
但是,前者在运行代码过程中仍需要拉取,对于java,python等类脚本语言,可能需要拉取大量代码包,导致耗时较长;后者无法避免随机触发访问导致的冷启动加载时间过长的问题
[0011]上述方案,通过响应于接收到客户端的业务请求,基于已注册服务5实例的注册信息,检测是否存在可承接业务请求的已注册服务实例;在不存在可承接业务请求的已注册服务实例的情况下,先拉起混合服务实例再拉起公共资源池节点、单服务实例中至少一者,以分别承接业务请求,一方面基于已注册服务实例的注册信息,检测是否存储可承接业务
Smart Images

Figure CN115904665B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, and in particular to an instance scheduling method and related apparatus, gateway device and storage medium. Background Technology
[0002] With the development of science and technology, the use of computers has become increasingly convenient and sophisticated. In order to ensure the security of data during computer use, how to effectively avoid computer cold starts has become one of the research hotspots.
[0003] Currently, cold start time is typically saved by using multi-level caching and deploying corresponding code, or by predicting future function computation access times and creating relevant service instances in advance. However, the former still requires fetching during code execution, which may involve fetching a large number of code packages for scripting languages like Java and Python, resulting in long processing times; the latter cannot avoid the problem of excessively long cold start loading times caused by random access. Therefore, how to minimize cold starts and improve the smooth transition from computation triggering to high concurrency has become an urgent problem to be solved. Summary of the Invention
[0004] The main technical problem addressed by this application is to provide an instance scheduling method and related devices, gateway devices, and storage media that can minimize cold starts and improve the smooth transition from computation triggering to high concurrency.
[0005] To address the aforementioned issues, the first aspect of this application provides an instance scheduling method, comprising: in response to receiving a business request from a client, detecting whether there is a registered service instance capable of handling the business request based on the registration information of the registered service instance; if there is no registered service instance capable of handling the business request, first launching a hybrid service instance and then launching at least one of the public resource pool node and a single service instance to handle the business request respectively.
[0006] To address the aforementioned issues, a second aspect of this application provides an instance scheduling apparatus, comprising: an instance detection module and a service launch module. The instance detection module, in response to a received business request from a client, detects whether an instance exists based on the registration information of a registered service instance.
[0007] In the case of no registered service instance capable of handling business requests, the service launch module is used to launch at least one of the following: a hybrid service instance, a public resource pool node, or a single service instance, to handle business requests respectively.
[0008] To address the aforementioned problems, a third aspect of this application provides a gateway device, including a communication circuit, a memory, and a processor, wherein the communication circuit and the memory are respectively coupled to the processor, and the memory stores...
[0009] The device stores program instructions, which the processor uses to execute to implement the instance scheduling method of 0 in the first aspect above.
[0010] To address the aforementioned problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used in the instance scheduling method described in the first aspect above.
[0011] The above solution, upon receiving a client's business request, checks whether there are any registered service instances capable of handling the request, based on the registration information of the five registered service instances. If no such instance exists, it first activates a hybrid service instance, then activates at least one of the public resource pool node or a single service instance to handle the request. This process, based on the registration information of the registered service instances, checks whether they store data suitable for handling the request.
[0012] Requesting a registered service instance helps improve the response speed of business requests. On the other hand, if no registered service instance exists that can handle the business request, the hybrid service is started first.
[0013] Instances help conserve service resources for handling business requests. Furthermore, by first launching a hybrid service instance, and then launching at least one of the public resource pool nodes or single service instances to handle business requests separately, multi-level scheduling can minimize the occurrence of cold starts. Therefore, it can avoid cold starts as much as possible and improve the smooth transition from computation triggering to high concurrency. Attached Figure Description
[0014] Figure 1 This is a flowchart illustrating an embodiment of the scheduling method of this application;
[0015] Figure 2 This is a schematic diagram of the framework of an embodiment of the instance scheduling method of this application;
[0016] Figure 3 This is a schematic diagram of the framework of an embodiment of the scheduling device of this application;
[0017] Figure 4 This is a schematic diagram of the framework of an embodiment of the gateway device of this application;
[0018] Figure 5 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0019] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0020] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0021] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C. "Several" means at least one. The terms "first," "second," etc., in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0022] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the scheduling method of this application.
[0023] Specifically, this may include the following steps:
[0024] Step S11: In response to receiving a business request from a client, based on the registration information of the registered service instances, check whether there is a registered service instance that can accept the business request.
[0025] In one implementation scenario, instances are used to handle business requests. Furthermore, a registered service instance is a service instance that has already registered with the gateway. The registration information in the gateway includes at least the metadata and IP address of the current service instance, and the registered service instance can handle the data traffic of business requests forwarded by the gateway. In addition, registered service instances include at least one of the following: hybrid service instances, public resource pool nodes, and single service instances. Hybrid service instances can handle multiple business requests, and each tenant can maintain an independent hybrid service instance. A public resource pool can be used by multiple tenants, and public resource pool nodes are exclusively used by each tenant. For example, before public resource pool node A is used, both tenant 1 and tenant 2 can use it, but tenant 2 cannot use it while tenant 1 is using it. A single service instance is for a single tenant and can only run one service.
[0026] In one implementation scenario, if there are registered service instances capable of handling business requests, the gateway can forward the data traffic of business requests to these instances. Furthermore, the data traffic can be forwarded to these instances according to a preset priority, where single-service instances have a higher priority than public resource pool nodes, and public resource pool nodes have a higher priority than hybrid service instances. This method, through preset priorities, allows service instances to respond quickly to client requests, thereby minimizing the risk of cold starts.
[0027] In another implementation scenario, if there are registered service instances that can handle business requests, the registration information of single service instances and public resource pool nodes can be further checked. If at least one of the single service instance and public resource pool node can handle business requests, the gateway is prohibited from forwarding business requests to the hybrid service instance to avoid putting too much pressure on the hybrid service instance or occupying it for a long time, which would affect the first trigger response of other function computing instances.
[0028] Step S12: If there is no registered service instance that can handle the business request, first start the hybrid service instance, then start at least one of the public resource pool node and single service instance to handle the business request respectively.
[0029] In one implementation scenario, if there is no registered service instance that can handle the business request, the business request can be launched first using a hybrid service instance. After the service goes online, at least one of the public resource pool node or the single service instance can be launched to handle the business request respectively.
[0030] In a specific implementation scenario, a hybrid service instance can be launched to handle business requests. Specifically, a hybrid service instance is first launched as the first service instance to handle business requests. The service application code for the business requests is then cached on the first service instance, and its registration information after going live is obtained. Based on this registration information, the data traffic of the business requests is directly forwarded to the first service instance, where the service application code processes the data traffic. Furthermore, the hybrid service instance can contain multiple runtime environments for handling client business requests. Because the hybrid service instance can handle the runtime environment requirements of different applications based on multiple runtime environments, it saves image fetching and node scheduling time. Simultaneously, it saves application fetching time during the cold start phase by fetching user function computation application modifications in real time. This approach, by caching the service application code for business requests on the first service instance, saves fetching and node scheduling time, helps improve the response speed of the hybrid service instance to client business requests, and can minimize the occurrence of cold starts.
[0031] Furthermore, for each tenant, at least one hybrid service instance can be maintained. Alternatively, a hybrid service instance can be maintained for each tenant, with each instance running multiple services, and the hybrid service instance maintained for the target tenant only handling the target tenant's business requests. Secondly, the number of hybrid service instances to reserve for a tenant can be determined based on the scale of the tenant's function compute activity; alternatively, the application service code to be cached in the hybrid service instances can be determined based on the number of function computes frequently initiated by the tenant. For example, if the frequently initiated function compute service involves mathematical calculations, the corresponding application service code can be cached in the hybrid service instances. This approach, by determining the number of hybrid service instances to reserve for a tenant based on the scale of their function compute activity, or by determining the application service code to be cached in the hybrid service instances based on the number of function computes frequently initiated by the tenant, minimizes the waste of storage and bandwidth resources by launching all the code and avoids cold starts.
[0032] In a specific implementation scenario, a public resource pool node can be launched to handle business requests. Specifically, a public resource pool node can be applied for first, serving as a second service instance. The service application code for the business request is then fetched to the second service instance, along with its registration information after its launch. Based on this registration information, the data traffic of the business request is directly forwarded to the second service instance, and the previously launched hybrid service instance is released. The second service instance then runs its service application code to process the data traffic. It should be noted that if a hybrid service instance is launched before the public resource pool node, the data traffic of the business request is forwarded to the second service instance, and the previously launched hybrid service instance is released. Furthermore, before releasing the previously launched hybrid service instance, it is necessary to determine if it belongs to the same tenant and if no other business requests from the same tenant are running on it. Otherwise, the previously launched hybrid service instance is not released. For example, for tenant 1 and tenant 2, hybrid service instance 1 and hybrid service instance 2 are launched respectively to handle business requests. Hybrid service instance 1 handles business requests A and B from tenant 1, and hybrid service instance 2 handles business request C from tenant 2. When tenant 1 and tenant 2 respectively apply for a public resource pool node as a second service instance, and obtain the registration information after the second service instance goes online, and forward the data traffic of tenant 1's business request A to tenant 1's second service instance, and forward the data traffic of tenant 2's business request C to tenant 2's second service instance, then hybrid service instance 2 can be released. However, hybrid service instance 1 cannot be released because business request B is running in hybrid service instance 1. In the above method, after forwarding the data traffic of the business requests to the second service instance, the previously launched hybrid service instance is released. On the one hand, this can effectively avoid cold starts. On the other hand, by releasing the previously launched hybrid service instance, the utilization rate of the hybrid service instance can be improved, thereby improving the efficiency of the instance scheduling method.
[0033] Furthermore, after releasing the previously launched hybrid service instances, public resource pool nodes can be populated. That is, a first number of public resource pool nodes can be populated, where the first number is the number of public resource pool nodes that have been requested. This avoids the problem of insufficient public resource pool nodes and allows multiple instances to be launched quickly to cope with high concurrency access.
[0034] In a specific implementation scenario, a single service instance can be launched to handle business requests. Specifically, a single service instance can be launched as a third service instance to handle business requests. This single service instance integrates the service application code for the business requests and obtains the registration information of the third service instance after it goes online. Based on the registration information, the data traffic of the business requests is directly forwarded to the third service instance, and the previously applied public resource pool nodes are reclaimed. The third service instance then runs the service application code to process the data traffic. It should be noted that if public resource pool nodes are launched before the single service instance, the data traffic of the business requests is forwarded to the third service instance, and the previously applied public resource pool nodes are reclaimed, i.e., deleted. Furthermore, before reclaiming the previously applied public resource pool nodes, it is necessary to determine whether the reclaimed public resource pool nodes belong to the same tenant. If so, the previously applied public resource pool nodes are reclaimed; otherwise, they are not reclaimed. In addition, each single service instance is responsible for running one service and is exclusively used by a single tenant. The above method, after forwarding the data traffic of the business request to the third service instance, reclaims the previously applied public resource pool node. On the one hand, it can effectively avoid cold start, and on the other hand, by reclaiming the previously applied public resource pool node, it helps to protect the tenant's business information, thereby improving the security of business information during instance scheduling.
[0035] In another specific implementation scenario, a single-service instance can be launched to handle business requests, serving as the fourth service instance. This single-service instance integrates the service application code for the business requests and obtains the registration information of the fourth service instance after it goes online. Based on this registration information, the data traffic of the business requests is directly forwarded to the fourth service instance, and the previously launched hybrid service instance is released. The fourth service instance then runs its service application code to process the data traffic. It should be noted that if the hybrid service instance is launched before the single-service instance, the data traffic of the business requests will be forwarded to the fourth service instance, and the previously launched hybrid service instance will be released.
[0036] The above scheme, upon receiving a client's business request, checks for the existence of a registered service instance capable of handling the request based on the registration information of registered service instances. If no such instance exists, it first activates a hybrid service instance, then activates at least one of the public resource pool node or a single service instance to handle the request. This approach improves response speed by using the registration information of existing service instances to check for available instances and conserves service resources when no such instance exists. Furthermore, activating the hybrid service instance first, followed by the public resource pool node or a single service instance, through multi-level scheduling, minimizes the risk of cold starts. Therefore, it effectively avoids cold starts and improves the smooth transition from computation-triggered to high-concurrency scenarios.
[0037] Please see Figure 2 , Figure 2 This is a schematic diagram of the framework of an embodiment of the instance scheduling method of this application, as shown below. Figure 2As shown, when the gateway receives a client's business request, it checks whether there is a registered service instance capable of handling the request based on the registration information of the registered service instances. If such an instance exists, the gateway forwards the data traffic of the business request to it. The registered service instance can be at least one of a hybrid service instance, a public resource pool node, or a single service instance. If no such instance exists, the gateway first starts the hybrid service instance, then starts at least one of the public resource pool node or single service instance to handle the business request. Specifically, starting the hybrid service instance to handle the business request can be done through the instance management service, first starting the hybrid service instance used to handle the business request as the first service instance. The service application code of the business request is then cached on the first service instance, and the registration information after the first service instance goes online is obtained. Based on this registration information, the data traffic of the business request is directly forwarded to the first service instance. To launch a public resource pool node to handle business requests, you can apply for a public resource pool node through the instance management service. This node will serve as the second service instance, and the service application code for the business request will be pulled to the second service instance. You will also obtain the registration information of the second service instance after it goes live. Based on this registration information, the data traffic of the business request will be directly forwarded to the second service instance, and the previously launched hybrid service instance will be released. To launch a single service instance to handle business requests, you can launch a single service instance through the instance management service to handle business requests. This instance will serve as the third service instance, and you will obtain the registration information of the third service instance after it goes live. Based on this registration information, the data traffic of the business request will be directly forwarded to the third service instance, and the previously applied public resource pool node will be reclaimed. Furthermore, a hybrid service instance is a tenant-exclusive hybrid instance that runs multiple services. A hybrid service instance maintained by a target tenant only handles business requests from that target tenant. The public resource pool is shared by multiple tenants, and the public resource pool nodes within it are exclusively used by each tenant. The public pods in the diagram can be public resource pool nodes. A single service instance runs one service and is exclusively used by a single tenant.
[0038] The above scheme, upon receiving a client's business request, checks for the existence of a registered service instance capable of handling the request based on the registration information of registered service instances. If no such instance exists, it first activates a hybrid service instance, then activates at least one of the public resource pool node or a single service instance to handle the request. This approach improves response speed by using the registration information of existing service instances to check for available instances and conserves service resources when no such instance exists. Furthermore, activating the hybrid service instance first, followed by the public resource pool node or a single service instance, through multi-level scheduling, minimizes the risk of cold starts. Therefore, it effectively avoids cold starts and improves the smooth transition from computation-triggered to high-concurrency scenarios.
[0039] Please see Figure 3 , Figure 3 This is a schematic diagram of the framework of an embodiment of the instance scheduling device of this application. The instance scheduling device 30 includes: an instance detection module 31 and a service launch module 32. The instance detection module 31 is used to detect, in response to a received service request from a client, whether there is a registered service instance capable of handling the service request, based on the registration information of the registered service instances. The service launch module 32 is used to, if there is no registered service instance capable of handling the service request, first launch a hybrid service instance, then launch at least one of the public resource pool node and a single service instance, to handle the service request respectively.
[0040] The above scheme, on the one hand, uses the registration information of registered service instances to detect whether there are stored registered service instances capable of handling business requests, which helps improve the response speed of business requests. On the other hand, when no registered service instances capable of handling business requests exist, the hybrid service instance is launched first, which helps save service resources for handling business requests. In addition, launching the hybrid service instance first, followed by launching at least one of the public resource pool nodes and single service instances to handle business requests respectively, can minimize the occurrence of cold starts through multi-level scheduling. Therefore, it can minimize the occurrence of cold starts and improve the smooth transition from computation triggering to high concurrency.
[0041] In some publicly available embodiments, the service launch module 32 includes a first launch submodule, a first acquisition submodule, and a first forwarding submodule. The first launch submodule launches a hybrid service instance for handling business requests, serving as the first service instance. The first acquisition submodule caches the service application code of the business requests on the first service instance and acquires the registration information of the first service instance after it goes online. The first forwarding submodule forwards the data traffic of the business requests directly to the first service instance based on the registration information. The first service instance runs the service application code to process the data traffic.
[0042] Therefore, by caching the service application code of business requests in the first service instance, the time for fetching and node scheduling is saved, which helps to improve the response speed of the hybrid service instance to client business requests and can avoid cold start as much as possible.
[0043] In some publicly disclosed embodiments, the service launch module 32 includes a second acquisition submodule and a second forwarding submodule. The second acquisition submodule is used to apply for a public resource pool node as a second service instance, and to retrieve the service application code of the business request to the second service instance, as well as to obtain the registration information of the second service instance after it goes online. The second forwarding submodule is used to directly forward the data traffic of the business request to the second service instance based on the registration information, and to release the previously launched hybrid service instance. The second service instance runs the service application code to process the data traffic.
[0044] Therefore, after forwarding the data traffic of the business request to the second service instance, releasing the hybrid service instance that was started earlier can effectively avoid cold start, and improve the utilization rate of the hybrid service instance by releasing the hybrid service instance that was started earlier, thereby improving the efficiency of the instance scheduling method.
[0045] In some publicly available embodiments, the service launch module 32 includes a second launch submodule, a third acquisition submodule, and a third forwarding submodule. The second launch submodule launches a single service instance (which serves as the third service instance) to handle business requests; this single service instance integrates the service application code for the business requests. The third acquisition submodule acquires the registration information of the third service instance after it goes online. The third forwarding submodule, based on the registration information, directly forwards the data traffic of the business requests to the third service instance and reclaims the previously applied public resource pool nodes. The third service instance then runs the service application code to process the data traffic.
[0046] Therefore, after forwarding the data traffic of the business request to the third service instance, recycling is prioritized.
[0047] Applying for public resource pool nodes can effectively prevent cold starts, and by reclaiming previously applied public resource pool nodes, it helps protect tenants' business information, thereby improving the security of business information during instance scheduling.
[0048] In some disclosed embodiments, the registered service instances include at least one of the following: hybrid service instances, public resource pool nodes, and single service instances. When there is a registered service instance that can handle the business request, the data traffic of the business request is forwarded to the registered service instance according to a preset priority. Among the preset priorities, the priority of the single service instance is higher than the priority of the public resource pool node, and the priority of the public resource pool node is higher than the priority of the hybrid service instance.
[0049] Therefore, by setting preset priorities, service instances can respond to client requests quickly.
[0050] This can help avoid cold starts as much as possible.
[0051] In some public embodiments, a hybrid service instance is maintained for each tenant. The hybrid service instance is responsible for running multiple services, and the hybrid service instance maintained for the target tenant only handles the target tenant's business requests.
[0052] 5. In some disclosed embodiments, the instance scheduling device 30 further includes a first determining module and a second determining module. The first determining module is used to determine the number of hybrid service instances to reserve for a tenant based on the scale of the tenant's function computation; the second determining module is used to determine the application service code cached in the hybrid service instances based on the function computations frequently initiated by the tenant.
[0053] Therefore, the number of hybrid service instances to retain for a tenant can be determined based on the scale of the tenant's function computation; or the application service code to be cached in the hybrid service instance can be determined based on the function computation frequently initiated by the tenant, so as to avoid wasting storage and bandwidth resources by pulling up all the code and avoid cold starts.
[0054] In some publicly available embodiments, hybrid service instances contain multiple operating environments.
[0055] In some public embodiments, a public resource pool node is shared by multiple tenants; and / or, a single service instance is responsible for running a service, and the single service instance is exclusively used by a single tenant.
[0056] Please see Figure 4 , Figure 4This is a schematic diagram of a framework of one embodiment of a gateway device. The gateway device 40 includes: a communication circuit 41, a memory 43, and a processor 42. The communication circuit 41 and the memory 43 are respectively coupled to the processor 42. The memory 43 stores program instructions, and the processor 42 is used to execute the program instructions to implement the steps in any of the above-described example scheduling method embodiments.
[0057] Specifically, processor 42 controls itself, as well as communication circuit 41 and memory 43, to implement the steps in any of the above-described scheduling method embodiments. Processor 42 can also be referred to as a CPU (Central Processing Unit). Processor 42 may be an integrated circuit chip with signal processing capabilities. Processor 42 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 42 can be implemented using integrated circuit chips.
[0058] In the above scheme, the gateway device 40 can implement the steps in any of the above event capture method embodiments. On the one hand, based on the registration information of registered service instances, it detects whether there are stored registered service instances that can handle business requests, which helps to improve the response speed of business requests. On the other hand, if there are no registered service instances that can handle business requests, it first starts the hybrid service instance, which helps to save service resources for handling business requests. In addition, starting the hybrid service instance first and then starting at least one of the public resource pool node and single service instance to handle business requests respectively, through multi-level scheduling, can avoid cold starts as much as possible. Therefore, it can avoid cold starts as much as possible and improve the smooth transition from computation triggering to high concurrency.
[0059] Please see Figure 5 , Figure 5 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 50 stores program instructions 51 that can be executed by a processor. The program instructions 51 are used to implement the steps in any of the above-described instance scheduling method embodiments.
[0060] The above scheme can implement the steps in any of the above event capture method embodiments. On the one hand, based on the registration information of the registered service instances, it detects whether there are stored registered service instances that can handle business requests, which helps to improve the response speed of business requests. On the other hand, in the case that there are no registered service instances that can handle business requests, the hybrid service instance is launched first, which helps to save service resources for handling business requests. In addition, the hybrid service instance is launched first and then the public service instance is launched.
[0061] By using at least one of the shared resource pool nodes and single service instances to handle business requests, cold starts can be avoided as much as possible through multi-level scheduling. Therefore, cold starts can be minimized, and the smooth transition from computation triggering to high concurrency can be improved.
[0062] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely...
[0063] This is illustrative; for example, the division into modules or units is merely a logical functional division. In actual implementation, there may be other division methods, such as multiple units or components being combined or...
[0064] To be integrated into another system, or some features may be ignored or not performed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device, or unit, and may be electrical, mechanical, or other forms.
[0065] The unit described as 0, a separate component, may or may not be physically separate.
[0066] The components displayed as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0067] Furthermore, the functional units in the various embodiments of this application can be integrated into a single processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0068] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
Claims
1. An instance scheduling method, characterized in that, include: In response to receiving a business request from a client, the system checks whether there is a registered service instance that can handle the business request, based on the registration information of the registered service instances. If no registered service instance exists that can handle the business request, the business request is first launched through a hybrid service instance. After the service goes online, at least one of the public resource pool node and the single service instance is launched to handle the business request respectively. The hybrid service instance can handle multiple business requests, the public resource pool node is exclusively used by each tenant, and the single service instance is for a single tenant and can only run one service.
2. The method according to claim 1, characterized in that, The steps of launching the hybrid service instance to accept the business request include: Launch a hybrid service instance to handle the business request, as the first service instance; The service application code of the business request is cached in the first service instance, and the registration information after the first service instance is launched is obtained; Based on the registration information, the data traffic of the business request is directly forwarded to the first service instance; wherein, the first service instance runs the service application code to process the data traffic.
3. The method according to claim 1, characterized in that, The steps of activating the public resource pool node to accept the service request include: Apply for the public resource pool node as the second service instance, pull the service application code of the business request to the second service instance, and obtain the registration information of the second service instance after it goes online; Based on the registration information, the data traffic of the business request is directly forwarded to the second service instance, and the previously launched hybrid service instance is released; wherein, the second service instance runs the service application code to process the data traffic.
4. The method according to claim 1, characterized in that, The steps of launching the single service instance to accept the business request include: Launch a single service instance to handle the business request, as a third service instance; wherein, the single service instance integrates the service application code of the business request; Obtain the registration information of the third service instance after it goes online; Based on the registration information, the data traffic of the business request is directly forwarded to the third service instance, and the previously applied public resource pool node is reclaimed; wherein, the third service instance runs the service application code to process the data traffic.
5. The method according to any one of claims 1 to 4, characterized in that, The registered service instances include at least one of the following: the hybrid service instance, the public resource pool node, and the single service instance. If there is a registered service instance that can handle the business request, the data traffic of the business request will be forwarded to the registered service instance according to a preset priority. Among the preset priorities, the priority of the single service instance is higher than the priority of the public resource pool node, and the priority of the public resource pool node is higher than the priority of the hybrid service instance.
6. The method according to claim 1, characterized in that, Each tenant maintains a hybrid service instance, which is responsible for running multiple services, and the hybrid service instance maintained for the target tenant only handles the target tenant's business requests.
7. The method according to claim 1, characterized in that, The method further includes: Based on the scale of the tenant function computation, determine the number of hybrid service instances to retain for the tenant; And / or, based on the function computations frequently initiated by the tenant, determine the application service code cached in the hybrid service instance.
8. An instance scheduling device, characterized in that, include: The instance detection module is used to respond to a business request received from a client and, based on the registration information of registered service instances, detect whether there is a registered service instance that can accept the business request. The service launch module is used to launch the business request first through a hybrid service instance when there is no registered service instance that can handle the business request. After the service is online, it launches at least one of the public resource pool node and single service instance to handle the business request respectively. The hybrid service instance can handle multiple business requests, the public resource pool node is exclusively used by each tenant, and the single service instance is oriented towards a single tenant and can only run one service.
9. A gateway device, characterized in that, The device includes a communication circuit, a memory, and a processor. The communication circuit and the memory are respectively coupled to the processor. The memory stores program instructions, and the processor is used to execute the program instructions to implement the instance scheduling method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the instance scheduling method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Resource allocation method, device and equipment
CN110647394A
Gateway automatic routing method and device, storage medium and computer equipment
CN112118184A