服务器上的许多WCF实例 [英] Many WCF instances on the server
问题描述
你好,
我想在服务器上有很多相同服务的实例。
不幸的是,我不能用多-threads(第三方dll不支持多线程)
我想有某种路由器/交换机可以从客户端获取请求并依赖于实例的占用将此请求发送给免费的。
例如:假设服务方法需要2分钟才能继续。按标准实施5,请求将需要10分钟。我想有一个解决方案,在服务器上创建5个服务实例并进行并行处理,所以总时间约为2分钟。
我尝试使用Instances(
Hello,
I would like to have many instances of the same service at the server.
Unfortunately, I cannot use multi-threads (3rd party dll's does not support multi-thread)
I thought to have some kind of router/switch which will get request from the client and depend on the occupancy of instances send this request to the free one.
For example: Let says service method takes 2 minutes to proceed. By standard implementation 5 request will take 10 mins. I would like to have a solution in which 5 instances of service are created on the server and proceed them parallel, so the total time will be around 2 mins.
I tried to play with Instances (
ConcurrencyMode = ConcurrencyMode.Single,
InstanceContextMode = InstanceContextMode.PerCall
)
和路由,但遗憾的是没有成功。
是否有开箱即用的解决方案?或者你能指出我如何开始吗?
非常感谢,
M.
)
and with Routing, but unfortunately without success.
Is any out of the box solution for that? or would you be able to point me how to start?
Thanks a lot,
M.
推荐答案
这篇关于服务器上的许多WCF实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!