views:

26

answers:

2

I have 2 WCF services going through the same TCP port.

Both services are self-hosted, one attaches to net.tcp://localhost:8700/DataAccess another to net.tcp://localhost:8700/Messages

Will I gain any performance by attaching them to different ports? One of the services is very busy sending megabytes of data every second. Any reason to have or not to have this kind of configuration?

+2  A: 

No, you will not gain a performance advantage by hosting at different ports. Ports are part of a routing formula, they do not represent "slots of bandwidth."

Brent Arias
Are you sure? When you host services on the same port you have to use PortSharing = additional process.
Ladislav Mrnka
A: 

As I mentioned in my comment I think there can be very small performance boost if you host services on separate ports and turn off port sharing. Port sharing is done by separate Windows Service which listens on shared port and routes requests to the service hosting application. This hosting is another interprocess communication and as I know it is done using Named pipes. So simply if you turn off port sharing you should reduce complexity of communication and get some performance boost but it will be really small.

Ladislav Mrnka