Subject: Re: What's the status of TCP friends?

From: Stephen Hemminger <[email-masked]>
Date: Tue, 18 Mar 2014 08:27:03 -0700

On Mon, 17 Mar 2014 21:03:20 -0700
Eric Dumazet <[email-masked]> wrote:

> On Tue, 2014-03-18 at 11:13 +0800, Zheng Liu wrote:
> 
> > That sounds great!  But it might not satisfy our requirement.  If we use
> > AF_UNIX our program will not be deployed on two servers.  Meanwhile
> > AF_INET has been applied in our program to communicate with other
> > clients.  So DGRAM seems that it is not a good idea.  Now our program
> > needs a IPC mechansim that can commnucate between two servers and
> > provide a high performance when two processes are run on the same
> > server.  That is the reason why I am interested in TCP friends.  :)
> 
> TCP friends is another layer added into TCP stack, for what ?
> 
> Improving performance for lazy applications ?
> 
> Really, if you cared about performance, you would have added a way to
> use fast IPC if available.
> 
> TCP friends will still be slower than the available IPC mechanisms, by
> an order of magnitude.
> 
> So instead of spending time on this TCP friends dream, I think you
> should focus on existing and supported mechanisms.
> 
> I for example could add zerocopy support to AF_UNIX, if you think its
> worth it.

I find ZMQ to be a useful API for this. It allows abstracting away the
choice of transport. You can do inprocess, unix and tcp by specifying
different connection in URL like syntax.