| Dynamic
TCP Connection Elapsing
|
INTRODUCTION
When designing systems for load-balancing, process migration, or fail-over, there
is eventually the point where o ne would like to be able to "move"
a socket from one machine to another one, without losing the connection on that
socket, similar to file descriptor passing on a single host. Such a move operation
usually involves at least three elements: 1.
Moving any application space state related to the connection to the new owner.
E.g. in the case of a Web server serving large static files, the application state
could simply be the file name and the current position in the file. 2. Making
sure that packets belonging to the connection are sent to the new owner of the
socket. Normally this also means that the previous owner should no longer receive
them. 3. Last but not least, creating compatible network state in the kernel
of the new connection such that it can resume the communication where the previous
owner left off. We shall call the host from which ownership of the connection
endpoint is taken the origin, the host to which it is transferred the destination,
and the host on the other end of the connection (which does not change) the peer.
Details of moving the application state are beyond the scope of this paper, and
we will only sketch relatively simple examples. Similarly, we will mention a few
ways for how the redirection in the network can be accomplished, but without going
into too much detail. The complexity of the kernel state of a network connection,
and the difficulty of moving this state from one host to another, varies greatly
with the transport protocol being used. Among
the two major transport protocols of the Internet, UDP [1] and TCP [2], the latter
clearly presents more of a challenge in this regard. Nevertheless, some issues
also apply to UDP. tcpcp (TCP Connection Passing) is a proof of concept implementation
of a mechanism that allows applications to transport the kernel state of a TCP
endpoint from one host to another, while the connection is established, and without
requiring the peer to cooperate in any way. tcpcp is not a complete process migration
or load-balancing solution, but rather a building block that can be integrated
into such systems. tcpcp consists of a kernel patch (at the time of writing for
version 2.6.4 of the Linux kernel) that implements the operations for dumping
and restoring the TCP connection endpoint, a library with wrapper functions (see
Section 3), and a few applications for debugging and demonstration. The
remainder of this paper is organized as follows: this section continues with a
description of the context in which connection passing exists. Section 2 explains
the connection passing operation in detail. Section 3 introduces the APIs tcpcp
provides. The information that defines a TCP connection and its state is described
in Section 4. Sections 5 and 6 discuss congestion control and the limitations
TCP imposes on check pointing. Security implications of the availability and use
of tcpcp are examined in Section 7. We conclude with an outlook on future direction
the work on tcpcp will take in Section 8, and the conclusions in Section 9. The
excellent "TCP/IP Illustrated" [3] is recommended for readers who wish
to refresh their memory of TCP/IP concepts and terminology. The
key feature of tcpcp is that the peer can be left completely unaware that the
connection is passed from one host to another. In detail, this means: "
The peer's networking stack can be used "as is," without modification
and without requiring non-standard functionality " The connection is not
interrupted " The peer does not have to stop sending " No contradictory
information is sent to the peer " These properties apply to all protocol
layers visible to the peer
<<back |