Vitalik
Vitalik

Reputation: 2754

Performance on WCF services on the same port

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?

Upvotes: 2

Views: 1009

Answers (2)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364399

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.

Upvotes: 3

Brent Arias
Brent Arias

Reputation: 30215

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."

Upvotes: 2

Related Questions