next up previous
Next: Architecture transparency Up: Implementation details Previous: Forwarder module

THOP communication protocol

The entire TCP connection transfer mechanism is synchronized through control messages. To this purpose, we have implemented a new communication protocol (THOP) in the standard TCP/IP stack. The THOP protocol defines a small number of messages, that are encapsulated into IP datagrams. Each message triggers an appropriate action or notifies an event to the destination. Let us describe its key role in the TCP handoff mechanism. To minimize the processing overhead associated to communications, we chose to make the THOP protocol as light as possible. THOP has a (albeit very short) header, made up of two 16 bit fields: the opcode identifies the message type, the checksum is used to verify the message integrity. The message body depends on the message type. The current implementation supports the following messages. The THOP_CREATE message encapsulates all information necessary for transferring a socket to a Web server. It contains the parameters of the tcp_opt structure (which stores the state of a TCP connection) and information about the client, such as the IP source address, the TCP source port and the content of the HTTP request. The THOP_NOTIFYCLS message is sent from a Web server when the corresponding TCP connection is closed. The Web switch does have to know when a TCP connection is closed, because it must delete the corresponding entry from the table of transferred connections. The only way a Web switch knows that a TCP connection is closed without receiving an explicit message is through a TCP reset from a client. The reset is forwarded to the server which takes care of releasing the associated system resources. The THOP_NOTIFYDROP message is sent from the Web server to the Web switch when the duplication of a TCP connection has not been possible for whatever reason (typically, the maximum number of outstanding connection requests has been reached). We have previously stated that the server does not require any kind of configuration for communicating with a switch node. This is possible because, at connection transfer time, the source IP address in the IP header of the Handoff request is stored into a field of the newly created socket, namely swaddr. The swaddr field indicates whether a socket has been established through an Handoff or through a three-way handshake. In the former case, it stores the switch IP address; in the latter case, it stores an empty value. It is worth observing that the THOP protocol provides a very flexible communication mechanism among the nodes of the Web cluster. For example, it is not only suitable to synchronize the connection transferring process, but it may be also extended to implement a distributed load communication mechanism.
next up previous
Next: Architecture transparency Up: Implementation details Previous: Forwarder module
Mauro Andreolini 2003-03-13