Network connection recovery after virtual machine transition in an on-demand network code execution system
Abstract
Systems and methods are described for enabling graceful recovery of network connections in a virtual machine instance that has been migrated or temporarily halted. To prevent the virtual machine instance from attempting to reuse open connections, which might fail due to migration or halting, a host device identifies open connections just prior to halting the virtual machine instance on the host, and transmits to the virtual machine instance termination signals for the open connections. The host device may further transmit termination signals to the other parties to such connections. Each termination signal may be formatted so as to appear to originate from the other party to the connection, causing both parties to synchronize their knowledge of the connection. On reactivation, the virtual machine instance can recovery the connections without errors associated with attempted utilization of broken connections.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A system to facilitate reconnection of stateful network connections after migration of a virtual machine instance, the system comprising:
a first host computing device and a second host computing device;
wherein the first host computing device is configured with computer-executable instructions to:
host the virtual machine instance prior to the migration;
identify a stateful network connection between the virtual machine instance and an external device external to the virtual machine instance;
independent of communications of the external device and virtual machine instance, transmit to the external device a first termination signal indicating termination of the stateful network connection, wherein the first termination signal is formatted to indicate that the first termination signal originates from the virtual machine instance; and
migrate the virtual machine instance to the second host computing device;
wherein the second host computing device is configured with computer-executable instructions to:
host the virtual machine instance subsequent to the migration;
identify the stateful network connection; and
independent of communications of the external device and virtual machine instance, transmit to the virtual machine instance a second termination signal indicating termination of the stateful network connection, wherein the second termination signal is formatted to indicate that second termination signal originates from the external device; and
wherein the virtual machine instance is configured, on receiving the second termination signal, to attempt to reestablish the stateful network connection.
2. The system of claim 1 , wherein the stateful network connection is a network connection utilizing the transport control protocol (TCP).
3. The system of claim 1 , wherein the first host computing device is configured with the computer-executable instructions to identify the stateful network connection based at least in part on state information generated at the first host computing device in response to network data transmitted from the virtual machine instance to the external device.
4. The system of claim 1 , wherein the first host computing device is configured with the computer-executable instructions to format the second termination signal to indicate that it originates from the external device at least partly by including within the second termination signal a network address of the external device.
5. The system of claim 1 , wherein the first host computing device is configured with the computer-executable instructions to format the first termination signal to indicate that it originates from the virtual machine instance at least partly by including within the first termination signal a next sequence number associated with the stateful network connection.
6. A computer-implemented method implemented by one or more host computing devices, the computer-implemented method comprising:
identifying a stateful network connection between a virtual machine instance hosted by the one or more host computing devices and an external device external to the virtual machine instance;
independent of communications of the external device and virtual machine instance, transmitting to the external device a first termination signal indicating termination of the stateful network connection;
temporarily halting execution of the virtual machine instance; and
in response to resuming execution of the virtual machine instance on a host computing device, and independent of communications of the external device and virtual machine instance, transmitting, to the virtual machine instance executing on the host computing device, a second termination signal indicating termination of the stateful network connection;
wherein the virtual machine instance is configured, on receiving the second termination signal, to attempt to reestablish the stateful network connection.
7. The computer-implemented method of claim 6 , wherein the one or more host computing devices comprise a single host computing device, and wherein temporarily halting execution of the virtual machine instance comprises transitioning of the virtual machine instance to secondary memory of the single host computing device.
8. The computer-implemented method of claim 6 , wherein the one or more host computing devices comprise a first host computing device and second host computing device, and wherein temporarily halting execution of the virtual machine instance comprises migrating the virtual machine instance from the first host computing device to the second host computing device.
9. The computer-implemented method of claim 8 , wherein migrating the virtual machine instance from the first host computing device to the second host computing device comprises generating a snapshot of the virtual machine instance at the first host computing device and transmitting the snapshot to the second host computing device.
10. The computer-implemented method of claim 9 , the snapshot of the virtual machine instance represents a difference in state of the virtual machine instance from a prior snapshot of the virtual machine instance maintained at the second host computing device.
11. The computer-implemented method of claim 6 , wherein the first termination signal is formatted to indicate that the first termination signal originates from the virtual machine instance.
12. The computer-implemented method of claim 6 , wherein the first termination signal is formatted to indicate that the first termination signal originates from the virtual machine instance at least partly by inclusion in the first termination signal of a next sequence number for the stateful network connection.
13. The computer-implemented method of claim 12 , transmitting to the external device the first termination signal indicating termination of the stateful network connection occurs subsequent to resuming execution of the virtual machine instance.
14. The computer-implemented method of claim 12 , wherein identifying the stateful network connection comprises identifying a plurality of stateful network connections, and wherein transmitting to the virtual machine instance the second termination signal indicating termination of the stateful network connection comprises transmitting to the virtual machine instance a plurality of second termination signals, each of the second termination signals indicating termination of a stateful network connection of the plurality of stateful network connections.
15. Non-transitory computer-readable media comprising instructions executable by a computing system to:
identify a stateful network connection between a virtual machine instance hosted by the computing system and an external device external to the virtual machine instance;
temporarily halt execution of the virtual machine instance; and
in response to resuming execution of the virtual machine instance on a host computing device, and independent of communications of the external device and virtual machine instance, transmit, to the virtual machine instance executing on the host computing device, a termination signal indicating termination of the stateful network connection;
wherein the virtual machine instance is configured, on receiving the termination signal, to attempt to reestablish the stateful network connection.
16. The non-transitory computer-readable media of claim 15 , wherein the termination signal is formatted to indicate that the termination signal originates from the external device.
17. The non-transitory computer-readable media of claim 15 , wherein the termination signal is formatted to indicate that the termination signal originates from the external device at least partly by including within the termination signal a next sequence number associated with the stateful network connection.
18. The non-transitory computer-readable media of claim 15 further comprising instructions executable by the computing system to transmit to the external device a second termination signal indicating termination of the stateful network connection, wherein the second termination signal is transmitted independent of communications of the external device and virtual machine instance.
19. The non-transitory computer-readable media of claim 18 , wherein the second termination signal is formatted to indicate that the second termination signal originates from the virtual machine instance.
20. The non-transitory computer-readable media of claim 15 , wherein the stateful network connection comprises a plurality of stateful network connections, and wherein the instructions are executable by the computing system to transmit to the virtual machine instance a plurality of second termination signals, each of the second termination signals indicating termination of a stateful network connection of the plurality of stateful network connections.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.