简体   繁体   English

分片可以与复制一起使用吗?

[英]Can sharding work with replication?

Can sharding work with replication? 分片可以与复制一起使用吗?

if they can how many servers do we need for a minimal setup? 如果他们可以,那么我们需要多少台服务器来进行最少的设置?

if not, what is the best option for high availability? 如果不是,那么高可用性的最佳选择是什么?

Yes, it can. 是的,它可以。 See second FAQ at http://docs.mongodb.org/manual/faq/sharding/ 请参阅http://docs.mongodb.org/manual/faq/sharding/中的第二个常见问题解答。

Depends on your needs: you can run a version of mongod with as little as a single server. 取决于您的需求:您只需一个服务器即可运行一个mongod版本。 I suppose the minimum to have both sharding and replication would be to have 2 shards each in a replica set of 2 servers. 我想同时具有分片和复制功能的最低要求是在2个服务器的副本集中每个都有2个分片。

Once again depends on your application and needs. 再次取决于您的应用程序和需求。 How fault tolerant does your system need to be? 您的系统需要怎样的容错能力? Naturally more replicas will increase availability. 自然,更多副本将提高可用性。 Sharding only allows you to distribute your data/computations so that does not increase availability. 分片仅允许您分发数据/计算,因此不会增加可用性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM