简体   繁体   English

WCF双工服务-最大连接数/数据传输

[英]WCF Duplex Service - Max Connections / Data Transfer

I am looking for some information regarding WCF Duplex communication and really best practices when dealing with WCF and bandwidth usage. 我正在寻找有关WCF双工通信的信息,以及与WCF和带宽使用有关的最佳实践的信息。 Ill explain my application first... 我先解释一下我的申请...

.. The application itself is for computer management. ..该应用程序本身用于计算机管理。 Each computer on the network will have an Agent (windows service) and will need to talk to a Server (windows service running a WCF Duplex service). 网络上的每台计算机都将具有一个代理(Windows服务),并且需要与服务器对话(运行WCF Duplex服务的Windows服务)。 The network in question has ~6000 machines on it with probably around 75% of these being on at anyone time, however the application will need to be able to handle all the machines being on at one time and be able to handle expansion of the estate as well. 有问题的网络上约有6000台计算机,其中大约有75%随时处于运行状态,但是应用程序将需要能够一次处理所有正在运行的计算机,并能够处理资产扩展也一样

Conversation between the agents and server will be limited and will the majority of the time just be the agent 'checking in' to update the server with pc name / ip address / logged on user. 代理与服务器之间的对话将受到限制,大多数情况下,代理将仅通过代理“签入”来使用PC名称/ IP地址/登录用户来更新服务器。 The agent will have some tasks to run depending on the configuration details set on the server. 代理将有一些任务要运行,具体取决于服务器上设置的配置详细信息。

I have 2 real questions with some sub questions... 我有2个真正的问题,还有一些子问题...

  1. Is it plausible to have 6000 - 7000 agents connecting and then checking in to the server. 可能有6000-7000个代理连接并随后签入服务器。

    1a. 1a。 if so is there a suggestion for how often these should 'check in' to keep the connection live without checking in too often (WCF receive/inactivity timeout default is 10minutes but i dont mind increasing this) 如果是的话,是否有建议这些应该多久“检查一次”以保持连接正常运行而无需经常检查(WCF接收/不活动超时默认为10分钟,但我不介意增加此间隔)

  2. What is the best way to update the agents configuration? 更新代理配置的最佳方法是什么? I have 2 options / ideas 我有2个选择/想法

    2a. 2a。 When the configuration is changed on the server it pushes (callback) these changes out to the agents - i am concerned about flooding the WAN, is there a good way to send to all agents without flooding it. 当服务器上的配置发生更改时,它会将这些更改推送(回叫)给代理-我担心会泛滥WAN,是否有一种很好的方式发送给所有代理而不泛洪它。

    2b. 2b。 The agent has a configuration update time period, where it contacts the server to get the latest configuration details - while this should stop the issue of flooding the WAN (not all machines will run this update at the exact same time) it means that the configuration is not always up to date even though the agent is connected to the server. 代理具有配置更新时间段,在该时间段内,它与服务器联系以获取最新的配置详细信息-虽然这应该可以阻止WAN泛滥的问题(并非所有机器都将在同一时间运行此更新),但这意味着配置即使代理已连接到服务器,它也不总是最新的。

I hope these are sensible questions, i have looked around everywhere for this sort of information regarding WCF services and i cant find anything that would even point me in the right direction. 我希望这些都是明智的问题,我到处都在寻找关于WCF服务的此类信息,并且找不到任何指向正确方向的信息。 Any information would be greatly appreciated. 任何信息将不胜感激。

Simon 西蒙

I am also trying to implement same kind of scenario. 我也在尝试实现相同的场景。 i have done some R & D with following approaches. 我已经通过以下方法进行了一些研发。

  • WCF with wsDualHttpBinding - this approach work fine in local network and not work over internet because this need to have public IPs for both client and server. 带有wsDualHttpBinding的WCF-这种方法在本地网络中可以很好地工作,并且不能在Internet上工作,因为这需要为客户端和服务器提供公共IP。

  • WCF with web socket with netHttpbinding - This is best option to implement duplex communication over internet but unfortunately This approach need to have both client and server win 8 or win 2012. 带有带有netHttpbinding的Web套接字的WCF-这是在Internet上实现双工通信的最佳选择,但不幸的是,此方法需要客户端和服务器都赢得8或赢得2012年。

  • WCF with nettcpbinding -This is the feasible and best approach for me. 带有nettcpbinding的WCF-这对我来说是可行且最佳的方法。 I manage to get it work over internet and i have tested on separate network. 我设法使其可以通过Internet进行工作,并且已经在单独的网络上进行了测试。

Now my worry is when thousands of clients connect to WCF service performance impact. 现在,我担心的是何时成千上万的客户端连接到WCF服务会对性能产生影响。 If somebody has done this kind of development greatly appreciate your suggestions. 如果有人进行了这种开发,请非常感谢您的建议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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