A method, device, equipment and readable medium for traffic load transfer
By monitoring partition traffic load in the Function Compute system and launching instances in idle partitions, the rolling migration of traffic load is achieved, solving the problem of hot traffic affecting service quality and resource utilization in existing technologies, and realizing lossless migration and efficient resource utilization.
Patent Information
- Application Number
- CN202310489320.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-04-27
AI Technical Summary
Existing traffic load balancing methods cannot effectively address availability, immediacy, and resource utilization issues in function computing systems, especially impacting service quality and resource costs under high-traffic conditions.
By monitoring the traffic load values of partitions, hot partitions are identified and instances are started in idle partitions, enabling rolling migration of traffic load and updating of the partition allocation table. This avoids the impact of cold starts and ensures business availability and high resource utilization.
It enables lossless shifting of traffic load, ensuring business availability, immediate effectiveness, and high utilization of system computing resources during the migration process, while avoiding service quality degradation and resource waste.
Smart Images

Figure CN116506436B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of distributed systems, and particularly relates to a method, device, equipment and readable medium for traffic load transfer. Background Art
[0002] A multi-tenant distributed computing system provides a fully managed serverless computing service for users. The function computing system architecture maintains the master-worker-partition mechanism, and the system load carrier is the partition. Among them, 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 multiple workers can exist in each system application module; the partition is the partition, and the system load is divided into each partition. The partition is scheduled to the worker by the system scheduling component master for loading and providing services externally. Due to the performance bottleneck of each module component of the system, as the business scale increases, there will be hot traffic on a single machine worker. At this time, load balancing management of the system hot spot is required, and the load balancing management involves how to handle the hot spot and also involves the process of traffic load transfer.
[0003] Currently, the relatively common methods for traffic load transfer in the industry are live migration, multi-batch migration, and greedy migration. These three solutions do not meet the requirements of the function computing system for availability, immediacy, and resource utilization during the traffic load transfer process. Live migration directly migrates without considering the impact of cold start, which directly affects the service quality during the load migration; multi-batch migration sacrifices a part of the immediacy, and the service quality will still be damaged during the migration because the cold start impact still exists, which is unacceptable for latency-sensitive online services; greedy migration doubles the number of surviving instances and the consumed resources, doubles the pressure on the downstream, increases the migration cost, and the stability will be affected to a certain extent.
[0004] The information disclosed in this background art section is only intended to increase the understanding of the overall background of the present invention, and should not be regarded as an admission or any form of suggestion that this information constitutes the prior art already known to those of ordinary skill in the art. Summary of the Invention
[0005] The purpose of the present invention is to provide a method, device, equipment and readable medium for traffic load transfer, to achieve lossless transfer of the target traffic to be migrated in a distributed computing system, ensure business availability during the migration process, immediate effectiveness of traffic migration, and high utilization rate of system computing resources, and ensure the end-to-end delay stability of business traffic during the migration process.
[0006] For the above purposes, an aspect of an embodiment of the present invention provides a method for traffic load relocation, including the following steps: receiving a traffic load and sending the traffic load to a corresponding partition based on a partition allocation table; monitoring the traffic load values of each partition and determining whether a partition becomes a hot partition based on the traffic load values; in response to a partition becoming a hot partition, starting some instances in the hot partition in an idle partition, and after the startup is completed, relocating the corresponding traffic load in the hot partition to the idle partition; and updating the partition allocation table based on the change of the partition where the instance is located, and sending newly received traffic loads to corresponding partitions based on the updated partition allocation table.
[0007] In some embodiments, the method further includes: shutting down the some instances started in the idle partition in the hot partition.
[0008] 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: worker nodes, users, services, functions, versions.
[0009] In some embodiments, determining whether a partition becomes a hot 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 the partition to become a hot partition; in response to a partition becoming a hot partition, starting some instances in the hot partition in an idle partition based on a preset ratio includes: in response to confirming that the partition becomes a hot partition, starting some instances in the hot partition in an idle partition based on a first preset ratio.
[0010] 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 a second preset value; in response to the traffic load value exceeding the second preset value, considering the partition to be about to become a hot partition; starting some instances in the hot partition in an idle partition based on a second preset ratio; wherein, the second preset value is less than the first preset value, and the second preset ratio is less than the first preset ratio.
[0011] In some embodiments, starting some instances in the hot partition in the idle partition based on a preset ratio and migrating the corresponding traffic load in the hot partition to the idle partition includes: starting some instances in the hot partition in the idle partition based on a first preset ratio, migrating the corresponding traffic load in the hot partition to the idle partition, and determining whether the hot partition becomes a normal partition; in response to the hot partition not becoming a normal partition, repeating the above steps; in response to the hot partition becoming a normal partition, completing the migration of the traffic load.
[0012] In some embodiments, updating the partition allocation table based on the hot partition and the idle partition includes: obtaining the business entity object corresponding to the traffic load migrated from the hot 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 migration of the traffic load, deleting the operation and maintenance state identifier.
[0013] On the other hand, an embodiment of the present invention further provides a device for migrating traffic load, including: a receiving module configured to receive traffic load and send the traffic load to the corresponding partition based on the partition allocation table; a scheduling module configured to monitor the traffic load value of each partition and determine whether a partition becomes a hot partition based on the traffic load value; a management module configured to, in response to a partition becoming a hot partition, start some instances in the hot partition in the idle partition and, after the start is completed, migrate the corresponding traffic load in the hot partition to the idle partition; and an operation and maintenance module 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.
[0014] On yet another aspect, an embodiment of the present invention further provides a computer device, including: at least one processor; and a memory storing computer instructions that can run on the processor, and when the instructions are executed by the processor, the steps of the above method are implemented.
[0015] On yet another aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above method.
[0016] The present invention has at least the following beneficial technical effects: By distributing the load traffic through the partition allocation table, the efficiency of traffic monitoring is improved, the immediacy of judging hot partitions is further enhanced, and the stability of services is improved; During the process of traffic load relocation, a part of the instances will be preheated on the idle partition in advance, and then part of the traffic will be relocated to the idle partition according to the bearing capacity of the preheated instances on the idle partition, ensuring that no negative impact is caused to the user service performance during this period, realizing lossless relocation of the target traffic to be migrated by the distributed computing system, ensuring service availability during the migration process, immediate effectiveness of traffic migration, and high utilization rate of system computing resources, and ensuring the end-to-end delay stability of service traffic during the migration process. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other embodiments can be obtained based on these drawings.
[0018] Figure 1 It is a schematic diagram of an embodiment of the method for traffic load relocation provided by the present invention;
[0019] Figure 2 It is a system framework diagram of an embodiment of the method for traffic load relocation provided by the present invention;
[0020] Figure 3 It is a schematic diagram of an embodiment of the device for traffic load relocation provided by the present invention;
[0021] Figure 4 It is a schematic diagram of an embodiment of the computer device provided by the present invention;
[0022] Figure 5 It is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the following will describe the specific embodiments of the present invention in detail. However, it should be understood that the protection scope of the present invention is not limited by the specific embodiments.
[0024] It should be noted that all the expressions using "first" and "second" in the embodiments of the present invention are used to distinguish two entities or parameters with the same name but different, so "first" and "second" are only for the convenience of expression and should not be construed as a limitation on the embodiments of the present invention. This will not be elaborated in the subsequent embodiments one by one.
[0025] Unless otherwise expressly stated, throughout the specification and claims, the term "comprising" or variations thereof such as "comprises" or "comprising" shall be understood to include the stated element or component and not to exclude other elements or other components.
[0026] To facilitate the understanding of the technical solutions provided by the embodiments of the present application by those skilled in the art, the related technologies are briefly described below: In a function computing system, the Partition partition, as the carrier of the system load, is scheduled by the system scheduling component master to each actual working node worker. The worker loads the target Partition partition and then provides services externally. At the same time, the traffic load will be distributed to each Partition partition, such as being hashed and distributed according to the user ID, service ID, function ID, etc. However, during the actual service process, the system side needs to adjust the partition allocation relationship in a timely manner according to the change of the traffic load, move the traffic between different partitions, so as to achieve load balancing and good performance and avoid hotspots. Generally, adjusting the partition allocation relationship will directly affect the service quality. The traffic load surges from the old partition to the new partition instantaneously. At this time, the service on the new partition has not been started and completed, and it takes a certain amount of time to start. Therefore, the request delay and success rate during this period will be affected.
[0027] Based on the above purpose, in the first aspect of the embodiments of the present invention, an embodiment of a method for moving traffic load is proposed. Figure 1 Shown is a schematic diagram of an embodiment of the method for moving traffic load provided by the present invention. As Figure 1 shown, the method for moving traffic load in the embodiments of the present invention includes the following steps:
[0028] 001. Receive the traffic load and send the traffic load to the corresponding partition based on the partition allocation table;
[0029] In this embodiment, the front-end network management component undertakes the service traffic and accurately routes and distributes the traffic to each partition based on the partition allocation table. When the function request corresponding to the undertaker service traffic is normal, the traffic will be distributed to each partition in a random and evenly distributed scheduling manner. Among them, the partition allocation table records the mapping relationship between each service entity object and each partition, and each component synchronizes the traffic load scheduling among multiple partitions based on this table, so as to realize the allocation of global traffic and load.
[0030] 002. Monitor the traffic load value of each partition and determine whether the partition becomes a hot partition based on the traffic load value;
[0031] 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.
[0032] 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.
[0033] 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
[0034] 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 consumption and doubling of the number of surviving instances. As the traffic load in the old partition decreases, 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 both immediacy and stability are guaranteed.
[0035] 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.
[0036] 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.
[0037] 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.
[0038] In this embodiment, for the scenario of online stateful distributed services, neither violent relocation nor multi-batch relocation is adopted. Instead, by pre-warming the instances in advance, the impact brought by service cold start during relocation is completely avoided, greatly ensuring that the service quality is not damaged. To avoid additional resource consumption 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 dropped in the old partition. Then, according to the ratio of the number of instances between the new and old partitions, the proportional relocation of the traffic load is completed. In this way, not only is the lossless relocation of traffic ensured, but also it is guaranteed that the resource consumption and downstream pressure will not double. At the same time, because it is a rolling relocation, a certain degree of guarantee is also obtained in terms of immediacy.
[0039] In this embodiment, Figure 2 The following shows the system framework diagram of the embodiment of the method for traffic load relocation provided by the present invention. As Figure 2 shown, the control component (master) is the partition scheduling component on the system side. Based on the load conditions of each partition, each partition is adjusted in real time to achieve the purpose of load balancing. The supported policies include worker level, user level, service level, function level, version level, etc.; the partition allocation table records the mapping relationship of each business entity object (user, service, function, version) to each partition. Each component synchronizes the traffic load scheduling among multiple partitions based on this table to achieve the allocation of global traffic and load; the api server (interface service) is the front-end gateway component of the system. This component is stateless, and its main role is to receive business traffic and accurately route and allocate the traffic to each partition based on the partition allocation table; when the function is in a normal state, the traffic will be allocated to each partition in a random and evenly distributed scheduling manner.
[0040] In some embodiments of the present invention, the method further includes: shutting down some of the instances started in the idle partition in the hot partition.
[0041] In this embodiment, 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 dropped in the old partition. In this way, not only is the lossless relocation of traffic ensured, but also it is guaranteed that the resource consumption and downstream pressure will not double. At the same time, because it is a rolling relocation, a certain degree of guarantee is also obtained in terms of immediacy.
[0042] In some embodiments of the present invention, the method further includes: allocating different business entity objects to the 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 the corresponding partitions; the business entity objects include at least one of the following: worker, user, service, function, version.
[0043] In this embodiment, the partition scheduling component on the system side adjusts each partition in real time based on the load status of each partition load to achieve the purpose of load balancing. Service traffic is routed to each partition according to the partition allocation table. The entries of this table can be constructed based on different types of entities (worker nodes, users, services, functions, aliases), and the hash value of the different type of entity ID to the target Partition is used as the Token (identifier) to save the routing relationship between each entity and different Partitions, so as to implement various traffic allocation policies at different levels (user level, service level, function level).
[0044] In some embodiments of the present invention, determining whether a partition becomes a hot partition based on the traffic load value includes: determining whether the traffic load value of the partition exceeds a first preset value. In response to the traffic load value exceeding the first preset value, it is considered that the partition becomes a hot partition; in response to the partition becoming a hot partition, starting some instances in the hot partition in the idle partition based on a preset ratio includes: in response to confirming that the partition becomes a hot partition, starting some instances in the hot partition in the idle partition based on the first preset ratio.
[0045] In this embodiment, the system side needs to adjust the partition allocation relationship in a timely manner according to the change of the traffic load, move the traffic between different partitions to achieve load balancing and good performance, and avoid hot spots. When encountering a hot spot, it is necessary to move some of the traffic load of the hot partition to other partitions. During the moving process, a part of the instances will be preheated on the new partition in advance, and then some traffic will be moved to the new partition according to the bearing capacity of the preheated instances on the new partition, and so on, until it is ensured that there is no negative impact on the user service performance. In addition, as the traffic load in the old partition decreases, the idle instances can be gradually taken offline and recycled, keeping the cost basically unchanged. Greatly ensure that the service quality during the movement is not affected, achieve lossless movement, so that the operation and maintenance personnel no longer need to worry about the impact on the user service when dealing with hot spots, and improve the stability of the system to a certain extent.
[0046] 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 a second preset value; in response to the traffic load value exceeding the second preset value, it is considered that the partition is about to become a hot partition; starting some instances in the hot partition in the idle partition based on the second preset ratio; wherein, the second preset value is less than the first preset value, and the second preset ratio is less than the second preset ratio.
[0047] In this embodiment, to prevent hotspots from occurring, the preset value can be appropriately reduced, that is, a second preset value is set. If the traffic load exceeds the second preset value, traffic load migration is performed in advance based on the second preset ratio. During the migration process, a part of the instances are preheated on the new partition in advance, and then part of the traffic is migrated to the new partition according to the carrying capacity of the preheated instances on the new partition, and so on, until it is ensured that no negative impact is caused to the user service performance.
[0048] In some embodiments of the present invention, starting a part of the instances in the hot partition in the idle partition based on a preset ratio and migrating the corresponding traffic load in the hot partition to the idle partition includes: starting a part of the instances in the hot partition in the idle partition based on the first preset ratio, migrating the corresponding traffic load in the hot partition to the idle partition, and determining whether the hot partition becomes a normal partition; in response to the hot partition not becoming a normal partition, repeating the above steps; in response to the hot partition becoming a normal partition, completing the traffic load migration.
[0049] In this embodiment, during the migration process, a part of the instances are preheated on the new partition in advance, and then part of the traffic is migrated to the new partition according to the carrying capacity of the preheated instances on the new partition, and so on, until the hot partition becomes a normal partition, during which no negative impact is caused to the user service performance. A rolling traffic migration strategy is implemented. As the service instances on the target partition are started one by one, the traffic is gradually migrated to the target partition proportionally, and at the same time, the idle service instances in the current partition are reduced. Under the premise of ensuring service quality, the migration speed is increased to meet the requirements for instantaneity and resource utilization in some scenarios.
[0050] In some embodiments of the present invention, updating the partition allocation table based on the hot partition and the idle partition includes: obtaining the business entity object corresponding to the traffic load migrated from the hot 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 migration, deleting the operation and maintenance state identifier.
[0051] In this embodiment, the concept of the operation and maintenance state is proposed. During the operation and maintenance state, graceful migration of the traffic load is completed to distinguish the normal state and the operation and maintenance state of each system component. For the normal business traffic without the operation and maintenance state identifier, it is allocated to each partition in a random and evenly distributed scheduling manner. This not only ensures lossless traffic migration but also ensures the high performance of system components.
[0052] It should be particularly noted that each step in the various embodiments of the above method for traffic load relocation can be mutually crossed, replaced, added, or deleted. Therefore, these reasonable permutation and combination transformations for the method of traffic load relocation should also fall within the protection scope of the present invention, and the protection scope of the present invention should not be limited to the embodiments.
[0053] Based on the above object, the second aspect of the embodiments of the present invention proposes a device for traffic load relocation. Figure 3 Shown is a schematic diagram of an embodiment of the device for traffic load relocation provided by the present invention. As Figure 3 shown, the device for traffic load relocation in the embodiments of the present invention includes the following modules: a receiving module 011 configured to receive traffic loads and send the traffic loads to corresponding partitions based on a partition allocation table; a scheduling module 012 configured to monitor the traffic load values of each partition and determine whether a partition becomes a hot partition based on the traffic load values; a management module 013 configured to, in response to a partition becoming a hot partition, start some instances in the hot partition in an idle partition and relocate the corresponding traffic loads in the hot partition to the idle partition after the startup is completed; 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 newly received traffic loads to corresponding partitions based on the updated partition allocation table.
[0054] Based on the above object, the third aspect of the embodiments of the present invention proposes a computer device. Figure 4 Shown is a schematic diagram of an embodiment of the computer device provided by the present invention. As Figure 4 shown, the computer device in the embodiments of the present invention includes the following devices: at least one processor 021; and a memory 022, where the memory 022 stores computer instructions 023 that can run on the processor, and when the instructions are executed by the processor, the steps of the above method are implemented.
[0055] The present invention also provides a computer-readable storage medium. Figure 5 Shown is a schematic diagram of an embodiment of the computer-readable storage medium provided by the present invention. As Figure 5 shown, the computer-readable storage medium 031 stores a computer program 032 that, when executed by a processor, executes the above method.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] 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.
[0060] In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted via a computer-readable medium as one or more instructions or code. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one location to another. The storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, the computer-readable media may comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general purpose or special purpose computer or a general purpose or special purpose processor. Additionally, any connection is properly termed a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are 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.
[0061] The above are exemplary embodiments of the present disclosure, but it should be noted that various changes and modifications can be made without departing from the scope of the embodiments of the present disclosure defined by the claims. The functions, steps, and / or actions of the method claims according to the disclosed embodiments herein need not be performed in any particular order. Additionally, although the elements of the embodiments of the present disclosure may be described or claimed in individual form, they may also be understood as plural unless explicitly limited to the singular.
[0062] It should be understood that, as used herein, unless the context clearly supports otherwise, the singular forms "a" are also intended to include the plural forms. It should also be understood that the "and / or" used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0063] The serial numbers of the disclosed embodiments of the present invention above are only for description and do not represent the superiority or inferiority of the embodiments.
[0064] Those of ordinary skill in the art can understand that all or part of the steps to implement the above embodiments can be completed by hardware, or can be completed by instructing relevant hardware through a program. The program can be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk, an optical disk, or the like.
[0065] Those of ordinary skill in the art should understand that the discussion of any above embodiment is only exemplary, and is not intended to imply that the scope (including the claims) disclosed by the embodiments of the present invention is limited to these examples; under the idea of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other variations in different aspects of the embodiments of the present invention as above, and they are not provided in detail for the sake of brevity. Therefore, any omission, modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present invention shall be included in the protection scope of the embodiments of the present invention.
Claims
1. A method for traffic load transfer, characterized in that, It includes the following steps: Receive traffic loads and send the traffic loads to corresponding partitions based on a partition allocation table; Monitor the traffic load values of each partition and determine whether a partition becomes a hot partition based on the traffic load values; In response to a partition becoming a hot partition, start some instances in the hot partition in idle partitions, and after the startup is completed, transfer the corresponding traffic loads in the hot partition to the idle partitions; And Update the partition allocation table based on the change of the partitions where the some instances are located, and send newly received traffic loads to corresponding partitions based on the updated partition allocation table.
2. The method for traffic load relocation according to claim 1, wherein It further includes: Shut down the some instances started in the idle partitions in the hot partition.
3. The method for traffic load relocation according to claim 1, wherein It further includes: Allocate different business entity objects to corresponding partitions based on the traffic load conditions 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 relocation according to claim 1, wherein Determining whether a partition becomes a hot partition based on the traffic load value includes: Judge whether the traffic load value of the partition exceeds a first preset value. In response to the traffic load value exceeding the first preset value, it is considered that the partition becomes a hot partition; In response to a partition becoming a hot partition, starting some instances in the hot partition in idle partitions based on a preset ratio includes: In response to confirming that the partition becomes a hot partition, start some instances in the hot partition in idle partitions based on a first preset ratio.
5. The method for traffic load relocation according to claim 4, wherein It further includes: In response to the traffic load value not exceeding the first preset value, further judge whether the traffic load exceeds a second preset value; In response to the traffic load value exceeding the second preset value, it is considered that the partition is about to become a hot partition; Start some instances in the hot partition in idle partitions based on a second preset ratio; Wherein, the second preset value is less than the first preset value, and the second preset ratio is less than the second preset ratio.
6. The method for traffic load transfer according to claim 1, characterized in that, Starting some instances in the hot partition in idle partitions based on a preset ratio and transferring the corresponding traffic loads in the hot partition to the idle partitions includes: Start some instances in the hot partition in idle partitions based on a first preset ratio, transfer the corresponding traffic loads in the hot partition to the idle partitions, and judge whether the hot partition becomes a normal partition; In response to the hot partition not becoming a normal partition, repeat the above steps; In response to the hot partition becoming a normal partition, complete the traffic load transfer.
7. The method for traffic load transfer according to claim 1, wherein Updating the partition allocation table based on the hot partition and the idle partition includes: Obtain the business entity object corresponding to the traffic load transferred from the hot partition to the idle partition, modify the corresponding mapping relationship in the partition allocation table based on the business entity object, and add an operation and maintenance state identifier to the corresponding business entity object; In response to completing the traffic load transfer, delete the operation and maintenance state identifier.
8. A device for traffic load transfer, characterized in that, It includes: A receiving module, configured to receive traffic loads and send the traffic loads to corresponding partitions based on a partition allocation table; A scheduling module, configured to monitor traffic load values of each partition and determine whether a partition becomes a hot partition based on the traffic load values; A management module, configured to, in response to a partition becoming a hot partition, start some instances in the hot partition in an idle partition and, after the start is completed, transfer the corresponding traffic load in the hot partition to the idle partition; And An operation and maintenance module, configured to update the partition allocation table based on the change of the partition where the some instances are located and send newly received traffic loads to corresponding partitions based on the updated partition allocation table.
9. A computer device, characterized in that, Comprising: At least one processor; And A memory, where computer instructions that can run on the processor are stored, and when the computer instructions are executed by the processor, the steps of the method according to any one of claims 1-7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1-7 are implemented.
Citation Information
Patent Citations
Dynamic cache allocation and network management
CN106462589A
Load balancing processing method and device, electronic equipment and storage medium
CN111913670A