Separating Control and Data Connections

 < 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).

click to expand
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 > 



BSD Sockets Programming from a Multi-Language Perspective
Network Programming for Microsoft Windows , Second Edition (Microsoft Programming Series)
ISBN: 1584502681
EAN: 2147483647
Year: 2003
Pages: 225
Authors: Jim Ohlund

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net