Cross-cluster migration method, system, device and storage medium of load balancing instance

CN122933430APending Publication Date: 2026-10-16BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610885663.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

然而,因目标集群缺乏实例配置和已建立连接的会话(session)信息,负载均衡实例从源集群迁到目标集群时会导致这些连接被重置或报文被丢弃,影响客户端业务的运行

Benefits of technology

[0039]根据本公开的技术,能够实现对负载均衡实例的无损迁移,能够有效地提高负载均衡实例的跨集群迁移的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933430A_ABST
    Figure CN122933430A_ABST
Patent Text Reader

Abstract

The disclosure discloses a cross-cluster migration method, system and device of load balancing instances and a storage medium, relating to the technical field of service instance processing and cross-cluster service instance migration. The specific implementation scheme comprises: generating a configuration indication message for configuring a specified load balancing instance to be migrated and a migration indication message for migrating the specified load balancing instance to a target cluster respectively; based on the identification of the target cluster, sending the configuration indication message to the target cluster to indicate that the specified load balancing instance is configured in the target cluster; based on the identification of the specified load balancing instance, sending the migration indication message to a source cluster deploying the specified load balancing instance to indicate that the source cluster migrates sessions in which the specified load balancing instance has established a connection; and modifying the drain destination address of the specified load balancing instance to the drain destination address of the target cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, specifically to the technical fields of service instance processing and cross-cluster service instance migration, and particularly to a method, system, device and storage medium for cross-cluster migration of load balancing instances. Background Technology

[0002] In public or private cloud load balancing products, when load balancing instance traffic is high, posing a capacity risk to the cluster, or the cluster's data center needs to be taken offline and terminated, cross-cluster migration of instances is necessary to achieve disaster recovery or continue service. However, because the target cluster lacks instance configuration and established session information, migrating a load balancing instance from the source cluster to the target cluster can cause these connections to be reset or packets to be dropped, affecting the operation of client services. Summary of the Invention

[0003] This disclosure provides a method, system, device, and storage medium for cross-cluster migration of load balancing instances.

[0004] According to one aspect of this disclosure, a method for migrating a load balancer instance across clusters is provided, comprising:

[0005] Generate a configuration instruction message for configuring the specified load balancer instance to be migrated and a migration instruction message for migrating the specified load balancer instance to the target cluster, respectively.

[0006] Based on the identifier of the target cluster, the configuration instruction message is sent to the target cluster to instruct the specified load balancing instance to be configured in the target cluster;

[0007] Based on the identifier of the specified load balancer instance, the migration instruction message is sent to the source cluster where the specified load balancer instance is deployed, instructing the source cluster to migrate the sessions that have been connected to the specified load balancer instance.

[0008] Modify the destination address of the specified load balancer instance to the destination address of the target cluster.

[0009] According to another aspect of this disclosure, a method for migrating a load balancer instance across clusters is provided, comprising:

[0010] Receive a configuration instruction message sent by the load balancer controller, the configuration instruction message carrying the identifier of the specified load balancer instance and the deployment parameters of the specified load balancer instance;

[0011] Based on the identifier of the specified load balancing instance and the deployment parameters of the specified load balancing instance, deploy the specified load balancing instance locally on the target cluster;

[0012] Receive the session information table of the specified load balancer instance sent by the source cluster that deploys the specified load balancer instance. The session information table includes the identifier of the specified load balancer instance and the corresponding session identifier.

[0013] Based on the session information table, the session messages of the migrated specified load balancer instance are processed.

[0014] According to another aspect of this disclosure, a method for migrating a load balancer instance across clusters is provided, comprising:

[0015] Receive a migration instruction message sent by the load balancer controller, the migration instruction message including the identifier of the specified load balancer instance to be migrated and the second set of addresses of the target cluster to which it is to be migrated;

[0016] Obtain the session information table of the specified load balancer instance, wherein the session information table includes the identifier of the specified load balancer instance and the corresponding session identifier;

[0017] The session information table of the specified load balancing instance is sent to the target cluster so that the target cluster can process the session messages of the migrated specified load balancing instance based on the session information table.

[0018] According to another aspect of this disclosure, a load balancing controller is provided, comprising:

[0019] The generation module is used to generate a configuration instruction message for configuring a specified load balancer instance to be migrated and a migration instruction message for migrating the specified load balancer instance to the target cluster, respectively.

[0020] The sending module is configured to send the configuration indication message to the target cluster based on the identifier of the target cluster, so as to indicate that the specified load balancing instance is configured in the target cluster;

[0021] The sending module is further configured to send the migration indication message to the source cluster where the specified load balancing instance is deployed, based on the identifier of the specified load balancing instance, to instruct the source cluster to migrate the sessions that have been connected to the specified load balancing instance.

[0022] The traffic redirection module is also used to modify the traffic redirection destination address of the specified load balancer instance to the traffic redirection destination address of the target cluster.

[0023] According to another aspect of this disclosure, a target cluster is provided, comprising:

[0024] The receiving module is used to receive a configuration instruction message sent by the load balancer controller, wherein the configuration instruction message carries the identifier of the specified load balancer instance and the deployment parameters of the specified load balancer instance;

[0025] The deployment module is used to deploy the specified load balancing instance locally on the target cluster based on the identifier of the specified load balancing instance and the deployment parameters of the specified load balancing instance.

[0026] The receiving module is further configured to receive a session information table of the specified load balancing instance sent by the source cluster that deploys the specified load balancing instance, wherein the session information table includes the identifier of the specified load balancing instance and the corresponding session identifier.

[0027] The session processing module is used to process the session messages of the migrated specified load balancer instance based on the session information table.

[0028] According to another aspect of this disclosure, a source cluster is provided, comprising:

[0029] The receiving module is used to receive a migration instruction message sent by the load balancer controller. The migration instruction message includes the identifier of the specified load balancer instance to be migrated and the second set of addresses of the target cluster to which it is to be migrated.

[0030] The acquisition module is used to acquire the session information table of the specified load balancing instance, wherein the session information table includes the identifier of the specified load balancing instance and the corresponding session identifier;

[0031] The sending module is used to send the session information table of the specified load balancing instance to the target cluster, so that the target cluster can process the session messages of the migrated specified load balancing instance based on the session information table.

[0032] According to another aspect of this disclosure, a cross-cluster migration system for load balancing instances is provided, including a load balancing controller, a source cluster where a specified load balancing instance is deployed, and a target cluster to which the specified load balancing instance is to be migrated; the load balancing controller adopts the aspects described above and any possible implementation of the load balancing controller, the source cluster adopts the aspects described above and any possible implementation of the source cluster, and the target cluster adopts the aspects described above and any possible implementation of the target cluster.

[0033] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0034] At least one processor; and

[0035] A memory communicatively connected to the at least one processor; wherein,

[0036] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the methods described above and any possible implementations.

[0037] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the methods described above and any possible implementation thereof.

[0038] According to another aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the aspects and any possible implementations described above.

[0039] According to the technology disclosed herein, lossless migration of load balancing instances can be achieved, which can effectively improve the efficiency of cross-cluster migration of load balancing instances.

[0040] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0041] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:

[0042] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure;

[0043] Figure 2 This is a schematic diagram according to the second embodiment of the present disclosure;

[0044] Figure 3 This is a schematic diagram according to the third embodiment of the present disclosure;

[0045] Figure 4 This is a schematic diagram according to the fourth embodiment of the present disclosure;

[0046] Figure 5 This is a schematic diagram according to the fifth embodiment of the present disclosure;

[0047] Figure 6 This is a schematic diagram according to the sixth embodiment of the present disclosure;

[0048] Figure 7 This is a schematic diagram according to the seventh embodiment of the present disclosure;

[0049] Figure 8 This is a schematic diagram according to the eighth embodiment of the present disclosure;

[0050] Figure 9 This is a schematic diagram according to the ninth embodiment of the present disclosure;

[0051] Figure 10 This is a schematic diagram according to the tenth embodiment of the present disclosure;

[0052] Figure 11 This is a schematic diagram according to the eleventh embodiment of the present disclosure;

[0053] Figure 12 This is a schematic diagram according to the twelfth embodiment of the present disclosure;

[0054] Figure 13 This is a schematic diagram according to the thirteenth embodiment of this disclosure;

[0055] Figure 14 This is a block diagram of an electronic device used to implement the methods of the embodiments of this disclosure. Detailed Implementation

[0056] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0057] Obviously, the described embodiments are only some, not all, of the embodiments disclosed herein. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0058] It should be noted that the terminal devices involved in the embodiments of this disclosure may include, but are not limited to, smart devices such as mobile phones, personal digital assistants (PDAs), wireless handheld devices, and tablet computers; the display devices may include, but are not limited to, personal computers, televisions, and other devices with display functions.

[0059] Furthermore, the term "and / or" in this article 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 existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0060] To improve the migration efficiency of load balancer instances, existing technologies can employ either cold migration or hot migration. In cold migration, the service of the source cluster instances is stopped, and then the instance service is restarted in the target cluster. This method results in service interruption on the instance, impacting the client experience. Existing hot migration can perform migration while maintaining service operation, but there is a risk of losing all or part of existing connection session information, which can also affect business operations; therefore, it is considered a lossy migration.

[0061] Figure 1 This is a schematic diagram based on the first embodiment of the present disclosure; as shown Figure 1 As shown, this embodiment provides a method for cross-cluster migration of load balancing instances, applied on the load balancing controller side. The load balancing controller is used to control the cross-cluster migration of load balancing instances. The cross-cluster migration method for load balancing instances in this embodiment may specifically include the following steps:

[0062] S101. Generate a configuration instruction message for configuring the specified load balancer instance to be migrated and a migration instruction message for migrating the specified load balancer instance to the target cluster, respectively.

[0063] Specifically, the specified load balancer instance to be migrated can be represented by its identifier; the target cluster to which it is to be migrated can be represented by its identifier. In actual migration scenarios, the identifiers of the specified load balancer instance to be migrated and the target cluster to be migrated can be entered by staff or determined based on analysis of monitoring results of the load balancer instance. In this embodiment, the load balancer instance is migrated using a hot migration method. The identifier of the target cluster can be the identifier of any online running cluster. The specified load balancer instance can be any load balancer instance currently running on a source cluster.

[0064] In order to achieve accurate migration of load balancing instances between different clusters, in this embodiment, a configuration instruction message for configuring the specified load balancing instance to be migrated and a migration instruction message for migrating the specified load balancing instance to the target cluster can be generated first.

[0065] S102. Based on the identifier of the target cluster, send a configuration instruction message to the target cluster to instruct the specified load balancing instance to be configured in the target cluster.

[0066] S103. Based on the identifier of the specified load balancer instance, send a migration instruction message to the source cluster where the specified load balancer instance is deployed, instructing the source cluster to migrate the sessions that have been connected to the specified load balancer instance.

[0067] Preferably, in this embodiment, a configuration instruction message is first sent to the target cluster. Upon receiving the configuration instruction message, the target cluster begins configuring the specified load balancing instance locally. Then, based on the identifier of the specified load balancing instance, the identifier of the source cluster deploying the specified load balancing instance can be obtained. Furthermore, based on the identifier of the source cluster deploying the specified load balancing instance, a migration instruction message can be sent to the source cluster deploying the specified load balancing instance. When the source cluster receives the migration instruction message, the deployment of the specified load balancing instance has been completed. At this point, the source cluster can directly perform a migration operation on the specified load balancing instance to the target cluster, thereby migrating the sessions of the specified load balancing instance already existing in the source cluster to the target cluster.

[0068] S104. Modify the destination address of the specified load balancer instance to the destination address of the target cluster.

[0069] Specifically, by modifying the destination address of the specified load balancer instance to the destination address of the target cluster, the real-time online traffic of the specified load balancer instance is migrated to the target cluster in real time. This achieves the migration of the load balancer instance to the target cluster. The cross-cluster migration method for load balancer instances in this embodiment can accurately and effectively generate configuration instruction messages for configuring the specified load balancer instance and migration instruction messages for migrating the specified load balancer instance. By sending configuration instruction messages to the target cluster and migration instruction messages to the source cluster where the specified load balancer instance is deployed, the target cluster can be instructed to configure the specified load balancer instance in a timely manner, and the source cluster can be instructed to migrate the specified load balancer instance in a timely manner. This effectively migrates sessions already connected to the specified load balancer instance in the source cluster to the target cluster. Finally, by modifying the destination address of the specified load balancer instance to the destination address of the target cluster, the real-time online traffic of the specified load balancer instance can be migrated to the target cluster. The migration method described in this embodiment is applicable during business operation without interrupting the business or affecting the user experience of the client. Moreover, it can not only migrate the real-time traffic of a specified load balancing instance to the target cluster, but also migrate the sessions of connections already established by the specified load balancing instance in the source cluster to the target cluster, achieving lossless migration of load balancing instances and effectively improving the efficiency of cross-cluster migration of load balancing instances.

[0070] Figure 2 This is a schematic diagram based on the second embodiment of this disclosure; the cross-cluster migration method for load balancing instances in this embodiment, as described above... Figure 1 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 2 As shown, the cross-cluster migration method for the load balancing instance in this embodiment may specifically include the following steps:

[0071] S201. Obtain the identifier of the specified load balancer instance to be migrated, the identifier of the target cluster to which it is to be migrated, and the migration method; the migration method includes hot migration;

[0072] For example, in this embodiment, the identifier of the specified load balancer instance to be migrated, the identifier of the target cluster to be migrated to, and the migration method are obtained by the staff based on the information to be migrated.

[0073] S202. Obtain the first environment parameters of the source cluster where the specified load balancer instance is deployed;

[0074] Specifically, the load balancer controller can monitor the operation of each load balancer instance within its service range and obtain all attribute information of the cluster in which the load balancer instance is deployed. Therefore, based on the identifier of a specified load balancer instance, the identifier of the source cluster in which the specified load balancer instance is deployed can be obtained. Then, based on the identifier of the source cluster, the corresponding first environment parameters of the source cluster can be obtained from all attribute information of the source cluster. For example, the first environment parameters in this embodiment may include the capacity of the data center, location information, machine type information, and the software version on the servers in the source cluster.

[0075] S203. Obtain the second environment parameters of the target cluster;

[0076] Specifically, the load balancer can obtain the second environmental parameters of the target cluster from all the attribute information of the target cluster based on the identifier of the target cluster. These second environmental parameters are the same as the first environmental parameters of the source cluster. The second environmental parameters of the target cluster may also include the capacity, location information, and model information of the data center, as well as the software version on the servers in the target cluster.

[0077] S204. Based on the first environment parameters and the second environment parameters, detect and determine whether the target cluster supports the migration of the specified load balancer instance;

[0078] Specifically, based on the first environment parameter and the second environment parameter, it can be detected whether the second environment parameter is compatible with the first environment parameter. If they are compatible, it is determined that the target cluster can support the migration of the specified load balancing instance; otherwise, if the second environment parameter is not compatible with the first environment parameter, it is determined that the target cluster cannot support the migration of the specified load balancing instance.

[0079] In this embodiment, by detecting the above-mentioned environmental parameters, it can be determined that the target cluster can support the migration of the specified load balancing instance, which can effectively improve the accuracy of the migration of the specified load balancing instance.

[0080] S205. Based on the identifier of the specified load balancer instance, obtain the data flow pattern of the specified load balancer instance;

[0081] S206. Detect and determine whether the data flow pattern of the specified load balancer instance supports hot migration;

[0082] For example, in this embodiment, the data flow mode of the specified load balancer instance may include Source Network Address Translation (SNAT) mode, Destination Network Address Translation (DNAT) mode, or Full Network Address Translation (FULLNAT) mode. FULLNAT mode supports hot migration, while SNAT and DNAT modes do not. This embodiment uses FULLNAT mode as an example to specify the data flow mode of the load balancer instance.

[0083] Steps S205-S206 can detect and determine whether the data flow pattern of a specified load balancer instance supports hot migration, which can effectively improve the accuracy of migration of a specified load balancer instance.

[0084] Optionally, steps S205-S206 and steps S202-S204 may not have a sequential relationship and can be executed synchronously. Steps S205-S206 may also be executed before steps S202-S204.

[0085] S207. Based on the identifier of the specified load balancer instance, obtain the first set of addresses of the source cluster where the specified load balancer instance is deployed;

[0086] Specifically, the first set of addresses may include the addresses of all servers in the source cluster.

[0087] S208. Obtain the deployment parameters for deploying the specified load balancer instance in the source cluster; the deployment parameters include at least one of bandwidth, concurrent connections, and scheduling algorithm;

[0088] S209. Generate a configuration instruction message carrying the identifier of the specified load balancer instance, the deployment parameters of the specified load balancer instance, and the first address set of the source cluster.

[0089] Steps S207-S209 in this embodiment are specific implementations of generating a configuration instruction message for a specified load balancing instance. This method enables the accurate and effective generation of configuration instruction messages.

[0090] S210. Based on the identifier of the target cluster, send a configuration instruction message to the target cluster to instruct the specified load balancing instance to be configured in the target cluster.

[0091] Correspondingly, after receiving the configuration instruction message, the target cluster can deploy the specified load balancing instance in the target cluster according to the deployment parameters of the specified load balancing instance in the configuration instruction message.

[0092] S211. Based on the identifier of the target cluster, obtain the second set of addresses of the target cluster;

[0093] Specifically, the second set of addresses may include the addresses of all servers in the target cluster.

[0094] S212. Generate a migration instruction message carrying the identifier of the specified load balancer instance and a second set of addresses of the target cluster;

[0095] Steps S211-S212 in this embodiment are specific implementation methods for generating migration indication messages. Through this method, migration indication messages can be generated accurately and effectively.

[0096] S213. Based on the identifier of the specified load balancer instance, send a migration instruction message to the source cluster where the specified load balancer instance is deployed, instructing the source cluster to migrate the sessions that have been connected to the specified load balancer instance.

[0097] Correspondingly, after receiving the migration instruction message, the source cluster can migrate the sessions that have been connected to the specified load balancing instance in the source cluster to the target cluster according to the identifier of the specified load balancing instance in the migration instruction message.

[0098] For example, in a specific implementation, the source cluster can first obtain the session information table of the specified load balancer instance, which includes the identifier of the specified load balancer instance and the corresponding session identifier. Specifically, the source cluster can obtain the session identifier of the specified load balancer instance by scanning the memory of the servers in the current source cluster; and then generate the session information table based on the identifier of the specified load balancer instance and the session identifier.

[0099] Furthermore, the source cluster can send the session information table of a specified load balancing instance to the target cluster. The target cluster can then process the session messages of the migrated specified load balancing instance based on this table, thereby migrating the established connection sessions of the specified load balancing instance from the source cluster to the target cluster. Specifically, sending the session information table of the specified load balancing instance to the target cluster can be achieved by sending the table to the addresses of each server in the second address set of the target cluster.

[0100] S214. Modify the destination address of the specified load balancer instance to the destination address of the target cluster.

[0101] Up to step S213 above, the established connection session of the specified load balancing instance in the source cluster can be migrated to the target cluster. Further, by step S214, the real-time traffic of the specified load balancing instance can be migrated to the target cluster. Thus, the specified load balancing instance in the source cluster is migrated to the target cluster through lossless hot migration.

[0102] S215. Detect whether the traffic of a specified load balancer instance in the source cluster remains zero for a preset time period.

[0103] The preset time length in this embodiment can be set based on experience or needs, such as 10 minutes, 15 minutes or 20 minutes, etc., and is not limited here.

[0104] S216. In response to the specified load balancing instance in the source cluster having zero traffic for a preset time period, delete the specified load balancing instance configured in the source cluster.

[0105] In this embodiment, after sending a migration instruction message to the source cluster where the specified load balancing instance is deployed in step S213, instructing the source cluster to migrate the sessions already connected to the specified load balancing instance, the specified load balancing instance configured in the source cluster is not directly deleted. This is because the migration of sessions for the specified load balancing instance cannot be completed in one go; some sessions may still need to be processed, requiring a continued migration period. For example, after step S213, the source cluster can periodically check whether there are still sessions that need to be migrated. If so, it can regenerate the session information table corresponding to the sessions that have not yet been migrated and send it to the target cluster.

[0106] If the traffic of a specified load balancer instance in the source cluster remains zero for a preset period of time, it can be assumed that the traffic of the specified load balancer instance in the source cluster remains zero. At this point, it can be assumed that all sessions of the specified load balancer instance in the source cluster have been migrated to the target cluster, and the specified load balancer instance deployed in the source cluster can be deleted.

[0107] The cross-cluster migration method for load balancing instances in this embodiment, by employing the aforementioned hot migration approach, can not only effectively migrate sessions already connected to a specified load balancing instance in the source cluster to the target cluster, but also migrate real-time online traffic of the specified load balancing instance to the target cluster, effectively improving the accuracy and efficiency of the migration. This migration method is applicable during business operations without interrupting services or affecting the client's user experience. Furthermore, it can migrate not only real-time traffic of the specified load balancing instance to the target cluster, but also sessions already connected to the specified load balancing instance in the source cluster, achieving lossless migration of load balancing instances and effectively improving the efficiency of cross-cluster migration of load balancing instances.

[0108] Furthermore, in this embodiment, when the traffic of a specified load balancing instance in the source cluster remains zero for a preset time period, the specified load balancing instance configured in the source cluster can be deleted, which can effectively improve the accuracy of deleting the specified load balancing instance in the source cluster.

[0109] Figure 3 This is a schematic diagram based on the third embodiment of this disclosure; the cross-cluster migration method for load balancing instances in this embodiment is applied to the target cluster to which a specified load balancing instance is to be migrated, and may specifically include the following steps:

[0110] S301. Receive a configuration instruction message sent by the load balancer controller. The configuration instruction message carries the identifier of the specified load balancer instance and the deployment parameters of the specified load balancer instance.

[0111] For example, refer to the above Figure 2 As described in the illustrated embodiment, the deployment parameters of the specified load balancing instance in this embodiment may include at least one of bandwidth, concurrent connections, and scheduling algorithm.

[0112] S302. Deploy the specified load balancer instance locally on the target cluster based on the identifier and deployment parameters of the specified load balancer instance.

[0113] Deploying a specified load balancer instance locally on the target cluster provides an effective basis for implementing the specified load balancer instance on the target cluster.

[0114] S303. Receive the session information table of the specified load balancer instance sent by the source cluster that deployed the specified load balancer instance. The session information table includes the identifier of the specified load balancer instance and the corresponding session identifier.

[0115] S304. Based on the session information table, process the session messages of the specified load balancer instance being migrated.

[0116] In this embodiment, the session identifier is the identifier of the established session processed by the specified load balancing instance in the source cluster. (Refer to the above...) Figure 2 As described in the illustrated embodiment, the session information table sent from the source cluster to the target cluster indicates that the sessions that have already established connections with the specified load balancing instance in the source cluster will be migrated to the target cluster, and the target cluster will continue to process the sessions corresponding to the session identifiers in the session information table.

[0117] The cross-cluster migration method for load balancing instances in this embodiment is applied during the business operation of the load balancing instance without interrupting the business. It is a hot migration method and will not affect the user experience of the client.

[0118] The cross-cluster migration method for load balancing instances in this embodiment deploys a specified load balancing instance locally on the target cluster and receives the session information table of the specified load balancing instance sent by the source cluster where the specified load balancing instance is deployed. Then, the target cluster continues to process the session messages of the specified load balancing instance to be migrated based on the session information table. This method can effectively migrate sessions that have already been established in the source cluster, thereby effectively improving the accuracy and efficiency of cross-cluster migration of load balancing instances.

[0119] Figure 4 This is a schematic diagram based on the fourth embodiment of this disclosure; the cross-cluster migration method for load balancing instances in this embodiment, as described above... Figure 3 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 4 As shown, the cross-cluster migration method for load balancing instances in this embodiment may specifically include the following steps:

[0120] S401. Receive a configuration instruction message sent by the load balancer controller. The configuration instruction message carries the identifier of the specified load balancer instance and the deployment parameters of the specified load balancer instance.

[0121] S402. Deploy the specified load balancer instance locally on the target cluster based on the identifier and deployment parameters of the specified load balancer instance.

[0122] S403. Receive the session information table of the specified load balancer instance sent by the source cluster that deployed the specified load balancer instance. The session information table includes the identifier of the specified load balancer instance and the corresponding session identifier.

[0123] Steps S401-S403 are the same as those described above. Figure 3 Steps S301-S303 of the illustrated embodiment are the same, and for details, please refer to the relevant descriptions of the above embodiments, which will not be repeated here.

[0124] S404, Receive a target session message carrying a target session identifier;

[0125] Specifically, after the target cluster receives the session information table, and after the load balancer has modified the destination address of the specified load balancer instance to the destination address of the target cluster, the session message received by the target cluster may be a session that the target cluster was originally processing, a session that is being established for the first time, or a session that has been migrated from the source cluster.

[0126] S405. Check if the target session identifier is included in the session information table; if it is included, proceed to step S406; if it is not included, proceed to step S408.

[0127] S406. Mark the learning identifier in the target session message; proceed to step S407;

[0128] S407. Send target session information carrying a learning identifier to the backend server so that the backend server can learn the source address of the target session information based on the learning identifier and change it to the source address according to the learning result; the source address is the address in the second address set of the current destination cluster; End.

[0129] In this embodiment, when the target session identifier belongs to the session identifier in the session information, it can be determined that the target session message is a session migrated from the source cluster. Since the backend server in the source cluster has modified the corresponding source address in the session to the address in the first address set of the source cluster during the processing of the session with the target session identifier, in order to ensure the accuracy of session interaction after the session migration, in this embodiment, if the session information table includes the target session identifier, a learning identifier can be marked in the target session message; then, the target session information carrying the learning identifier is sent to the backend server, so that the backend server can learn the source address of the sending target session information based on the learning identifier, and change it to the source address according to the learning result; in this embodiment, the source address corresponding to the backend server on the target cluster side is the address in the second address set of the current destination cluster.

[0130] In this embodiment, the implementation of steps S406-S407 can be applied for a period of time after session migration. If the traffic has stabilized after migration, the implementation of steps S406-S407 can be stopped. For example, when the load balancer deletes the specified load balancer instance configured in the source cluster, or when the deletion of the specified load balancer instance configured in the source cluster is detected, a notification message indicating that the specified load balancer instance in the source cluster has been deleted is sent to the target cluster. At this time, the target cluster determines that the specified load balancer instance in the source cluster has been completely migrated, and the learning steps of steps S406-S407 no longer need to be executed.

[0131] S408. Detect whether the target session message is a non-connection-established session message. If not, proceed to step S409; if yes, proceed to step S410.

[0132] S409. Based on the first address set of the source cluster, broadcast the target session message to the source cluster so that the source cluster can continue to process the target session message; End.

[0133] If the target session identifier is not included in the session information table, but the target session message is not a connection establishment session message, it can be assumed that the source cluster has not yet migrated the session with that target session identifier. To ensure the accuracy of session processing, in this embodiment, the target cluster can broadcast the target session message to the source cluster, allowing the source cluster to continue processing the target session message. This effectively avoids session loss. Subsequently, the source cluster can continue to update the session information table and migrate any unmigrated session identifiers, ensuring lossless session migration and effectively improving the comprehensiveness, accuracy, and efficiency of load balancing instance migration.

[0134] S410. Continue processing the target session message.

[0135] This indicates that the target session message is a new session establishing a connection. In this case, the target cluster can continue processing it as a normal session. In this embodiment's cross-cluster migration method for load balancing instances, when processing session messages based on the session information table, a learning identifier can be marked in the target session message for the target session identifier included in the session information table. The target session information carrying the learning identifier is then sent to the backend server. This allows the backend server to learn the source address that sent the target session information based on the learning identifier, and change the source address to an address in the second address set of the target cluster according to the learning result. This effectively ensures the accuracy of the session path and improves the accuracy of session migration for a specified load balancing instance.

[0136] Furthermore, in this embodiment, if the target session identifier is not included in the session information table and the target session message is a non-connection-established session message, the target session message can be broadcast to the source cluster so that the source cluster can continue to process the target session message and migrate the session later. This can effectively avoid session loss, achieve lossless migration of load balancing instances across clusters, and effectively improve the accuracy of cross-cluster session migration of load balancing instances.

[0137] Figure 5 This is a schematic diagram according to the fifth embodiment of this disclosure; the cross-cluster migration method for load balancing instances in this embodiment is applied to the source cluster side where the load balancing instance is deployed, and may specifically include the following steps:

[0138] S501. Receive a migration instruction message sent by the load balancer controller. The migration instruction message includes the identifier of the specified load balancer instance to be migrated and the second set of addresses of the target cluster to which it is to be migrated.

[0139] The migration instruction message in this embodiment is as described above. Figure 1 or Figure 2 For details regarding the migration instruction message in the illustrated embodiment, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0140] S502. Obtain the session information table of the specified load balancer instance. The session information table includes the identifier of the specified load balancer instance and the corresponding session identifier.

[0141] In this embodiment, the session identifier is the identifier of the established connection session of the specified load balancer instance on the source cluster side.

[0142] S503. Send the session information table of the specified load balancing instance to the target cluster so that the target cluster can process the session messages of the migrated specified load balancing instance based on the session information table.

[0143] Specifically, based on the migration instruction message in step S501, the source cluster learns that the load balancing instance needs to be migrated to the target cluster. Then, the source cluster locally obtains the session information table of the specified load balancing instance, which carries the identifier of the specified load balancing instance to be migrated and the session identifier to be migrated. After sending this session information table to the target cluster, the target cluster can determine the session identifier of the migrated specified load balancing instance and continue processing the session corresponding to that session identifier, thus maintaining the session of the migrated specified load balancing instance.

[0144] The cross-cluster migration method for load balancing instances in this embodiment obtains the session information table of the specified load balancing instance after receiving the migration instruction message and sends the session information table of the specified load balancing instance to the target cluster. This method can migrate the established sessions of the specified load balancing instance to the target cluster, enabling accurate, effective, and lossless migration of the established sessions of the load balancing instance and effectively improving the cross-cluster migration efficiency of load balancing instances.

[0145] Figure 6 This is a schematic diagram based on the sixth embodiment of this disclosure; the cross-cluster migration method for load balancing instances in this embodiment, as described above... Figure 5 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 6 As shown, the cross-cluster migration method for load balancing instances in this embodiment may specifically include the following steps:

[0146] S601. Receive a migration instruction message sent by the load balancer controller. The migration instruction message includes the identifier of the specified load balancer instance to be migrated and the second set of addresses of the target cluster to which it is to be migrated.

[0147] S602. Scan the memory of the servers in the current source cluster to obtain the session identifier of the specified load balancer instance;

[0148] S603. Generate a session information table based on the identifier of the specified load balancer instance and the session identifier;

[0149] Specifically, by scanning the memory of servers in the current source cluster, the session identifier of the ongoing session of the specified load balancer instance can be obtained, and a session message table can be generated together with the identifier of the specified load balancer instance, which can effectively improve the accuracy of the generated session information table.

[0150] S604. Send the session information table of the specified load balancing instance to the target cluster so that the target cluster can process the session messages of the migrated specified load balancing instance based on the session information table.

[0151] S605. Periodically check if there are any unmigrated sessions for the specified load balancer instance; if they exist, proceed to step S606; if they do not exist, return to continue checking.

[0152] Specifically, periodically checking for the existence of unmigrated sessions for a specified load balancer instance can include: periodically scanning the memory of servers in the current source cluster to obtain the session identifier of the specified load balancer instance; and based on the migrated session information table, checking whether the session identifier of the specified load balancer instance obtained in this scan is already in the migrated session information table. If not, it is determined that the session identifier of the specified load balancer instance obtained in this scan is an unmigrated session; if it is, it is determined that there is no unmigrated session for the specified load balancer instance.

[0153] The periodic detection period in this embodiment can be set based on experience or needs. For example, the period can be once every 30 minutes, once every hour, or other durations, which are not limited here.

[0154] S606. Generate update session information for the specified load balancer instance. The update session information includes the identifier of the specified load balancer instance and the update session identifier. Execute step S607.

[0155] Updating the session identifier refers to specifying the session identifier of the load balancer instance that has not yet been migrated to the target cluster.

[0156] S607. Send update session information to the target cluster so that the target cluster can process the session message corresponding to the update session identifier of the specified load balancer instance based on the update session information.

[0157] S608. Check whether the traffic of the specified load balancer instance in the current source cluster remains zero for a preset time period; if it is zero, proceed to step S609; otherwise, return to step S608 to continue the detection.

[0158] The preset time length in this embodiment can be set based on experience or needs, such as 10 minutes, 15 minutes or 20 minutes, etc., and is not limited here.

[0159] S609. Delete the specified load balancer instance configured in the current source cluster.

[0160] Specifically, when the traffic of a specified load balancing instance in the current source cluster is non-zero, steps S605-S607 are still required to continue migrating the unmigrated sessions. By setting a reasonable preset time length, and by detecting that the traffic of the specified load balancing instance in the current source cluster remains zero for the preset time length, it can be considered that all sessions of the specified load balancing instance have been migrated. At this point, the specified load balancing instance configured in the current source cluster can be deleted. In this embodiment, instead of sending the session information table of the specified load balancing instance to the target cluster and then immediately deleting it, the loss of sessions of the specified load balancing instance can be effectively avoided, the comprehensiveness and accuracy of the session migration of the specified load balancing instance can be effectively improved, and thus the efficiency of the session migration of the specified load balancing instance can be effectively improved.

[0161] Optionally, in this embodiment, the specified load balancing instance configured in the source cluster is deleted from the source cluster. In practical applications, the load balancing controller can also detect whether the traffic of the specified load balancing instance in the current source cluster is continuously zero within a preset time period. If it is zero, the load balancing controller deletes the specified load balancing instance configured in the source cluster.

[0162] With the above Figure 4 The difference between the embodiments shown is that, Figure 4 The illustrated embodiment describes the technical solution of this disclosure on the target cluster side, while this embodiment describes the technical solution of this disclosure on the source cluster side.

[0163] The cross-cluster migration method for load balancing instances in this embodiment can periodically detect and generate updated session information for a specified load balancing instance and send the updated session information to the target cluster. This allows for the continued migration of unmigrated sessions of the load balancing instance, preventing session loss and effectively improving the accuracy of session migration, thus achieving lossless migration. Furthermore, in this embodiment, the specified load balancing instance in the current source cluster can only be deleted when the traffic of the specified load balancing instance in the current source cluster remains zero for a preset time period. This effectively improves the comprehensiveness and accuracy of session migration for the specified load balancing instance, thereby significantly increasing the efficiency of cross-cluster session migration for the specified load balancing instance.

[0164] Figure 7 This is a schematic diagram according to the seventh embodiment of the present disclosure; this embodiment provides a load balancing controller 700, including:

[0165] The generation module 701 is used to generate a configuration instruction message for configuring a specified load balancer instance to be migrated and a migration instruction message for migrating the specified load balancer instance to the target cluster, respectively.

[0166] The sending module 702 is used to send the configuration indication message to the target cluster based on the identifier of the target cluster, so as to indicate that the specified load balancing instance is configured in the target cluster;

[0167] The sending module 702 is further configured to send the migration indication message to the source cluster where the specified load balancing instance is deployed, based on the identifier of the specified load balancing instance, to instruct the source cluster to migrate the sessions that have been connected to the specified load balancing instance.

[0168] The traffic redirection processing module 703 is also used to modify the traffic redirection destination address of the specified load balancing instance to the traffic redirection destination address of the target cluster.

[0169] The load balancer controller 700 in this embodiment achieves the same implementation principle and technical effect of migrating load balancer instances by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0170] Figure 8 This is a schematic diagram according to the eighth embodiment of the present disclosure; the load balancing controller 800 of this embodiment, in the above... Figure 7 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 8 As shown, the load balancing controller 800 in this embodiment includes the above-mentioned... Figure 7The modules with the same name and function shown are: generation module 801, sending module 802, and traffic processing module 803.

[0171] Specifically, in this embodiment, the generation module 801 is used for:

[0172] Based on the identifier of the specified load balancer instance, obtain the first set of addresses of the source cluster in which the specified load balancer instance is deployed;

[0173] Obtain the deployment parameters for deploying the specified load balancer instance in the source cluster; the deployment parameters include at least one of bandwidth, concurrent connections, and scheduling algorithm;

[0174] Generate the configuration indication message carrying the identifier of the specified load balancer instance, the deployment parameters of the specified load balancer instance, and the first address set of the source cluster.

[0175] Further optionally, in one embodiment of this disclosure, the generation module 801 is configured to:

[0176] Based on the identifier of the target cluster, obtain the second set of addresses of the target cluster;

[0177] Generate the migration instruction message carrying the identifier of the specified load balancer instance and a second set of addresses of the target cluster.

[0178] Further optional, such as Figure 8 As shown, in one embodiment of this disclosure, the load balancing controller 800 further includes:

[0179] The acquisition module 804 is used to acquire the first environmental parameters of the source cluster;

[0180] The acquisition module 804 is also used to acquire the second environmental parameters of the target cluster;

[0181] The detection module 805 is further configured to detect and determine, based on the first environment parameters and the second environment parameters, that the target cluster supports the migration of the specified load balancing instance;

[0182] The acquisition module 804 is further configured to acquire the identifier of the specified load balancer instance to be migrated, the identifier of the target cluster to which it is to be migrated, and the migration method; the migration method includes hot migration.

[0183] Further optionally, in one embodiment of this disclosure, the acquisition module 804 is further configured to acquire the data flow pattern of the specified load balancing instance based on the identifier of the specified load balancing instance;

[0184] The detection module 805 is also used to detect and determine whether the data flow pattern of the specified load balancer instance supports hot migration.

[0185] Further optional, such as Figure 8 As shown, in one embodiment of this disclosure, the load balancer controller 800 further includes a deletion module 806;

[0186] The detection module 805 is also used to detect whether the traffic of the specified load balancing instance in the source cluster remains zero for a preset time period.

[0187] The deletion module 806 is used to delete the specified load balancing instance configured in the source cluster in response to the traffic of the specified load balancing instance in the source cluster being zero for a preset time period.

[0188] The load balancer controller 800 in this embodiment achieves the same implementation principle and technical effect of migrating load balancer instances by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0189] Figure 9 This is a schematic diagram according to the ninth embodiment of the present disclosure; this embodiment provides a target cluster 900, including:

[0190] The receiving module 901 is used to receive a configuration instruction message sent by the load balancer controller, wherein the configuration instruction message carries the identifier of the specified load balancer instance and the deployment parameters of the specified load balancer instance.

[0191] Deployment module 902 is used to deploy the specified load balancing instance locally on the target cluster based on the identifier of the specified load balancing instance and the deployment parameters of the specified load balancing instance.

[0192] The receiving module 901 is further configured to receive a session information table of the specified load balancing instance sent by the source cluster that deploys the specified load balancing instance, wherein the session information table includes the identifier of the specified load balancing instance and the corresponding session identifier.

[0193] The session processing module 903 is used to process the session messages of the migrated specified load balancer instance based on the session information table.

[0194] The target cluster 900 in this embodiment achieves the same implementation principle and technical effect of migrating load balancing instances by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0195] Figure 10 This is a schematic diagram according to the tenth embodiment of this disclosure; the target cluster 1000 in this embodiment, in the above... Figure 9Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 10 As shown, the target cluster 1000 in this embodiment includes the above-mentioned... Figure 9 The modules with the same name and function shown are: receiving module 1001, deployment module 1002, and session processing module 1003.

[0196] The session processing module 1003 in this embodiment is used for:

[0197] Receive a target session message carrying the target session identifier;

[0198] The system detects and determines that the target session identifier is included in the session information table;

[0199] A learning identifier is added to the target session message;

[0200] The target session information carrying the learning identifier is sent to the backend server so that the backend server can learn the source address that sent the target session information based on the learning identifier and replace it with the source address according to the learning result; the source address is an address in the second address set of the current destination cluster.

[0201] Further, optionally, in one embodiment of this disclosure, the configuration instruction message may also include a first set of addresses of the source cluster where the load balancing instance resides;

[0202] like Figure 10 As shown, the target cluster 1000 in this embodiment further includes:

[0203] The detection module 1004 is used to detect and determine that the target session identifier is not included in the session information table, and to detect and determine that the target session message is a non-connection-establishing session message.

[0204] The sending module 1005 is used to broadcast the target session message to the source cluster based on the first address set of the source cluster, so that the source cluster can process the target session message.

[0205] The target cluster 1000 in this embodiment achieves the same implementation principle and technical effect of migrating load balancing instances by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0206] Figure 11 This is a schematic diagram according to the eleventh embodiment of the present disclosure; this embodiment provides a source cluster 1100, including:

[0207] The receiving module 1101 is used to receive a migration instruction message sent by the load balancer controller. The migration instruction message includes the identifier of the specified load balancer instance to be migrated and the second set of addresses of the target cluster to which it is to be migrated.

[0208] The acquisition module 1102 is used to acquire the session information table of the specified load balancing instance, wherein the session information table includes the identifier of the specified load balancing instance and the corresponding session identifier;

[0209] The sending module 1103 is used to send the session information table of the specified load balancing instance to the target cluster, so that the target cluster can process the session messages of the migrated specified load balancing instance based on the session information table.

[0210] The source cluster 1100 in this embodiment achieves the same implementation principle and technical effect of migrating load balancing instances by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0211] Figure 12 This is a schematic diagram according to the twelfth embodiment of this disclosure; the source cluster 1200 of this embodiment, in the above... Figure 11 Based on the technical solutions of the illustrated embodiments, the technical solutions of this disclosure will be described in further detail. For example... Figure 12 As shown, the source cluster 1200 in this embodiment includes the above-mentioned Figure 11 The modules with the same name and function shown are: receiving module 1201, acquiring module 1202, and sending module 1203.

[0212] In this embodiment, the acquisition module 1202 is used for:

[0213] Scan the memory of the servers in the current source cluster to obtain the session identifier of the specified load balancer instance;

[0214] The session information table is generated based on the identifier of the specified load balancer instance and the session identifier.

[0215] Further, optionally, in one embodiment of this disclosure, the source cluster 1200 further includes a detection module 1204;

[0216] The detection module 1204 is used to periodically detect whether there are any unmigrated sessions of the specified load balancer instance;

[0217] The acquisition module 1202 is further configured to, in response to the existence of an unmigrated session of the specified load balancing instance, generate update session information of the specified load balancing instance, wherein the update session information includes the identifier of the specified load balancing instance and the update session identifier; and send the update session information to the target cluster.

[0218] Further, optionally, in one embodiment of this disclosure, the source cluster 1200 also includes a deletion module 1205.

[0219] The detection module 1204 is also used to detect whether the traffic of the specified load balancing instance in the current source cluster remains zero for a preset time period.

[0220] The deletion module 1205 is also used to delete the specified load balancing instance configured in the current source cluster in response to the traffic of the specified load balancing instance in the current source cluster being zero for a preset time period.

[0221] The source cluster 1200 in this embodiment achieves the same implementation principle and technical effect of migrating load balancing instances by using the above-mentioned modules. For details, please refer to the description of the above-mentioned related method embodiments, which will not be repeated here.

[0222] Figure 13 This is a schematic diagram according to the thirteenth embodiment of this disclosure; this embodiment provides a cross-cluster migration system 1300 for load balancing instances, including a load balancing controller 1301, a source cluster 1302 where a specified load balancing instance is deployed, and a target cluster 1303 to which the specified load balancing instance is to be migrated; the load balancing controller 1301 adopts the above... Figure 7 or Figure 8 The load balancer controller shown above, the source cluster adopts the above... Figure 9 or Figure 10 The source cluster is shown, and the target cluster adopts the above... Figure 11 or Figure 12 The target cluster shown can specifically be implemented as described above. Figures 1-6 The method for migrating the load balancing instance across clusters shown can be found in the descriptions of the relevant embodiments above, and will not be repeated here.

[0223] The acquisition, storage, and application of any type of information, such as user personal information, involved in the technical solutions disclosed herein comply with relevant laws and regulations and do not violate public order and good morals.

[0224] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0225] Figure 14A schematic block diagram of an example electronic device 1400 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0226] like Figure 14 As shown, device 1400 includes a computing unit 1401, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1402 or a computer program loaded from storage unit 1408 into random access memory (RAM) 1403. The RAM 1403 may also store various programs and data required for the operation of device 1400. The computing unit 1401, ROM 1402, and RAM 1403 are interconnected via bus 1404. Input / output (I / O) interface 1405 is also connected to bus 1404.

[0227] Multiple components in device 1400 are connected to I / O interface 1405, including: input unit 1406, such as a keyboard, mouse, etc.; output unit 1407, such as various types of displays, speakers, etc.; storage unit 1408, such as a disk, optical disk, etc.; and communication unit 1409, such as a network card, modem, wireless transceiver, etc. Communication unit 1409 allows device 1400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0228] The computing unit 1401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1401 performs the various methods and processes described above, such as the methods of this disclosure. For example, in some embodiments, the methods of this disclosure can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1408. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1400 via ROM 1402 and / or communication unit 1409. When the computer program is loaded into RAM 1403 and executed by the computing unit 1401, one or more steps of the methods of this disclosure described above can be performed. Alternatively, in other embodiments, the computing unit 1401 may be configured to perform the methods described above in this disclosure by any other suitable means (e.g., by means of firmware).

[0229] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0230] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0231] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0232] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0233] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0234] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0235] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0236] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for migrating load balancing instances across clusters, comprising: Generate a configuration instruction message for configuring the specified load balancer instance to be migrated and a migration instruction message for migrating the specified load balancer instance to the target cluster, respectively. Based on the identifier of the target cluster, the configuration instruction message is sent to the target cluster to instruct the specified load balancing instance to be configured in the target cluster; Based on the identifier of the specified load balancer instance, the migration instruction message is sent to the source cluster where the specified load balancer instance is deployed, instructing the source cluster to migrate the sessions that have been connected to the specified load balancer instance. Modify the destination address of the specified load balancer instance to the destination address of the target cluster.

2. The method according to claim 1, wherein, Generate a configuration instruction message for the specified load balancer instance to be migrated, including: Based on the identifier of the specified load balancer instance, obtain the first set of addresses of the source cluster in which the specified load balancer instance is deployed; Obtain the deployment parameters for deploying the specified load balancer instance in the source cluster; the deployment parameters include at least one of bandwidth, concurrent connections, and scheduling algorithm; Generate the configuration indication message carrying the identifier of the specified load balancer instance, the deployment parameters of the specified load balancer instance, and the first address set of the source cluster.

3. The method according to claim 1, wherein, Generate a migration instruction message to migrate the specified load balancer instance to the target cluster, including: Based on the identifier of the target cluster, obtain the second set of addresses of the target cluster; Generate the migration instruction message carrying the identifier of the specified load balancer instance and a second set of addresses of the target cluster.

4. The method according to claim 1, wherein, Before generating the configuration instruction message for the specified load balancer instance to be migrated and the migration instruction message for migrating the specified load balancer instance to the target cluster, the method further includes: Obtain the first environment parameters of the source cluster; Obtain the second environmental parameters of the target cluster; Based on the first environment parameters and the second environment parameters, the target cluster is detected and determined to support the migration of the specified load balancer instance; The method further includes: Obtain the identifier of the specified load balancer instance to be migrated, the identifier of the target cluster to which it is to be migrated, and the migration method; the migration method includes hot migration.

5. The method according to claim 1, wherein, Before generating the configuration instruction message for the specified load balancer instance to be migrated and the migration instruction message for migrating the specified load balancer instance to the target cluster, the method further includes: Based on the identifier of the specified load balancer instance, obtain the data flow pattern of the specified load balancer instance; The data flow pattern of the specified load balancer instance is detected and determined to support hot migration.

6. The method according to any one of claims 1-5, wherein, After modifying the destination address of the specified load balancer instance to the destination address of the target cluster, the method further includes: Detect whether the traffic of the specified load balancer instance in the source cluster remains zero for a preset time period; In response to the fact that the traffic of the specified load balancing instance in the source cluster remains at zero for a preset time period, the specified load balancing instance configured in the source cluster is deleted.

7. A method for migrating load balancing instances across clusters, comprising: Receive a configuration instruction message sent by the load balancer controller, the configuration instruction message carrying the identifier of the specified load balancer instance and the deployment parameters of the specified load balancer instance; Based on the identifier of the specified load balancing instance and the deployment parameters of the specified load balancing instance, deploy the specified load balancing instance locally on the target cluster; Receive the session information table of the specified load balancer instance sent by the source cluster that deploys the specified load balancer instance. The session information table includes the identifier of the specified load balancer instance and the corresponding session identifier. Based on the session information table, the session messages of the migrated specified load balancer instance are processed.

8. The method according to claim 7, wherein, The step of processing the session messages of the migrated specified load balancer instance based on the session information table includes: Receive a target session message carrying the target session identifier; The system detects and determines that the target session identifier is included in the session information table; A learning identifier is added to the target session message; The target session information carrying the learning identifier is sent to the backend server so that the backend server can learn the source address that sent the target session information based on the learning identifier and replace it with the source address according to the learning result; the source address is an address in the second address set of the current destination cluster.

9. The method according to claim 8, wherein, The configuration instruction message also includes the first set of addresses of the source cluster where the load balancing instance is located; After processing the session messages of the migrated specified load balancer instance based on the session information table, the method further includes: When it is detected and determined that the target session identifier is not included in the session information table, and when it is detected and determined that the target session message is a non-connection-established session message; Based on the first address set of the source cluster, the target session message is broadcast to the source cluster for the source cluster to process the target session message.

10. A method for migrating a load balancer instance across clusters, comprising: Receive a migration instruction message sent by the load balancer controller, the migration instruction message including the identifier of the specified load balancer instance to be migrated and the second set of addresses of the target cluster to which it is to be migrated; Obtain the session information table of the specified load balancer instance, wherein the session information table includes the identifier of the specified load balancer instance and the corresponding session identifier; The session information table of the specified load balancing instance is sent to the target cluster so that the target cluster can process the session messages of the migrated specified load balancing instance based on the session information table.

11. The method according to claim 10, wherein, Obtaining the session information table of the specified load balancer instance includes: Scan the memory of the servers in the current source cluster to obtain the session identifier of the specified load balancer instance; The session information table is generated based on the identifier of the specified load balancer instance and the session identifier.

12. The method according to claim 10 or 11, wherein, The method further includes: Periodically check whether there are any unmigrated sessions for the specified load balancer instance; In response to the existence of an unmigrated session for the specified load balancer instance, update session information for the specified load balancer instance is generated, the update session information including the identifier of the specified load balancer instance and the update session identifier; the update session information is then sent to the target cluster.

13. The method according to claim 10 or 11, wherein, The method further includes: Detect whether the traffic of the specified load balancer instance in the current source cluster remains zero for a preset time period; In response to the fact that the traffic of the specified load balancer instance in the current source cluster remains at zero for a preset time period, the specified load balancer instance configured in the current source cluster is deleted.

14. A load balancing controller, comprising: The generation module is used to generate a configuration instruction message for configuring a specified load balancer instance to be migrated and a migration instruction message for migrating the specified load balancer instance to the target cluster, respectively. The sending module is configured to send the configuration indication message to the target cluster based on the identifier of the target cluster, so as to indicate that the specified load balancing instance is configured in the target cluster; The sending module is further configured to send the migration indication message to the source cluster where the specified load balancing instance is deployed, based on the identifier of the specified load balancing instance, to instruct the source cluster to migrate the sessions that have been connected to the specified load balancing instance. The traffic redirection module is also used to modify the traffic redirection destination address of the specified load balancer instance to the traffic redirection destination address of the target cluster.

15. A target cluster, comprising: The receiving module is used to receive a configuration instruction message sent by the load balancer controller, wherein the configuration instruction message carries the identifier of the specified load balancer instance and the deployment parameters of the specified load balancer instance; The deployment module is used to deploy the specified load balancing instance locally on the target cluster based on the identifier of the specified load balancing instance and the deployment parameters of the specified load balancing instance. The receiving module is further configured to receive a session information table of the specified load balancing instance sent by the source cluster that deploys the specified load balancing instance, wherein the session information table includes the identifier of the specified load balancing instance and the corresponding session identifier. The session processing module is used to process the session messages of the migrated specified load balancer instance based on the session information table.

16. A source cluster, comprising: The receiving module is used to receive a migration instruction message sent by the load balancer controller. The migration instruction message includes the identifier of the specified load balancer instance to be migrated and the second set of addresses of the target cluster to which it is to be migrated. The acquisition module is used to acquire the session information table of the specified load balancing instance, wherein the session information table includes the identifier of the specified load balancing instance and the corresponding session identifier; The sending module is used to send the session information table of the specified load balancing instance to the target cluster, so that the target cluster can process the session messages of the migrated specified load balancing instance based on the session information table.

17. A cross-cluster migration system for a load balancing instance, comprising a load balancing controller, a source cluster where a specified load balancing instance is deployed, and a target cluster to which the specified load balancing instance is to be migrated; wherein the load balancing controller is the load balancing controller as described in claim 14 above, the source cluster is the source cluster as described in claim 16 above, and the target cluster is the target cluster as described in claim 15 above.

18. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method according to any one of claims 1-13.

19. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-13.

20. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1-13.