Traffic load moving method and apparatus, device, and storage medium

Through partition allocation table monitoring and instance preheating, the problem of business availability and resource utilization during the traffic load transfer process in the function computing system is solved, and a lossless and low-cost migration process is achieved.

WO2024222797A1PCT designated stage expired Publication Date: 2024-10-31CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/089802
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-27
Filing Date
2024-04-25
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

Existing traffic load shifting methods cannot effectively guarantee business availability, immediacy, and resource utilization during the migration process in function computing systems, and migration costs and stability are affected.

Method used

Monitor the traffic load through the partition allocation table, start the instance in the idle partition in advance, and move the traffic load of the hotspot partition to the idle partition after the instance startup is completed. Update the partition allocation table to achieve lossless transfer of traffic, avoid the impact of cold start, and ensure migration Business availability and resource utilization in the process.

Benefits of technology

It realizes the lossless movement of traffic in distributed computing systems, ensures business availability, immediate effectiveness and resource utilization during the migration process, reduces migration costs, and avoids service quality damage and resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024089802_31102024_PF_FP_ABST
    Figure CN2024089802_31102024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present invention is a traffic load moving method, comprising: receiving traffic load, and sending the traffic load to a corresponding partition on the basis of a partition allocation table; monitoring a traffic load value of each partition, and on the basis of the traffic load value, determining whether the partition is a hotspot partition or not; in response to the partition being the hotspot partition, launching, in an idle partition, some instances in the hotspot partition, and moving the corresponding traffic load in the hotspot partition to the idle partition after the launch is completed; and updating the partition allocation table on the basis of a change of the partition where the instances are located, and sending newly received traffic load to the corresponding partition on the basis of the updated partition allocation table. Also disclosed in the present invention are a corresponding apparatus, a computer device, and a medium. The present invention ensures the service availability, the traffic migration immediate effectiveness and the high utilization rate of system computing resources during migration, and guarantees the end-to-end delay stability of the service traffic during migration.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device, equipment and readable medium for traffic load shifting

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 27, 2023, with application number 202310489320.7 and application name “A method, device, equipment and readable medium for traffic load shifting”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present invention belongs to the technical field of distributed systems, and in particular relates to a method, device, equipment and readable medium for traffic load shifting. Background Art

[0003] The multi-tenant distributed computing system provides users with fully managed serverless computing services (Serverless). The function computing system architecture maintains the master-worker-partition mechanism, with partitions acting as the system load carrier. The master is the system scheduling component of the distributed system; the worker is the working node, each worker corresponds to a system application module, and each system application module can have multiple workers; and the partition is the partition into which the system load is divided. The partition is then dispatched to the worker by the master, the system scheduling component, for loading and external service provision. Due to performance bottlenecks in various system modules and components, as business scale increases, single-machine workers will experience hotspot traffic. At this time, load balancing management of the system hotspots is necessary. Load balancing management involves how to handle hotspots and how to shift traffic loads.

[0004] Currently, the most common methods for traffic load balancing in the industry include instant migration, multi-batch migration, and greedy migration. These three solutions are not suitable for the availability, immediacy, and resource utilization requirements of Function Compute systems during traffic load balancing. Instant migration performs migration without considering the impact of cold starts, which directly affects service quality during load balancing. Multi-batch migration sacrifices some immediacy, and service quality will still be affected during migration due to the cold start impact. This is unacceptable for latency-sensitive online services. Greedy migration doubles the number of active instances and resource consumption, doubling the pressure on downstream services, increasing migration costs, and affecting stability.

[0005] The information disclosed in this background technology section is only intended to enhance understanding of the overall background of the invention and should not be regarded as an admission or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art.

[0006] Summary of the Invention

[0007] The purpose of the present invention is to provide a method, device, equipment and readable medium for traffic load shifting, so as to realize lossless shifting of the target traffic for migration in a distributed computing system, ensure the service availability during the migration process, the immediate effectiveness of traffic migration and the high utilization rate of system computing resources, and ensure the end-to-end delay stability of the service traffic during the migration process.

[0008] Based on the above-mentioned purpose, one aspect of an embodiment of the present invention provides a method for shifting traffic load, comprising the following steps: receiving traffic load, and sending the traffic load to the corresponding partition based on a partition allocation table; monitoring the traffic load value of each partition, and judging whether the partition becomes a hotspot partition based on the traffic load value; in response to a partition becoming a hotspot partition, starting some instances in the hotspot partition in an idle partition, and shifting the corresponding traffic load in the hotspot partition to the idle partition after the startup is completed; and updating the partition allocation table based on the change of the partition where the instance is located, and sending the newly received traffic load to the corresponding partition based on the updated partition allocation table.

[0009] In some implementations, the method further includes: shutting down the portion of instances started in the idle partition in the hotspot partition.

[0010] In some embodiments, the method further includes: allocating different business entity objects to corresponding partitions based on the traffic load conditions of each partition; constructing a partition allocation table based on the mapping relationship between different business entity objects and corresponding partitions; the business entity objects include at least one of the following: working nodes, users, services, functions, and versions.

[0011] In some embodiments, determining whether a partition becomes a hotspot partition based on the traffic load value includes: determining whether the traffic load value of the partition exceeds a first preset value, and in response to the traffic load value exceeding the first preset value, deeming the partition to become a hotspot partition; in response to the partition becoming a hotspot partition, starting some instances in the hotspot partition in an idle partition based on a preset ratio, including: in response to confirming that the partition becomes a hotspot partition, starting some instances in the hotspot partition in an idle partition based on the first preset ratio.

[0012] In some embodiments, the method further includes: in response to the traffic load value not exceeding the first preset value, further determining whether the traffic load exceeds the second preset value; in response to the traffic load value exceeding the second preset value, deeming that the partition is about to become a hotspot partition; based on a second preset ratio, starting some instances in the hotspot partition in an idle partition; wherein, the second preset value is less than the first preset value, and the second preset ratio is less than the second preset ratio.

[0013] In some embodiments, starting some instances in the hotspot partition in the idle partition based on a preset ratio, and moving the corresponding traffic load in the hotspot partition to the idle partition includes: starting some instances in the hotspot partition in the idle partition based on a first preset ratio, and moving the corresponding traffic load in the hotspot partition to the idle partition, and judging whether the hotspot partition becomes a normal partition; in response to the hotspot partition not becoming a normal partition, repeating the above steps; in response to the hotspot partition becoming a normal partition, completing the traffic load movement.

[0014] In some embodiments, updating the partition allocation table based on the hotspot partition and the idle partition includes: obtaining the business entity object corresponding to the traffic load moved from the hotspot partition to the idle partition, modifying the corresponding mapping relationship in the partition allocation table based on the business entity object, and adding an operation and maintenance status identifier to the corresponding business entity object; in response to completing the traffic load movement, deleting the operation and maintenance status identifier.

[0015] On the other hand, an embodiment of the present invention provides a device for shifting traffic load, comprising: a receiving module configured to receive traffic load and send the traffic load to a corresponding partition based on a partition allocation table; a scheduling module configured to monitor the traffic load value of each partition and determine whether a partition becomes a hotspot partition based on the traffic load value; a management module configured to start some instances in the hotspot partition in an idle partition in response to a partition becoming a hotspot partition, and shift the corresponding traffic load in the hotspot partition to the idle partition after the startup is completed; and an operation and maintenance module configured to update the partition allocation table based on changes in the partition where the instance is located, and send the newly received traffic load to the corresponding partition based on the updated partition allocation table.

[0016] In another aspect of an embodiment of the present invention, a computer device is provided, comprising: at least one processor; and a memory, wherein the memory stores computer instructions that can be executed on the processor, and the instructions implement the steps of the above method when executed by the processor.

[0017] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, which stores a computer program that implements the above method steps when executed by a processor.

[0018] The present invention has at least the following beneficial technical effects: load traffic is distributed through a partition allocation table, thereby improving traffic monitoring efficiency, further improving the immediacy of judgment on hotspot partitions, and improving business stability; in the process of traffic load transfer, a part of the instances will be preheated in advance on the idle partitions, and then part of the traffic will be transferred to the idle partitions according to the carrying capacity of the preheated instances on the idle partitions, during which it is ensured that no negative impact is caused on the user's business performance, and the distributed computing system can transfer the target traffic without loss, thereby ensuring business availability during the migration process, the immediate effectiveness of traffic migration, and the high utilization rate of system computing resources, and ensuring the end-to-end delay stability of business traffic during the migration process. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying any creative work.

[0020] FIG1 is a schematic diagram of an embodiment of a method for traffic load shifting provided by the present invention;

[0021] FIG2 is a system framework diagram of an embodiment of a method for traffic load shifting provided by the present invention;

[0022] FIG3 is a schematic diagram of an embodiment of a device for traffic load shifting provided by the present invention;

[0023] FIG4 is a schematic diagram of an embodiment of a computer device provided by the present invention;

[0024] FIG5 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION

[0025] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the specific embodiments of the present invention are described in detail below, but it should be understood that the protection scope of the present invention is not limited by the specific embodiments.

[0026] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. Subsequent embodiments will not explain this one by one.

[0027] Unless expressly stated otherwise, throughout the specification and claims, the term "comprise" or variations such as "include" or "comprising", etc., will be understood to include the stated elements or components but not to exclude other elements or other components.

[0028] In order to facilitate those skilled in the art to understand the technical solutions provided by the embodiments of the present application, the following is a brief description of the relevant technologies: In the function computing system, the partition partition serves as the carrier of the system load, and is dispatched by the system scheduling component master to each actual working node worker. The worker loads the target partition partition and then provides services to the outside world. At the same time, the traffic load will be distributed to each partition partition, such as hash distribution based on user ID, service ID, function ID, etc. However, in the actual service process, the system side needs to adjust the partition allocation relationship in time according to the changes in traffic load, and move the traffic between different partitions to achieve load balancing and optimal performance and avoid hot spots. In general, adjusting the partition allocation relationship will directly affect the service quality. The traffic load will instantly surge from the old partition to the new partition. At this time, the service on the new partition has not been started yet, and the startup takes a certain amount of time, so the request delay and success rate during this period will be affected.

[0029] Based on the above objectives, the first aspect of the embodiments of the present invention provides an embodiment of a method for traffic load shifting. FIG1 shows a schematic diagram of an embodiment of the method for traffic load shifting provided by the present invention. As shown in FIG1 , the method for traffic load shifting of the embodiment of the present invention includes the following steps:

[0030] 001. Receive traffic load and send the traffic load to the corresponding partition based on the partition allocation table;

[0031] In this embodiment, the front-end network management component accepts service traffic and accurately routes it to each partition based on a partition allocation table. When the function requests corresponding to the accepted service traffic are normal, the traffic is distributed to each partition using a random and evenly distributed scheduling method. The partition allocation table records the mapping relationship between each service entity object and each partition. Based on this table, each component synchronizes traffic load scheduling across multiple partitions, thereby achieving global traffic and load allocation.

[0032] 002. Monitor the traffic load value of each partition and determine whether the partition becomes a hotspot partition based on the traffic load value;

[0033] In this embodiment, the traffic load value of each partition is monitored, and based on the traffic load value, it is determined whether the partition has become a hotspot partition. It is also determined whether the traffic load of the partition exceeds a first preset value. In response to the traffic load value exceeding the first preset value, the partition is considered to have become a hotspot partition. When a hotspot is encountered, part of the traffic load of the hotspot partition is transferred to other idle partitions to reduce the load of the original partition.

[0034] In this embodiment, hotspot partitions correspond to common partitions and idle partitions, where the traffic load values ​​of the partitions are, in order: hotspot partitions, common partitions, and idle partitions. The division of hotspot partitions, common partitions, and idle partitions can be based on the distribution ratio of each partition instance, based on a preset traffic load value, or any other method based on traffic load that is beneficial to traffic load balancing.

[0035] 003. In response to a partition becoming a hotspot partition, some instances in the hotspot partition are started in the idle partition, and after the startup is completed, the corresponding traffic load in the hotspot partition is moved to the idle partition; and

[0036] In this embodiment, when a hotspot is encountered, some instances are started in the idle partitions in advance. After the startup is completed, part of the traffic load of the hotspot partition is moved to other idle partitions to avoid cold starts. By rolling migration of instances between different partitions, the traffic load is also proportionally distributed between the new and old partitions as the instances migrate, avoiding resource loss and doubling of the number of surviving instances. As the traffic load on the old partition decreases, the idle instances can be gradually taken offline and recycled, keeping the cost basically unchanged. During the migration process, the service is lossless, the cost remains basically unchanged, and immediacy and stability are guaranteed.

[0037] In this embodiment, the number of partial instances can be confirmed based on the number of instances in the hotspot partition and the expected number of instances, or based on the number of instances in the idle partition, or based on the distribution of instances in all partitions, or any other method that is beneficial to traffic load shifting.

[0038] 004. Update the partition allocation table based on the change of the partition where the instance is located, and send the newly received traffic load to the corresponding partition based on the updated partition allocation table.

[0039] In this embodiment, the partition corresponding to the instance whose partition is changed is updated in the partition allocation table. Specifically, the hot partition before the instance is moved is changed to an idle partition after the move.

[0040] In this embodiment, for online stateful distributed service scenarios, no brute force relocation is performed, nor is a multi-batch relocation method adopted. Instead, the impact of service cold start during relocation is completely avoided by preheating the instance in advance, which greatly ensures that the service quality is not damaged. In order to avoid additional resource loss and downstream pressure, a proportional rolling relocation method is adopted. When the load is relocated from the old partition to the new partition, a certain number of service instances are started in the new partition in advance, and the same number of instances are removed from the old partition; then, the proportional relocation of the traffic load is completed according to the ratio of the number of instances between the new and old partitions. In this way, lossless relocation of traffic is ensured, and resource loss and downstream pressure are not doubled. At the same time, because it is a rolling relocation, immediacy is also guaranteed to a certain extent.

[0041] In this embodiment, FIG2 shows a system framework diagram of an embodiment of the method for traffic load shuffling provided by the present invention. As shown in FIG2 , the control component (master) is a partition scheduling component on the system side, which makes real-time adjustments to each partition based on the load status of each partition to achieve the purpose of load balancing. Supported strategies include worker level, user level, service level, function level, version level, etc.; the partition allocation table records the mapping relationship between each business entity object (user, service, function, version) and each partition, and each component synchronizes traffic load scheduling between multiple partitions based on the table, thereby realizing the allocation of global traffic and load; the api server (interface service) is the front-end gateway component of the system, which is stateless and its main role is to undertake business traffic and accurately route and distribute traffic to each partition based on the partition allocation table; when the function is in normal state, traffic will be distributed to each partition in a random and evenly distributed scheduling manner.

[0042] In some embodiments of the present invention, the method further includes: shutting down some instances started in the idle partition in the hotspot partition.

[0043] In this embodiment, when load is shifted from an old partition to a new one, a certain number of service instances are pre-launched in the new partition, and the same number of instances are decommissioned in the old partition. This ensures lossless traffic flow, prevents resource loss and reduces downstream pressure, and, because the shift is rolling, ensures immediacy.

[0044] In some embodiments of the present invention, the method also includes: allocating different business entity objects to corresponding partitions based on the traffic load conditions of each partition; constructing a partition allocation table based on the mapping relationship between different business entity objects and corresponding partitions; the business entity objects include at least one of the following: working nodes, users, services, functions, and versions.

[0045] In this embodiment, the system-side partition scheduling component makes real-time adjustments to each partition based on its load status to achieve load balancing. Business traffic is routed to each partition based on a partition allocation table. This table's entries can be constructed based on different types of entities (worker nodes, users, services, functions, aliases), using the hash value of each entity ID to the target partition as a token. This token stores the routing relationship between each entity and different partitions, thereby implementing multiple traffic distribution strategies at different levels (user level, service level, function level).

[0046] In some embodiments of the present invention, judging whether a partition becomes a hotspot partition based on the traffic load value includes: judging whether the traffic load value of the partition exceeds a first preset value, and in response to the traffic load value exceeding the first preset value, deeming the partition to become a hotspot partition; in response to the partition becoming a hotspot partition, starting some instances in the hotspot partition in the idle partition based on a preset ratio includes: in response to confirming that the partition becomes a hotspot partition, starting some instances in the hotspot partition in the idle partition based on the first preset ratio.

[0047] In this embodiment, the system side needs to adjust the partition allocation relationship in a timely manner according to the changes in traffic load, and move the traffic between different partitions to achieve load balancing and optimal performance and avoid hot spots. When encountering a hot spot, part of the traffic load of the hot spot partition needs to be moved to other partitions. During the move, a part of the instance will be preheated in the new partition in advance, and then part of the traffic will be moved to the new partition according to the carrying capacity of the preheated instance on the new partition. This process is repeated until it is guaranteed that there will be no negative impact on the user's business performance. In addition, as the traffic load on the old partition decreases, the idle instances can be gradually taken offline and recycled, keeping the cost basically unchanged. It greatly ensures that the service quality during the move is not affected, and achieves lossless move, so that operation and maintenance personnel no longer need to worry about the impact on user business when dealing with hot spots, and improves the stability of the system to a certain extent.

[0048] In some embodiments of the present invention, the method further includes: in response to the traffic load value not exceeding the first preset value, further determining whether the traffic load exceeds the second preset value; in response to the traffic load value exceeding the second preset value, considering that the partition is about to become a hotspot partition; based on the second preset ratio, starting some instances in the hotspot partition in the idle partition; wherein the second preset value is less than the first preset value, and the second preset ratio is less than the second preset ratio.

[0049] In this embodiment, in order to prevent the occurrence of hotspots, the preset value can be appropriately lowered, that is, a second preset value is set. If the traffic load exceeds the second preset value, the traffic load will be shifted in advance based on the second preset ratio. During the shifting process, a part of the instances will be preheated in the new partition in advance, and then part of the traffic will be shifted to the new partition according to the carrying capacity of the preheated instances on the new partition. This process is repeated until it is ensured that there is no negative impact on the user's business performance.

[0050] In some embodiments of the present invention, starting some instances in the hotspot partition in the idle partition based on a preset ratio, and moving the corresponding traffic load in the hotspot partition to the idle partition includes: starting some instances in the hotspot partition in the idle partition based on a first preset ratio, and moving the corresponding traffic load in the hotspot partition to the idle partition, and judging whether the hotspot partition becomes a normal partition; in response to the hotspot partition not becoming a normal partition, repeating the above steps; in response to the hotspot partition becoming a normal partition, completing the traffic load movement.

[0051] In this embodiment, during the migration process, a portion of instances are preheated in the new partition. Then, based on the carrying capacity of the preheated instances in the new partition, some traffic is relocated to the new partition. This process is repeated until the hotspot partition becomes a normal partition, ensuring no negative impact on user service performance. This implements a rolling traffic relocation strategy. As service instances in the target partition are launched one by one, traffic is relocated proportionally to the target partition. This also reduces the number of idle service instances in the current partition. This improves relocation speed while ensuring service quality, meeting the requirements of immediacy and resource utilization in some scenarios.

[0052] In some embodiments of the present invention, updating the partition allocation table based on hotspot partitions and idle partitions includes: obtaining the business entity object corresponding to the traffic load moved from the hotspot partition to the idle partition, modifying the corresponding mapping relationship in the partition allocation table based on the business entity object, and adding an operation and maintenance status identifier to the corresponding business entity object; in response to completing the traffic load movement, deleting the operation and maintenance status identifier.

[0053] This embodiment introduces the concept of an operational state, during which traffic load is gracefully shifted to distinguish between normal and operational states for each system component. Normal service traffic without an operational state indicator is randomly and evenly distributed across partitions. This ensures lossless traffic migration and high performance of system components.

[0054] It should be pointed out in particular that the various steps in the various embodiments of the above-mentioned method for traffic load shifting can be cross-linked, replaced, added, and deleted with each other. Therefore, these reasonable permutations, combinations, and transformations of the method for traffic load shifting should also fall within the scope of protection of the present invention, and the scope of protection of the present invention should not be limited to the embodiments.

[0055] Based on the above purpose, the second aspect of the embodiment of the present invention proposes a device for traffic load shifting. Figure 3 shows a schematic diagram of an embodiment of the device for traffic load shifting provided by the present invention. As shown in Figure 3, the device for traffic load shifting of the embodiment of the present invention includes the following modules: a receiving module 011, configured to receive the traffic load, and send the traffic load to the corresponding partition based on the partition allocation table; a scheduling module 012, configured to monitor the traffic load value of each partition, and determine whether the partition becomes a hotspot partition based on the traffic load value; a management module 013, configured to start some instances in the hotspot partition in the idle partition in response to the partition becoming a hotspot partition, and after the startup is completed, shift the corresponding traffic load in the hotspot partition to the idle partition; and an operation and maintenance module 014, configured to update the partition allocation table based on the change of the partition where the instance is located, and send the newly received traffic load to the corresponding partition based on the updated partition allocation table.

[0056] Based on the above objectives, a third aspect of an embodiment of the present invention provides a computer device. Figure 4 shows a schematic diagram of an embodiment of the computer device provided by the present invention. As shown in Figure 4, the computer device of this embodiment of the present invention includes the following devices: at least one processor 021; and a memory 022, wherein the memory 022 stores computer instructions 023 executable on the processor, which, when executed by the processor, implement the steps of the above method.

[0057] The present invention also provides a computer-readable storage medium. FIG5 is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. As shown in FIG5 , the computer-readable storage medium 031 stores a computer program 032 that, when executed by a processor, performs the above method.

[0058] Finally, it should be noted that those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the program of the method for traffic load shifting can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program can be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiments can achieve the same or similar effects as the corresponding embodiments of any of the aforementioned methods.

[0059] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.

[0060] In addition, the above method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.

[0061] It will also be appreciated by those skilled in the art that the various exemplary logic blocks, modules, circuits and algorithmic steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given of the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0062] In one or more exemplary designs, the function can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the function can be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Computer-readable media include computer storage media and communication media, and the communication media include any media that helps to transmit a computer program from one location to another. The storage medium can be any available medium that can be accessed by a general or special-purpose computer. As an example and not limitation, the computer-readable medium can include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of instructions or data structures and can be accessed by a general or special-purpose computer or a general or special-purpose processor. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves are used to send software from a website, server, or other remote source, the above-mentioned coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are all included in the definition of medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, and Blu-ray disc, where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0063] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope of the embodiments disclosed in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless expressly limited to the singular.

[0064] It should be understood that, as used herein, the singular forms "a" and "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" is intended to include any and all possible combinations of one or more of the associated listed items.

[0065] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0066] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program instructing the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.

[0067] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples. Within the spirit of the embodiments of the present invention, the technical features of the above embodiments or different embodiments may be combined, and there are many other variations of different aspects of the above embodiments of the present invention, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the scope of protection of the embodiments of the present invention.

Claims

1. A method for traffic load shifting, characterized in that: The following steps are involved: Receiving a traffic load, and sending the traffic load to a corresponding partition based on a partition allocation table; Monitor the traffic load value of each partition, and determine whether the partition becomes a hotspot partition based on the traffic load value; In response to a partition becoming a hotspot partition, some instances in the hotspot partition are started in the idle partition, and after the startup is completed, the corresponding traffic load in the hotspot partition is moved to the idle partition; as well as The partition allocation table is updated based on the change of the partition where the instance is located, and the newly received traffic load is sent to the corresponding partition based on the updated partition allocation table.

2. The method for traffic load shifting according to claim 1, characterized in that: Also includes: The part of instances started in the idle partition are closed in the hotspot partition.

3. The method for traffic load shifting according to claim 1, characterized in that: Also includes: Allocate different business entity objects to corresponding partitions based on the traffic load of each partition; Construct a partition allocation table based on the mapping relationship between different business entity objects and corresponding partitions; The business entity object includes at least one of the following: working node, user, service, function, version.

4. The method for traffic load shifting according to claim 1, characterized in that: Judging whether a partition becomes a hotspot partition based on the traffic load value includes: Determining whether the traffic load value of the partition exceeds a first preset value, and in response to the traffic load value exceeding the first preset value, considering that the partition becomes a hotspot partition; In response to a partition becoming a hotspot partition, starting some instances in the hotspot partition in an idle partition based on a preset ratio includes: In response to confirming that the partition becomes a hotspot partition, some instances in the hotspot partition are started in idle partitions based on a first preset ratio.

5. The method for traffic load shifting according to claim 4, characterized in that: Also includes: In response to the traffic load value not exceeding the first preset value, further determining whether the traffic load exceeds a second preset value; In response to the traffic load value exceeding a second preset value, it is considered that the partition is about to become a hotspot partition; Starting some instances in the hotspot partition in the idle partition based on a second preset ratio; The second preset value is smaller than the first preset value, and the second preset ratio is smaller than the second preset ratio.

6. The method for traffic load shifting according to claim 1, characterized in that: Starting some instances in the hotspot partition in the idle partition based on a preset ratio, and moving the corresponding traffic load in the hotspot partition to the idle partition includes: Based on a first preset ratio, some instances in the hotspot partition are started in the idle partition, and the corresponding traffic load in the hotspot partition is moved to the idle partition, and it is determined whether the hotspot partition is changed into a common partition; In response to the hotspot partition not being changed into a common partition, repeating the above steps; In response to the hotspot partition being changed into a common partition, the traffic load shifting is completed.

7. The method for traffic load shifting according to claim 1, characterized in that: Updating the partition allocation table based on the hotspot partition and the idle partition includes: Obtaining a business entity object corresponding to the traffic load moved from the hotspot partition to the idle partition, modifying the corresponding mapping relationship in the partition allocation table based on the business entity object, and adding an operation and maintenance state identifier to the corresponding business entity object; In response to completing the traffic load shifting, the operation and maintenance status identifier is deleted.

8. A device for traffic load shifting, characterized in that: include: A receiving module configured to receive a traffic load and send the traffic load to a corresponding partition based on a partition allocation table; A scheduling module configured to monitor the traffic load value of each partition and determine whether the partition becomes a hotspot partition based on the traffic load value; A management module configured to start some instances in the hotspot partition in the idle partition in response to a partition becoming a hotspot partition, and to move the corresponding traffic load in the hotspot partition to the idle partition after the startup is completed; as well as The operation and maintenance module is configured to update the partition allocation table based on the change of the partition where the instance is located, and send the newly received traffic load to the corresponding partition based on the updated partition allocation table.

9. A computer device, characterized in that: include: at least one processor; as well as A memory, wherein the memory stores computer instructions executable on the processor, wherein the computer instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Resource allocation method, device, and system

    CN108293041A

  • Flow load moving method, device, equipment and readable medium

    CN116506436A

  • System and method for reducing cold start latency of serverless functions

    US20200081745A1