I have a .NET 3.5 server application that usually has about 8 clients. I'm using System.Net.Sockets
for all the networking.
I've been told that if a client is running on the same box, it should use localhost:<port>
or 127.0.0.1:<port>
instead of the machine's ip or name for better performance. Several people at work have said that this skips some layers of the tcp stack.
But I'm not able to see any performance difference at all in testing (timing how long it takes to get a ping packet from server to client using System.Diagnostics.Stopwatch).
Should there really be better performance in theory?