1

大家好,我已经使用 thsi 配置建立了一个 mongo 集群

  1. 我有 3 台运行 mongos 的不同机器(都是具有不同 IP 的物理机器,以确保稳定性/性能/可用性)。
  2. 3 个不同的虚拟机上的 3 个配置服务器。
  3. 两个 Mongo 分片在高端机器上运行(两个 mongod 实例在两个端口上运行,两个 mongod 都有单独的 db 目录)。

这套装置已经到位并且已经在运行。

我想将副本集添加到这两个分片现在意味着每个分片将有两个副本。我的问题是

  1. 当每个分片已经存在时,如何将副本集添加到现有集群
  2. 每个 Replica 将携带与其对应的 shard 相同的 db 空间,其中包含近 2 TB 的数据?
  3. 我应该使用不同的机器来托管这些副本以确保故障转移吗?
4

1 回答 1

1

How can i add replica set to existing cluster when each shard is already

Have you read the documentation on sharding tutorials?

http://docs.mongodb.org/manual/administration/sharded-clusters/

Each Replica will carry the same db space as its corresponding shard having almost 2 TB data with them?

Not sure what you mean, if you mean it will replicate the data on the other two shards then no. It will hold as much as it balanced out to it.

Should i use different machine to host these replica to ensure fail over?

If you are using the same machine for your replicas then why have a sharded replica cluster?

The whole point of the sharded replica cluster setup is to distribute workload amoung many servers in a cluster.

Using the same server for it all kinda defeats the point...

That goes for using a single server for a replica set too, no point really...

于 2013-11-21T08:19:40.980 回答