2
  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

Frank
  • 7,235
  • 9
  • 46
  • 56

1 Answers1

0

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.

Bueller
  • 2,336
  • 17
  • 11
  • Actually you can do it all in memory by using a custom transport - see http://www.codeproject.com/KB/WCF/NullTransportForWCF.aspx – blowdart May 03 '11 at 20:01