1

We are planning to develop a big set of WCF-services with net.tcp binding (about 50 services). They will be hosted on IIS.

As I understand, there are two way to realize it:

  1. Create one site on IIS. Services will be deployed as a IIS application. So, all service will use the same port according to net.tcp binding for site (net.tcp port sharing feature).

  2. Create 50 sites on IIS, one site for one service. Every site will have different port in net.tcp binding - so, every service will work by using different ports.

What kind of way is better according to performance issues? I couldn't find any information about performance of solutions with net.tcp port sharing.

Sir Hally
  • 2,318
  • 3
  • 31
  • 48

1 Answers1

1

NetTcpPortSharing is the WCF TCP port sharing service. It implements a centralized TCP listener so that multiple processes can listen on the same TCP port.
For more information you can refer this link. http://msdn.microsoft.com/hi-in/magazine/cc163357(en-us).aspx

Port sharing should not only be only one consideration to deploy your service. You have to design your deployment based on.

  1. Application Pool.
  2. Crash and recovery.
  3. Server Hardware.
  4. Nature of services (heavy data transaction)
Vivek
  • 570
  • 8
  • 21
  • Thank you. But what about performance of NetTcpPortSharing? What is the better one - 50 sites (one site for one service) on the different ports or one site with NetTcpPortSharing (for all services) on one port? – Sir Hally Aug 07 '12 at 14:01
  • 1
    50 independent sites sharing single port should be created. For more info regerding configuration you can refer this article. http://msdn.microsoft.com/en-us/library/ms734772.aspx – Vivek Aug 08 '12 at 05:44
  • I understood about port sharing, but the other connected question has appeared. Is it bad to make WCF project with a several WCF services? Such project can be built in one DLL and a several *.svc files. Can I use such approach for service which will deploy in common (according to our goals and architecture)? – Sir Hally Aug 08 '12 at 19:04
  • 1
    Yes, it is bad to create one project with multiple WCF services because change in one service to leads to re compile all service and downtime to all services at the time of deployment. In a scenario if your one service throws unhandled exception that leads to restart all services. It would be also difficult to develop services in team environment if a single project sharing multiple services. Group similar methods (operation contracts) in one service. You can create common component for Log, validation and Authorization etc those can be use between services. – Vivek Aug 09 '12 at 05:49