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://localho开发者_StackOverflow中文版st: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?
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.
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."
精彩评论