I believe that UNIX domain sockets in theory provide better bandwidth than TCP sockets on the loopback interface, but in practice the difference is probably not significant.
Data carried by UNIX sockets must not pass up and down the IP stack.
re: Alexander is the answer. AFAIK, you should not get more than one context switch or copy of the data in each direction (i.e., for each read() or write() ), so I think the difference will be careless. The IP stack does not need to copy a packet when moving between layers, but it has to manipulate internal data structures to add and remove higher level packet headers.
Alnitak Nov 02 '08 at 22:26 2008-11-02 22:26
source share