| < Day Day Up > |
|
A very interesting technique that has been used in production Internet protocols works by separating control and data communication to separate sockets. For example, FTP separates the data transfer from the telnet-like control interface over which the user communicates (see Figure 7.4).
Figure 7.4: Illustrating separate control and data connections.
The advantage of independent control and data connections is that the characteristics of the two connections are different, and, therefore, the Sockets application can configure the sockets differently. For example, the control connection will likely emit small requests that will very likely not fill in a packet. Therefore, the TCP_NODELAY socket option can be used on the control connection to reduce the latency of small packet transmission (disabling Nagle). As the data connection will very likely transfer large amounts of data, Nagle will remain enabled to make best use of the available bandwidth.
Additionally, the real-time characteristics of the control and data connections will be different (with respect to round-trip times, and so on). Therefore, independent connections provide better bandwidth utilization, as TCP will automatically tune its parameters for the given connection usage.
| < Day Day Up > |
|