AF_LOCAL domain socket versus AF_INET socket performance
For interprocess communication I've often relied on tcp sockets. For better or worse, they are simple to code, manage, and are pretty fast when you bombard the socket with data. To create these sockets I've used the AF_INET domain parameter passed to the ::socket() function. My form of IPC originally spanned multiple machines, but it has diminished recently to a single box. And thus my need for the full tcp protocol stack has vanished.
I've played around with local sockets before - sockets created using the AF_LOCAL domain rather than AF_INET. They are just as easy to code for as AF_INET domain sockets, and it looks like they would be a good choice for IPC.
But before I do the work, a question remains: If I am sending data across a AF_LOCAL socket, am I letting the kernel off the hook and (thus) removing the tcp protocol stack traversal the kernel would perform for an AF_INET domain socket? In other words, will a AF_LOCAL socket be (significantly?) faster than AF_INET sockets when sending large volumes of data between local processes?