Cloud server hot migration method, virtual switch and software defined network architecture
By judging and resetting the stateful connection during the cloud server's hot migration, the problem of stateful connections that cannot be quickly restored after the cloud server's hot migration is solved, and rapid recovery of application connections and improvement of user experience is achieved.
Patent Information
- Application Number
- CN202010706573.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-21
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2040-07-21
AI Technical Summary
When cloud servers are hotly migrated in a proprietary network, stateful connections may not be restored quickly, resulting in long-term unresponsive applications, affecting user experience.
By determining whether the cloud server has a stateful connection with another cloud server through a load balancer, and in the event of a stateful connection, a reset request message is sent to the cloud server and the load balancer before the hot migration, so that after the cloud server is hotly migrated to a new device, a stateful connection with another cloud server is re-established via the load balancer.
It realizes stateful connection reset during hot migration of cloud servers, ensuring that applications can quickly resume connections, avoiding applications unresponsive for a long time, thereby improving user experience.
Smart Images

Figure CN113973114B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to an internetwork architecture, and more particularly to a hot migration solution for a cloud server. Background Art
[0002] With the rapid development of the Internet, the use of cloud services is becoming more and more widespread.
[0003] Cloud service providers need to operate a massive amount of software and hardware infrastructure. Accordingly, equipment maintenance, resource scheduling, inventory transfer, etc. have become increasingly frequent activities. When performing these operation and maintenance operations, making customers feel nothing and ensuring service continuity is one of the core capabilities of cloud service providers. All of this relies on hot migration technology.
[0004] Live Migration, also known as dynamic migration or real-time migration, generally refers to the preservation / restore of a virtual machine. It usually preserves the entire running state of the virtual machine and can quickly restore it to the original hardware platform or even a different hardware platform. After restoration, the virtual machine still runs smoothly and the user will not notice any difference.
[0005] Generally, the hot migration of cloud servers such as ECS (Elastic Compute Service) requires that the network be able to quickly notify all objects connected to the ECS of the event that the ECS is migrated from one network computer (NC) NC_A to another network computer NC_B, so that the hot migration is imperceptible to users.
[0006] In a classic network, the connectivity of ECS depends on the physical network. Therefore, you only need to notify the virtual machine (VM) in the physical network of the change in the address resolution protocol (ARP). In the specific implementation, when the VM successfully starts on the new NC, it will actively broadcast a free ARP.
[0007] In a private cloud (VPC), such as the software-defined network (SDN) architecture, which is a virtual network (overlay) virtualized on a traditional network, the original ARP broadcast method is no longer feasible.
[0008] VPC is a custom private network created by users based on cloud services. Different private networks are logically isolated at the second layer. Users can create and manage cloud product instances in their own private networks, such as ECS, load balancing, and RDS.
[0009] In VPC, the mapping relationship between ECS and NC is maintained on the network controller. In other words, the virtual switch forwards traffic based on the VM-NC rules or mapping relationship issued by the network controller.
[0010] When there are a large number of ECSs in a VPC, there may be a delay in issuing VM-NC rules or mapping relationships, which cannot meet the real-time requirements of hot migration ("hot").
[0011] In this way, for some more complex scenarios, especially those involving SLB (server load balancing), high-defense and other services that have a strong dependence on state connections, the application may become unresponsive for a long time during hot migration, seriously affecting the user service experience.
[0012] Therefore, there is still a need for an improved cloud server hot migration solution. Summary of the invention
[0013] A technical problem to be solved by the present disclosure is to provide a cloud server hot migration solution, which can avoid the situation where the application is unresponsive for a long time due to the inability to restore the relevant stateful connection during hot migration, thereby further improving the user experience.
[0014] According to a first aspect of the present disclosure, a cloud server hot migration method is provided, comprising: in response to the cloud server hot migrating from a first device to a second device, determining whether there is a stateful connection between the cloud server and another cloud server via a load balancer; and in the case that a stateful connection exists, based on the network address of the first device, sending a reset request message for the stateful connection to the cloud server and the load balancer before the hot migration, so as to re-establish a stateful connection between the cloud server and another cloud server via the load balancer after the cloud server hot migrates to the second device.
[0015] Optionally, the step of determining whether there is a stateful connection on the cloud server may include: analyzing a message transmitted between the cloud server and the load balancer to determine whether the message corresponds to a stateful connection.
[0016] The method may further include: recording the latest sequence number of the message corresponding to each stateful connection; and setting the sequence number in the reset request message based on the latest sequence number,
[0017] Optionally, the cloud server and another cloud server verify the received message based on whether the sequence number is an expected sequence number.
[0018] Optionally, the method is performed on a virtual switch between the cloud server and the load balancer.
[0019] The method may also include: the load balancer searches for information of the stateful connection based on the network address of the first device included in the reset request message to determine another cloud server corresponding to the stateful connection; and the load balancer forwards the reset request message to the other cloud server.
[0020] Optionally, the first device and the second device are network computers or virtual machines.
[0021] Optionally, the method may further include: after the cloud server is hot migrated to the second device, based on a reconnection mechanism, re-establishing a stateful connection with another cloud server via the load balancer.
[0022] Alternatively, the network address may be, for example, an IP address.
[0023] According to a second aspect of the present disclosure, a virtual switch is provided, comprising: a judgment device for judging whether there is a stateful connection between a cloud server and another cloud server via a load balancer in response to hot migration of the cloud server from a first device to a second device; and a reset device for sending a reset request message for the stateful connection to the cloud server and the load balancer before the hot migration based on the network address of the first device when a stateful connection exists, so as to re-establish a stateful connection between the cloud server and another cloud server via the load balancer after the hot migration of the cloud server to the second device.
[0024] The virtual switch may further include: a message analyzing device for analyzing messages transmitted between the cloud server and the load balancer to determine whether the messages correspond to a stateful connection,
[0025] Optionally, the judging device judges whether there is a stateful connection based on the message analysis result.
[0026] The virtual switch may further include: a sequence number recording device for recording the latest sequence number of the message corresponding to each stateful connection; and a sequence number setting device for setting the sequence number in the reset request message based on the latest sequence number.
[0027] Optionally, the cloud server and another cloud server verify the received message based on whether the sequence number is an expected sequence number.
[0028] According to a third aspect of the present disclosure, a software-defined network architecture is provided, including: multiple devices, each of which runs one or more cloud servers; a network controller, which maintains a mapping relationship between the cloud server and the device; a load balancer, which performs a load balancing service for traffic distribution to the cloud server; and a virtual switch, which transmits messages between the load balancer and the device where the cloud server is located, wherein, in response to hot migration of the cloud server from a first device to a second device, the virtual switch determines whether there is a stateful connection between the cloud server and another cloud server via the load balancer; in the case of a stateful connection, the virtual switch sends a reset request message for the stateful connection to the cloud server and the load balancer before the hot migration based on the network address of the first device; and after the cloud server is hot migrated to the second device, a stateful connection is re-established between the cloud server and the other cloud server via the load balancer.
[0029] Optionally, the virtual switch analyzes the message transmitted between the cloud server and the load balancer to determine whether the message corresponds to a stateful connection, thereby determining whether there is a stateful connection on the cloud server.
[0030] Optionally, the virtual switch records the latest sequence number of the message corresponding to each stateful connection, and sets the sequence number in the reset request message based on the latest sequence number. The cloud server and another cloud server verify the received message based on whether the sequence number is the expected sequence number.
[0031] Optionally, the load balancer searches for information of the stateful connection based on the network address of the first device included in the reset request message, so as to determine another cloud server corresponding to the stateful connection, and forwards the reset request message to the other cloud server.
[0032] According to a fourth aspect of the present disclosure, a computing device is provided, comprising: a processor; and a memory on which executable codes are stored, and when the executable codes are executed by the processor, the processor executes the method described in the first aspect above.
[0033] According to a fifth aspect of the present disclosure, a non-temporary machine-readable storage medium is provided, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor executes the method described in the first aspect above.
[0034] Therefore, when a cloud server is hot migrated, the stateful connection involved can be reset, so that based on the application's reconnection mechanism, a corresponding stateful connection can be reestablished between the cloud server and another cloud server via the load balancer. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The above and other objects, features and advantages of the present disclosure will become more apparent through a more detailed description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, wherein like reference numerals generally represent like components in the exemplary embodiments of the present disclosure.
[0036] Figure 1 This is a schematic diagram of the relay solution for hot migration of cloud servers.
[0037] Figure 2 It is a schematic diagram of a hot migration solution involving a cloud server with a stateful connection.
[0038] Figure 3 is a schematic flow chart of a method for hot migration of a stateful connection according to the present disclosure.
[0039] Figure 4 is a schematic block diagram of a virtual switch according to the present disclosure.
[0040] Figure 5 It is a schematic flow chart of the processing performed by the load balancer in response to a reset request message according to the present disclosure.
[0041] Figure 6 A schematic diagram of the structure of a computing device that can be used to implement the above-mentioned hot migration method according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0042] The preferred embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0043] In the following, a cloud server such as ECS is deployed on a network computer NC and migrated between network computers NC as an example for description. It should be understood that a cloud server such as ECS can also be deployed on various appropriate devices and migrated between such devices. Such a device can be a physical device such as a network computer NC, or a virtual device such as a virtual machine. The description of the network computer NC below can also be applied to other devices such as virtual machines.
[0044] Figure 1 This is a schematic diagram of the relay solution for hot migration of cloud servers.
[0045] like Figure 1As shown, ECS A located on network computer NC0 communicates with ECS B located on NC1. The VM-NC mapping relationship recorded on the network controller (i.e., the mapping relationship between the cloud server and the device where it is located) is that ECS B is located in NC1.
[0046] When ECS B hot migrates from NC1 to NC2 and becomes ECSB on NC2, the VM-NC mapping relationship recorded on the network controller is updated to indicate that ECS B is located in NC2.
[0047] As mentioned above, in VPC, since the mapping relationship between ECS and NC is maintained on the network controller, it is not possible to quickly notify other objects of migration events.
[0048] So, if Figure 1 As shown in the figure, before the VM-NC table entry is updated, the traffic from ECS A to ECS B is still forwarded to NC 1, and then NC 1 forwards the traffic to NC 2 through relay forwarding.
[0049] After the VM-NC table entry is updated, ECSA can directly forward the traffic to NC 2.
[0050] Network hot migration requires the following capabilities:
[0051] (1) Lossless migration of network resources and rules.
[0052] (2) Lossless migration of traffic to ensure network connectivity.
[0053] (3) Rapid recovery of sessions.
[0054] The control and management system is responsible for creating network resources and issuing and restoring all rules at the migration destination NC, which can achieve the above capability (1).
[0055] As described above, the above capability (2) can be well implemented through the above relay forwarding method.
[0056] The following describes the implementation of the above capability (3), namely, a fast session recovery solution.
[0057] The above relay solution does not process session resources accordingly during network hot migration. After ECSB migrates from source NC1 to destination NC2, the session table of the virtual switch of ECS B that migrates to destination NC2 is empty. It completely relies on ECS to send data packets to trigger the virtual switch to create a new session to achieve session recovery.
[0058] For some common sessions, it is possible to recover in this way. However, for some other types of sessions, the recovery process is often irreversible.
[0059] For example, for SLB (load balancer)-Client type sessions, after ECS hot migration, it is difficult to simply restore the session in the above manner.
[0060] The load balancer (SLB) distributes traffic to multiple cloud servers. Load balancing can expand the external service capabilities of the application system through traffic distribution and improve the availability of the application system by eliminating single points of failure.
[0061] According to the current SLB implementation mechanism, when SLB receives a session message and matches the session to determine which ECS to forward the session message to, it relies on the outer network address of the message, which is generally an IP address (that is, the network address or IP address of the NC where ECS B is located), and performs hash addressing. Hash addressing is used to determine which session (stateful connection) is between which real server (RS) and which client, thereby determining which ECS on which NC to forward the session message to.
[0062] That is, when ECS B is on NC 1, the session between ECSA as RS and ECS B as client is hashed with the IP address of NC 1.
[0063] However, after ECSB migrated from NC1 to NC2, when ECS B, as the client's virtual machine (VM), requested to access the real server (RS), the outer IP address of the message sent from ECS B to SLB was switched from NC1 to NC2.
[0064] SLB performs hash addressing based on the changed outer IP of the message (the IP address of NC 2) to query the session, and cannot find the original session based on the hash address of the IP address of NC 1. In other words, even if a session is restored at the migration destination NC 2, it will fail when SLB queries the session and cannot find the corresponding session of ECS B, which will cause packet loss. In other words, the session (stateful connection) cannot be effectively restored at the destination NC 2.
[0065] At this point, if the relevant application does not handle it properly, this part of the connection will hang.
[0066] To avoid the scenario where the connection is suspended for a long time, when hot migrating a VM (or cloud server), the virtual switch will determine whether the migrated ECSB has a stateful connection, especially whether it has a stateful connection involving SLB.
[0067] Generally, "stateful" means that two requests from the same initiator have a contextual relationship on the server side, and the relevant information of the request is generally saved, and each request can use the previous request information by default. Stateful connections can be implemented with the help of sessions.
[0068] If there is a stateful connection, according to the hot migration solution of the present disclosure, the virtual switch sends a reset message to both the ECSB and SLB of the source end NC1 based on the source end NC1.
[0069] In this way, as long as the application is set up with a reconnection mechanism, the session can be reestablished and the connection is restored immediately. Since the network is often unreliable, applications are generally designed with an automatic reconnection mechanism.
[0070] In other words, considering that the sessions related to ECS B after migration cannot be effectively restored on the destination NC 2, all unrecoverable sessions are terminated on the source NC 1. Then, through the TCP reconnection mechanism of the application, a new session is established on the destination NC 2 after migration, so that the corresponding stateful connection of the user can be restored in time.
[0071] Figure 2 The hot migration solution of a statefully connected cloud server is schematically shown.
[0072] like Figure 2 As shown, the software defined network (SDN) architecture according to the present disclosure includes multiple network computers NC 0, NC 1, NC 2, etc. Each network computer can run one or more cloud servers, such as ECS A, ECS B, etc.
[0073] The network controller maintains the NC-VM mapping relationship between the cloud server ECS and the network computer NC.
[0074] The load balancer SLB provides a load balancing service for traffic distribution to the cloud server ECS. For example, the cloud server ECS A located on the network computer NC 0 is used as a real server (RS), and the traffic related to multiple tasks is distributed to multiple other ECSs as clients (Client) via SLB, such as the cloud server ECSB located on the network computer NC 1.
[0075] The virtual switch can transmit messages between the load balancer and the network computer where the cloud server is located.
[0076] In the case where ECS B is hot migrated from NC 1 to NC 2, by adding the ability to identify whether the transmitted message involves a stateful connection in the virtual switch and allowing the virtual switch to construct a reset message, the stateful connection involved on ECS B can be reset, so that the cloud server ECS A as the RS and the cloud server ECSB as the client can re-establish the corresponding stateful connection without the connection being suspended and the message being lost because the SLB cannot address and find the session information (related information of the stateful connection) recorded based on the IP address of NC 1 based on the IP address of NC 2 after hot migration.
[0077] Here, for example, in the case where the corresponding application is provided with an (automatic) reconnection mechanism, the cloud server ECS A and the cloud server ECSB may re-establish the corresponding stateful connection based on the (automatic) reconnection mechanism.
[0078] Figure 3 is a schematic flow chart of a method for hot migration of a stateful connection according to the present disclosure. Figure 3 The method shown can be executed on a virtual switch between the cloud server ECS B and the SLB.
[0079] Figure 4 is a schematic block diagram of a virtual switch that can be used to perform the hot migration method disclosed in the present invention. Figure 4 As shown, the virtual switch 400 according to the present disclosure may include a determination device 410 and a reset device 420 .
[0080] In step S310, in response to the hot migration of the cloud server ECS B from the network computer NC 1 to the network computer NC 2, it is determined, for example, by the determination device 410, whether there is a stateful connection between the cloud server ECS B and another cloud server ECS A via the load balancer SLB. In other words, it can be determined whether the traffic via the SLB involves a stateful connection (for example, whether it involves a session).
[0081] like Figure 4 As shown, the virtual switch may further include, for example, a message analyzing device 430 for analyzing messages transmitted between the cloud server ECS B and the SLB to determine whether the messages correspond to a stateful connection.
[0082] In this way, the determination means 410 can determine whether there is a stateful connection on the ECS B to be hot migrated based on the message analysis result. If there is a message corresponding to a stateful connection, or for example involving a session, it is determined that there is a stateful connection.
[0083] If it is determined in step S310 that there is a stateful connection, in step S320, for example, a reset request message for the stateful connection is sent to the cloud server ECS B and SLB before the hot migration based on the IP address of the network computer NC 1 through the reset device 420. The IP address of the network computer NC 1 can be added to the outer layer of the reset request message.
[0084] Here, the network address of the device (network computer or virtual machine) is an IP address for example. It should be understood that the network address can also be an address of other protocols. For example, in the case where the SLB uses the network address of other protocols to perform the aforementioned hash addressing to identify the session, the reset request message can also be sent based on the network address of other protocols. The corresponding network address of the network computer NC 1 can be added to the outer layer of the reset request message.
[0085] In this way, after the cloud server ECS B is hot migrated to the network computer NC 2, ECSB can re-establish a corresponding stateful connection with another cloud server ECS A via the SLB.
[0086] As described above, here, ECS B can, for example, re-establish a corresponding stateful connection with ECS A based on a reconnection mechanism.
[0087] The determination in step S310 and the reset request sending operation in step S320 can be performed after ECS B receives the hot migration instruction and before hot migration is performed. In addition to sending the reset request to SLB, the virtual switch also sends it to ECSB on NC 1.
[0088] Thus, after sending the reset request in step S320, hot migration from NC 1 to NC 2 may be performed on ECS B in step S330.
[0089] If it is determined in step S310 that there is no stateful connection on ECS B, the process may directly proceed to step S330 to perform hot migration of ECS B.
[0090] Alternatively, the judgment of step S310 and the reset request sending operation of step S320 may also be performed during or after the hot migration operation. At this time, the information of ECS B is still stored on NC 1. After NC 1 receives the reset request message sent by the virtual switch, it may relay it to ECS B that has been migrated to NC 2, for example, through the above-mentioned relay forwarding solution.
[0091] In this way, ECS B can reset its stateful connection and start the reconnection mechanism after hot migration to NC 2.
[0092] On the other hand, as described above, the virtual switch also sends a reset request message to the SLB.
[0093] Figure 5 It is a schematic flowchart of the processing performed by the load balancer SLB in response to the reset request message according to the present disclosure.
[0094] In step S510, a reset request message is received from a virtual switch.
[0095] The reset request message is generated based on the IP address of NC 1, and the reset request message includes the IP address of NC 1.
[0096] Thus, in step S520, the SLB may perform hash addressing based on the IP address of NC 1 included in the reset request message to find the information of the stateful connection, so as to determine another cloud server ECS A corresponding to the stateful connection.
[0097] Then, in step S530, the SLB may forward the reset request message to another cloud server ECS A.
[0098] In this way, another cloud server ECSA can also reset the stateful connection with the ECS B that is undergoing hot migration, thereby starting the reconnection mechanism after hot migration to NC 2.
[0099] In addition, in order to prevent attacks, TCP sets a strict verification scheme for reset messages. That is, the sequence number (seq) of the reset message must be consistent with the sequence number expected by the local end, otherwise the reset will not take effect.
[0100] For this reason, Figure 4 As shown, the virtual switch may further include a serial number recording device 440 and a serial number setting device 450 .
[0101] For example, the latest sequence number of the message corresponding to each stateful connection, that is, the latest sequence number of each session, can be recorded by the sequence number recording device 440.
[0102] The sequence number of the message can be updated according to a predetermined rule, for example, by adding 1 each time, that is, each time ECS A or ECS B sends a new message, 1 is added to the original sequence number. In this way, both parties of the stateful connection can verify the received message. In other words, the cloud server ECS B and the other cloud server ECS A verify the received message based on whether the sequence number is the expected sequence number. If the sequence number of the received message does not meet the expected value, for example, the previous latest sequence number plus 1, it can be determined that the message verification has failed.
[0103] The virtual switch can set the sequence number in the reset request message based on the latest sequence number, for example, through the sequence number setting device 450. That is, according to the corresponding rules, based on the previous latest sequence number, for example, adding 1 to the previous latest sequence number, a new sequence number is generated, and the generated sequence number is added to the reset request message. The sequence number generated in this way is exactly the message sequence number expected by the cloud server ECS B and another cloud server ECS A.
[0104] In this way, the reset request message sent by the virtual switch to both ECS B and ECS A contains the appropriate sequence number, and the reset request message can pass the verification of both parties, so it can trigger ECS B and ECS A to reset the stateful connection (or session).
[0105] Thus, according to the present disclosure, the virtual switch has the following three capabilities:
[0106] (1) Ability to identify stateful connection-related messages;
[0107] (2) For each flow (stateful connection), the ability to record the latest sequence number (seq) so that the sequence number of the reset request message can be generated based on the previous latest sequence number;
[0108] (3) The ability to construct a reset request message and send it to both ends of a stateful connection (one end, such as ECS A, needs to go through SLB).
[0109] In this way, when the cloud server ECS B is hot migrated, the stateful connection involved can be reset, so that, for example, based on the application's reconnection mechanism, the corresponding stateful connection can be reestablished between the cloud server ECS B and another cloud server ECS A via the load balancer SLB.
[0110] This can avoid the situation in the prior art where, after the ECS hot migration, the SLB cannot perform hash addressing based on the IP address of NC 2 where the ECS is located after the hot migration to find the stateful connection related information originally recorded based on the hash addressing record of the IP address of NC 1 where the ECS was located before the hot migration, causing the connection to be hung and unable to continue normally, resulting in the application being unresponsive for a long time. This makes it possible to perform ECS hot migration more smoothly without affecting users.
[0111] Figure 6 A schematic diagram of the structure of a computing device that can be used to implement the above-mentioned hot migration method according to an embodiment of the present invention is shown.
[0112] See also Figure 6 , the computing device 600 includes a memory 610 and a processor 620 .
[0113] The processor 620 may be a multi-core processor or may include multiple processors. In some embodiments, the processor 620 may include a general-purpose main processor and one or more special coprocessors, such as a graphics processing unit (GPU), a digital signal processor (DSP), etc. In some embodiments, the processor 620 may be implemented using a customized circuit, such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0114] The memory 610 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 620 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 610 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 610 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (e.g., DVD-ROM, double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. The computer-readable storage medium does not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0115] The memory 610 stores executable codes, and when the executable codes are processed by the processor 620 , the processor 620 can execute the hot migration method mentioned above.
[0116] The thermal migration scheme according to the present invention has been described above in detail with reference to the accompanying drawings.
[0117] In addition, the method according to the present invention may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing the above steps defined in the above method of the present invention.
[0118] Alternatively, the present invention may also be implemented as a non-temporary machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) on which executable code (or computer program, or computer instruction code) is stored. When the executable code (or computer program, or computer instruction code) is executed by a processor of an electronic device (or computing device, server, etc.), the processor executes the various steps of the above-mentioned method according to the present invention.
[0119] Those skilled in the art will further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or a combination of both.
[0120] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system and method according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or code, and the part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0121] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are selected to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A cloud server hot migration method, comprising: In response to a hot migration of a cloud server from a first device to a second device, determining whether there is a stateful connection between the cloud server and another cloud server via a load balancer; as well as In the case where the stateful connection exists, sending a reset request message for the stateful connection to the cloud server and the load balancer before hot migration based on the network address of the first device, so as to re-establish the stateful connection with the other cloud server via the load balancer after the cloud server hot migrates to the second device; The load balancer searches for information of the stateful connection based on the network address of the first device included in the reset request message, so as to determine the other cloud server corresponding to the stateful connection; and The load balancer forwards the reset request message to the other cloud server.
2. The method according to claim 1, wherein: The step of determining whether there is a stateful connection on the cloud server includes: Analyze messages transmitted between the cloud server and the load balancer to determine whether the messages correspond to a stateful connection.
3. The method according to claim 1, further comprising: Record the latest sequence number of the message corresponding to each stateful connection; as well as Based on the latest sequence number, a sequence number is set in the reset request message, wherein the cloud server and the another cloud server verify the received message based on whether the sequence number is an expected sequence number.
4. The method according to any one of claims 1 to 3, wherein: The method is performed on a virtual switch between the cloud server and the load balancer.
5. The method according to any one of claims 1 to 3, wherein: The first device and the second device are network computers or virtual machines.
6. The method according to any one of claims 1 to 3, further comprising: After the cloud server is hot migrated to the second device, the stateful connection is re-established with the other cloud server via the load balancer based on a reconnection mechanism.
7. A virtual switch, comprising: a determining device, configured to determine whether there is a stateful connection between the cloud server and another cloud server via a load balancer in response to hot migration of the cloud server from the first device to the second device; as well as a reset device, configured to send a reset request message for the stateful connection to the cloud server and the load balancer before hot migration based on the network address of the first device when the stateful connection exists, so as to re-establish the stateful connection with the other cloud server via the load balancer after the cloud server hot migrates to the second device; Among them, the load balancer searches for the information of the stateful connection based on the network address of the first device contained in the reset request message, so as to determine the other cloud server corresponding to the stateful connection; and the load balancer forwards the reset request message to the other cloud server.
8. The virtual switch according to claim 7, further comprising: a message analyzing device, configured to analyze a message transmitted between the cloud server and the load balancer to determine whether the message corresponds to a stateful connection, Wherein, the judging device judges whether the stateful connection exists based on the message analysis result.
9. The virtual switch according to claim 7, further comprising: A sequence number recording device, recording the latest sequence number of the message corresponding to each stateful connection; as well as A sequence number setting device sets a sequence number in the reset request message based on the latest sequence number, wherein the cloud server and the other cloud server verify the received message based on whether the sequence number is an expected sequence number.
10. A software defined network architecture, comprising: Multiple devices, each of which runs one or more cloud servers; Network controller, which maintains the mapping relationship between cloud servers and devices; A load balancer, a load balancing service for distributing traffic to the cloud server, searches for information of the stateful connection based on the network address of the first device included in the reset request message, so as to determine another cloud server corresponding to the stateful connection; and forwards the reset request message to the another cloud server; as well as Virtual switches transmit messages between the load balancer and the cloud server. wherein, in response to a hot migration of a cloud server from a first device to a second device, the virtual switch determines whether there is a stateful connection between the cloud server and another cloud server via a load balancer; In the case where the stateful connection exists, the virtual switch sends a reset request message for the stateful connection to the cloud server and the load balancer before hot migration based on the network address of the first device; and After the cloud server is hot migrated to the second device, the stateful connection is re-established with the other cloud server via the load balancer.
11. The software defined network architecture according to claim 10, wherein: The virtual switch analyzes the message transmitted between the cloud server and the load balancer to determine whether the message corresponds to a stateful connection, thereby determining whether there is a stateful connection on the cloud server.
12. The software defined network architecture according to claim 10, wherein: The virtual switch records the latest sequence number of the message corresponding to each stateful connection, and sets the sequence number in the reset request message based on the latest sequence number. The cloud server and the another cloud server verify the received message based on whether the sequence number is an expected sequence number.
13. A computing device comprising: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.
14. A non-transitory machine-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for immediately migrating virtual machine
CN105335234A
Flow sate transfer for live migration of virtual machine
IN201947021577A