Difference between Unix sockets and TCP/IP sockets

Unix sockets: are an internal communication process between servers running on a machine

IP sockets: are more of an external, meaning communication between processes over a network. Which typically would be between a local and remote host even though you can have this type internally also.

For the Unix sockets, they are preferable to use as certain operations like routing are avoided altogether because the domain sockets know they are executing on the same machine which makes them faster thus making them a better option if communication is done on the same host

You can check out your machines local unix sockets with the following command:

netstat -a -p --unix


Leave a Reply

Your email address will not be published. Required fields are marked *