I am working on a system that consists of several applicaitons communicating with each other. Some of these applications will run on the same server and some will run on a different one. So there is going to be communication from one server to another one and from one server to itself.

The communication will be TLS protected which of course takes time. In order to make the system more efficient I could only TLS-protect the communications that are not on the same server. Of course this is only safe if the non-protected content never leaves the server it comes from and also goes to.

Let's say One server has the IP and wants to send an IP packet to (itself). Will this IP packet ever leave the server so that it would need to be protected or will it never leave the NIC of the server?


You can be absolutely sure the traffic doesn't leave your machine, if you use the loopback interface (IP for addressing the server itself. See this question.

Communication on the loopback interface doesn't just not leave the machine, it doesn't even enter your network card. It is fully emulated by your OS (at least in linux).

| improve this answer | |

As far as I know, it will never leave the machine.

If you want to test it by yourself, traceroute is a great tool. Just write traceroute <IP address> and you will be able to see the package route throughout the network.

I've just done it with my Macbook and got a single hop as response (indicating that the packet didn't have to leave my machine).

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.