mongodb文档中的primary data center怎么理解?

专业打酱油 发布于 2012/11/23 16:04
阅读 154
收藏 0

http://cn.docs.mongodb.org/manual/core/replication/


Architectures

The architecture and design of the replica set deployment can have a great impact on the set’s capacity and capability. This section provides a general overview of best practices for replica set architectures.

This document provides an overview of the complete functionality of replica sets, which highlights the flexibility of the replica set and its configuration. However, for most production deployments a conventional 3-member replica set with members[n].priority values of1are sufficient.

虽然下面讨论的额外灵活性对管理各种操作复杂度有帮助,但明智的做法是让要求的复杂性决定架构的复杂性,而不要让部署平添不必要的复杂性。

开发副本集架构时,应考虑以下因素:

  • Ensure that the members of the replica set will always be able to elect a primary. Run an odd number of members or run an arbiter on one of your application servers if you have an even number of members.
  • With geographically distributed members, know where the “quorum” of members will be in the case of any network partitions. Attempt to ensure that the set can elect a primary among the members in the primary data center.
  • Consider including a hidden or delayed member in your replica set to support dedicated functionality, like backups, reporting, and testing.
  • Consider keeping one or two members of the set in an off-site data center, but make sure to configure the priority to prevent it from becoming primary.

加载中
返回顶部
顶部