问题描述
所有副本集成员通过每 2 秒发送一次心跳来监视所有其他成员.这些请求将在 10 秒后超时.
All replica set members monitor all the other members by sending out a heartbeat every 2 seconds. These requests will time out after 10 seconds.
这两个值是否可配置?
推荐答案
在 MongoDB 2.2.0 中,目前的答案是这些值在运行时不可配置".您可以查看 github.com/mongodb/mongo 中的代码并自己修改值,但这可能会产生意想不到的副作用.
As at MongoDB 2.2.0, the answer is currently "These values are not configurable at runtime". You could possibly check out the code from github.com/mongodb/mongo and modify the values yourself, but this may have unexpected side effects.
幸运的是,正在为 MongoDB 的下一次迭代添加可配置的超时/心跳设置(2.3.x 开发/不稳定,最终将在 2.4 生产/稳定版本中达到高潮).
Fortunately there is work underway to add configurable timeout/heartbeat settings for the next iteration of MongoDB (2.3.x dev/unstable which will eventually culminate in the 2.4 production/stable release).
有关详细信息,请参阅 MongoDB 问题跟踪器中的 SERVER-1929.
See SERVER-1929 in the MongoDB issue tracker for more information.
这篇关于副本集心跳频率或超时时间是否可配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!