Search code examples
wcfserviceippacket

Is the network card used when the WCF service and the app calling the service are both hosted on the same machine?


  1. If I host Web service and WCF service on the same machine. The web service consumes the WCF service. Will the communication go through only memory or also the physical network card.
  2. I can also put it this way. If I have two programs running on the same machine, and they use tcp sockets to communcates to each other, will the IP packet be delivered through the physical network card or it only go through memory. The difference is: if it go through the network card, it may be limited by the speed or cache of the card, right?

Thanks


Solution

  • The answer is.... kind of. :) The services will communicate through a socket or port on the system. They will reach out to the network device, which very high in the stack will identify that the services are on the same machine then the loopback device will redirect the communications back to the host computer before it ever actually goes out on the network. So, is it all done in memory? No. But it also does not actually hit the network.