Reputation: 100
I have multiple WCF service to host in windows service.
I was wondering, is there a need to create multiple threads for ServiceHost ?
What do I need to consider when hosting these services ?
For example:
Does one client blocks another ?
If one client fails does it effects on other ?
If one client has been throttled, will it throttle the other two ?
Upvotes: 0
Views: 315
Reputation: 9763
ServiceHost creates its own listen thread for every instance so it's perfectly fine to have more than one in one host.
For instance we have a service with 4 hosts here.
private ServiceHost _msp;
private ServiceHost _ps;
private ServiceHost _tt;
private ServiceHost _tts;
Windows also has a service running called "Net.Tcp Port Sharing Service". This way the hosts can even share the same port when running over tcp.
Upvotes: 2