加入我的mongodb 机器上有两块网卡,我希望数据库读写访问走网卡1,mongodb 副本间心跳,同步数据走网卡2,这样两个流量分开,这个该如何配置,有人知道吗?
巴扎黑2017-04-24 09:12:10
There is no official solution for the time being. You can see this mongodb issue SERVER-1889.
However, you can try a solution mentioned in this issue, which is to set hosts for replica-set and force the other server addresses of replica-set to be resolved to a different network card IP. This requires that all replica-sets be set with domain names (FQDN) instead of specific IPs, and domain names must also be used when accessing mongodb.