What's changed in Unix networking in the last decade or so

August 4, 2013

In an earlier entry I mentioned in passing that a number of things had changed in Unix networking since the classic Stevens work was written. Today I feel like trying to inventory at least some of them:

  • IPv6 is growing in importance. If you care about this (and you should) there is a whole exciting world of issues with dual binding, detecting when the machine has useful IPv6, and so on. Note that real IPv6 support may require examining hidden assumptions in your code.

  • along with IPv6 has come a number of new interfaces that are now the correct way of doing things, such as getaddrinfo(). There are some subtleties here that deserve to be carefully covered in any good modern networking book.

  • people now care about handling a lot of connections at once in an efficient manner. This has created both new interfaces (such as poll() and epoll()) and new asynchronous server approaches.

  • similarly, threading has become a big issue and there are a bunch of issues surrounding good file descriptor handling in the face of threading. Overly simple code can have any number of inobvious races where your code winds up manipulating something other than it expected because other threads have created and destroyed file descriptors behind your back.

  • practical protocol design now requires considering how your new thing will interact with firewalls, which have become ubiquitous in the past decade.

  • TCP congestion control and window management algorithms have evolved over the past decade in ways that affect TCP performance in real world situations.
  • there is a whole area of protocol performance on the modern Internet, where you care about things like DNS lookups, keeping the sizes of things down so that you can fit them in one packet, and so on. My impression is that most of this is new in the past decade.

  • at least Linux has added support for doing various interesting things over local Unix domain sockets.

Although it's not quite within the scope of a work on basic (Unix) socket network coding, I think that any new book on this should at least say 'do not attempt to design your own cryptographically secure communication protocol'. Some discussion of SSL/TLS may be in order since it's become so pervasive.

Written on 04 August 2013.
« The paucity of generally useful HTTP error codes
Who or what your website is for and more on HTTP errors »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Sun Aug 4 23:55:25 2013
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.