Swift restoration of connections and sessions
Systems and methods are provided for swift restoration of a network connection and communication session between computing systems. A network connection between two computing systems may be established. When the network connection is interrupted, one computing system may send a reestablishment connection to the other computing system, and the network connection may be reestablished based on the reestablishment communication without establishing a second network connection.
1 . A system comprising:
a server comprising a first volatile storage and a first computer processor; and
a host device comprising second volatile storage, a persistent storage, and a second computer processor;
wherein the host device is configured to:
establish a network connection with the server, wherein the network connection comprises one of a Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or Scalable Reliable Datagram protocol (SRD) connection;
send, to the server via the network connection, a plurality of input/output communications;
initiate an update to executable software stored in the second volatile storage;
in response to initiating an update to the executable software, store, in the persistent storage, connection metadata associated with the network connection, wherein the connection metadata comprises a connection identifier, a connection key, and a server identifier associated with the server;
send to the server, in response to completion of the update to the executable software, a reestablishment communication comprising at least a portion of the connection metadata, wherein the network connection is reestablished based at least partly on the reestablishment communication and without establishing a second network connection; and
resend, to the server, at least one input/output communication of the plurality of input/output communications based at least partly on a failure to receive an acknowledgement of the at least one input/output communication from the server; and
wherein the server is configured to:
receive, into a queue in the second volatile storage, the plurality of input/output communications from the host device via the network connection established with the host device, wherein the network connection is interrupted subsequent to receiving an input/output communication of the plurality of input/output communications;
receive the reestablishment communication from the host device; and
in response to receiving the reestablishment communication:
reestablish the network connection;
receive, into the queue, the at least one input/output communication resent from the host device; and
initiate a cleanup procedure, wherein the cleanup procedure comprises:
determining whether the queue includes one or more un-processed input/output communications that were received prior to receiving the reestablishment communication; and
based on the queue including one or more un-processed input/output communications received prior to receiving the reestablishment communication, removing the one or more un-processed input/output communications received prior to receiving the reestablishment communication from the queue.
2 . The system of claim 1 , wherein the host device further comprises a network interface card, wherein the persistent storage is physically located on the network interface card, and wherein the executable software comprises a network-based storage client configured to communicate with executable network-based storage server software executing on the server.
3 . The system of claim 1 ,
wherein to establish the network connection with the server, the host device is configured to execute an out-of-band handshake according to one of: Transmission Control Protocol (“TCP”), User Datagram Protocol (“UDP”), or Scalable Reliable Datagram Protocol (“SRD”),
wherein the network connection is reestablished without executing the out-of-band handshake a second time, and
wherein the reestablishment communication is sent during execution of an in-band handshake to reestablishment the network connection.
4 . The system of claim 1 ,
wherein to send the plurality of input/output communications to the server, the host device is configured to use the connection identifier, the connection key, and the server identifier, and
wherein to resend the at least one input/output communication to the server, the host device is configured to use the connection identifier, the connection key, and the server identifier.
5 . A computer-implemented method comprising:
under control of a first computing system comprising persistent storage and one or more computer processors configured to execute specific instructions,
initiating, by an application layer, a network connection with a second computing system, wherein the network connection comprises one of a Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or Scalable Reliable Datagram protocol (SRD) connection;
exchanging, by a transportation layer, a first plurality of data communications with the second computing system via the network connection, wherein the first plurality of data communications comprises a first plurality of input/output requests;
storing, in the persistent storage, connection metadata representing one or more data items to be used in reestablishing communication with the second computing system via the network connection, wherein the connection metadata is accessible by the transportation layer;
determining that a network connection interruption has occurred;
determining that the network connection interruption has been resolved; and
in response to determining that the network connection interruption has been resolved:
sending, by the transportation layer, a reestablishment communication to the second computing system based at least partly on determining that the network connection interruption has been resolved, wherein the reestablishment communication comprises at least a portion of the connection metadata, and wherein the network connection is reestablished based at least partly on the reestablishment communication without establishing a second network connection;
determining that no response was received from the second computing system for one or more input/output requests of the first plurality of input/output requests; and
exchanging, by the transportation layer, a second plurality of data communications with the second computing system via the network connection subsequent to reestablishment of the network connection, wherein the second plurality of data communications comprises the one or more input/output requests for which no response was received.
6 . The computer-implemented method of claim 5 , wherein establishing the network connection with the second computing system comprises executing a handshake according to one of: Transmission Control Protocol (“TCP”), User Datagram Protocol (“UDP”), or Scalable Reliable Datagram Protocol (“SRD”).
7 . The computer-implemented method of claim 6 , wherein the network connection is reestablished without executing the handshake a second time.
8 . The computer-implemented method of claim 5 , wherein storing the connection metadata in the transportation layer comprises storing connection metadata representing at least one of: a connection identifier of the network connection, a connection key for the network connection, or an identifier for the second computing system.
9 . The computer-implemented method of claim 8 , wherein exchanging the first plurality of data communications with the second computing system is based at least partly on the connection metadata.
10 . The computer-implemented method of claim 9 , wherein sending the reestablishment communication is based at least partly on a same portion of the connection metadata used to exchange the first plurality of data communications with the second computing system.
11 . The computer-implemented method of claim 9 , wherein exchanging the second plurality of data communications is based at least partly on a same portion of the connection metadata used to exchange the first plurality of data communications with the second computing system.
12 . The computer-implemented method of claim 5 , further comprising determining to send the reestablishment communication based at least partly on interruption of the network connection lasting for less than a timeout period associated with the network connection.
13 . The computer-implemented method of claim 5 , further comprising executing a virtual machine instance and a network-based storage client in separate computing processes of the first computing system, wherein the virtual machine instance uses the network-based storage client to access data stored on the second computing system, and wherein interruption of the network connection occurs based on installing an update to the network-based storage client during execution of the virtual machine instance.
14 . The computer-implemented method of claim 5 , further comprising determining to resend the one or more input/output requests in response to determining that no response was received from the second computing system for the one or more input/output requests.
15 . A computer-implemented method comprising:
under control of a first computing system comprising computer-readable storage and one or more computer processors configured to execute specific instructions:
establishing a network connection with a second computing system, wherein the network connection comprises one of a Transmission Control Protocol (TCP), User Datagram Protocol (UDP), or Scalable Reliable Datagram protocol (SRD) connection, and wherein the network connection is associated with connection metadata representing one or more data items to be used in communicating with the second computing system via the network connection;
receiving, into a queue in the computer-readable storage, a plurality of communications from the second computing system via the network connection, wherein the network connection is interrupted after receipt of a communication of the plurality of communications;
receiving a reestablishment communication from the second computing system, wherein the reestablishment communication comprises at least a portion of the connection metadata, and wherein the network connection is reestablished based at least partly on the reestablishment communication without establishing a second network connection; and
in response to receiving the reestablishment communication:
resuming receipt, into the queue, of communications from the second computing system via the network connection that has been reestablished; and
initiating a cleanup procedure, wherein the cleanup procedure comprises:
determining whether the queue includes one or more un-processed communications that were received prior to receiving the reestablishment communication; and
based on the queue including one or more un-processed communications received prior to receiving the reestablishment communication, removing the one or more un-processed communications from the queue received prior to receiving the reestablishment communication.
16 . The computer-implemented method of claim 15 , wherein establishing the network connection with the second computing system comprises executing a handshake according to one of: Transmission Control Protocol (“TCP”), User Datagram Protocol (“UDP”), or Scalable Reliable Datagram Protocol (“SRD”).
17 . The computer-implemented method of claim 16 , wherein the network connection is reestablished without executing the handshake a second time.
18 . The computer-implemented method of claim 15 , further comprising storing the connection metadata, wherein the connection metadata represents at least one of: a connection identifier of the network connection, a connection key for the network connection, or an identifier for the second computing system.
19 . The computer-implemented method of claim 18 , further comprising sending, to the second computing system, a first plurality of acknowledgements for a first portion of the plurality of communications received into the queue, wherein the first plurality of acknowledgements are sent based at least partly on a portion of the connection metadata.
20 . The computer-implemented method of claim 19 , further comprising sending, to the second computing system, a second plurality of acknowledgments for a second portion of a second plurality of communications received into the queue subsequent to reestablishment of the network connection, wherein the second plurality of acknowledgments are sent based at least partly on a same portion of the connection metadata used to send the first plurality of acknowledgments to the second computing system.