如何避免用户的路由器崩溃?
看起来便宜的消费级路由器相当容易崩溃:在各种备份/同步软件论坛中徘徊,我不时看到这一点。开发人员似乎投入了大量的精力来确保他们不会使路由器崩溃。
对于我的网络密集型应用程序,为了确保它不会导致设计不良的路由器出现问题,“该做什么”和“不该做什么”是什么?尤其是想要连接到多个对等点的一个?
It appears that cheap consumer routers are fairly easy to crash: hanging around in various backup/sync software forums, I see this mentioned from time to time. Developers seem to be putting a fair amount of effort into making sure they don't crash the routers.
What are the "do"s and "don't"s for my network-heavy application to ensure that it doesn't cause issues with badly designed routers? Especially one that intends to connect to a number of peers?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,试图解决坏硬件问题是没有出路的,因为每个路由器都会以自己独特的方式出现故障:)。
在网络密集型应用程序中,您可以做的就是假设网络不是稳定的介质(路由器可能崩溃等),并相应地设计应用程序网络操作。
例如,提供重新连接逻辑、连接超时、某种状态缓存,以允许用户在网络连接断开的情况下使用应用程序。
关于有故障的路由器 - 它们通常会因大量同时连接而崩溃(例如通过 BitTorrent 或其他 P2P 协议下载)。因此,保持最少的连接数量会有所帮助。
IMO trying to workaround bad hardware is the road to nowhere, because every router fails in its own remarkable way :).
What you can do in the network-heavy application is assume that network is not stable media (routers can crash, etc) and design application network operations accordingly.
For instance, provide reconnect logic, connection timeouts, some sort of state caching to allow users work with app even if network connectivity is gone.
Concerning faulty routers - they usually crash because of great number of simultaneous connections (e.g. downloading via bittorrent or other p2p protocol). So, maintaining minimum number of connections can help.