Unix Domain Sockets vs Loopback TCP Sockets (2014)

In this web content, the author discusses their experiments comparing the efficiency of Unix domain sockets and TCP sockets for two communicating processes on the same machine using Node.js. The author provides the code for the server and client applications and explains how to run the tests. The results show that Unix domain sockets are 2-3x more efficient than TCP sockets for 1k byte packets. The author also shares a Python script they used to run the client application multiple times and create a CSV file for analysis. The author concludes that Unix domain sockets are more efficient because they don’t traverse the network stack.

https://nicisdigital.wordpress.com/2014/03/03/unix-domain-sockets-vs-loopback-tcp-sockets/

To top