简体   繁体   中英

Hosting multiple Wcf services in windows service

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM