High-Performance Networking Programming in C
TCP has been a field of intense research for decades. It's an extremely complex protocol with a heavy responsibility on the Internet. We often forget that TCP is what holds the Internet together without collapse due to congestion. IP connects networks together, but TCP ensures that routers are not overloaded and that packets do not get lost.
Consequently, the impact of TCP on performance is higher than any other protocol today. It is no wonder that top-notch researchers have written several papers on the topic.
The Internet is anything but homogeneous. There is every possible physical layer of technology on which TCP/IP works today. But, TCP is not designed for working well through wireless networks. Even a high-latency satellite link questions some of TCP's assumptions on window size and round-trip time measurement.
And, TCP is not without its share of defects. The congestion control algorithms, such as slow start, congestion avoidance, fast retransmit, fast recovery and so on, sometimes fail. When this happens, it hurts your performance. Normally, three duplicate ACK packets are sufficient for triggering congestion control mechanisms. No matter what you do, these mechanisms can drastically decrease performance, especially if you have a very high-speed network.
But, all else being equal, the above techniques are few of the most useful methods for achieving good performance for your applications.
Gunning for very high performance is not something to be taken lightly. It's dependent on heuristics and empirical data as well as proven techniques. As I mentioned previously, it is an art best perfected by practice, and it's also an iterative process. However, once you get a feel for how things work, it will be smooth sailing. The moment you build a stable base for a fast client/server interaction like this, building powerful P2P frameworks on top is no great hassle.
Polipo User Manual: www.pps.jussieu.fr/~jch/software/polipo/manual
TCP Tuning and Network Troubleshooting: www.onlamp.com/pub/a/onlamp/2005/11/17/tcp_tuning.html
Wikipedia's Definition of Bandwidth: en.wikipedia.org/wiki/Bandwidth
Advanced Networking Techniques: beej.us/guide/bgnet/output/html/multipage/advanced.html
TCP and Congestion Control Slides: www.nishida.org/soi1/mgp00001.html
Girish Venkatachalam is an open-source hacker deeply interested in UNIX. In his free time, he likes to cook vegetarian dishes and actually eat them. He can be contacted at firstname.lastname@example.org.
- Readers' Choice Awards 2013
- Mars Needs Women
- RSS Feeds
- Sublime Text: One Editor to Rule Them All?
- December 2013 Issue of Linux Journal: Readers' Choice
- Raspberry Pi: the Perfect Home Server
- Linux Systems Administrator
- IBM Will Minimize Impact of Future Disasters
- Tech Tip: Really Simple HTTP Server with Python
- Senior Perl Developer
- So girls had it better ?
1 hour 26 min ago
- Reply to comment | Linux Journal
1 hour 46 min ago
- why is GNOME 3 in the fifth position at 14.1 %?
7 hours 18 min ago
- Sublime Is Brilliant!
12 hours 21 min ago
12 hours 40 min ago
- Rapid[Disk,Cache] better than native ram caching?
13 hours 5 min ago
- Nothing is perfect
13 hours 18 min ago
- Mixtapes Community
18 hours 57 min ago
- KDE is one true DE
19 hours 32 min ago
- Command Line Shells (Bash, Zsh, etc.) are 2nd place
20 hours 51 sec ago