设置数百到数千个复制时,CouchDB是否有限制?

时间:2021-07-19 22:51:26

I'm architecting a database to hold thousands of users using CouchDB. We need to synchronise data between the server-side DB and a device DB. [ couchDB <-> pouchDB ]

我正在构建一个数据库来使用CouchDB来容纳数千名用户。我们需要在服务器端DB和设备DB之间同步数据。 [couchDB < - > pouchDB]

The only problem is that we will have hundreds to thousands of users, and we want to restrict the data synchronisation to only the data for that user.

唯一的问题是我们将拥有数百到数千个用户,我们希望将数据同步限制为仅限该用户的数据。

This means that if we want 1000 users, we need 1000 replications set up for couchDB on the server side. Just wondering if this will push the limits of Couch, or if it's within it's designed capabilities. Or if there could be any performance deficiencies with this approach?

这意味着如果我们想要1000个用户,我们需要在服务器端为couchDB设置1000个复制。只是想知道这是否会推动Couch的极限,或者它是否符合其设计能力。或者,如果这种方法可能存在任何性能缺陷?

Thanks

谢谢

1 个解决方案

#1


0  

It's difficult to give a yes or no answer to this as there are a number of factors that would have to be taken into account. You would really need to do some testing to see how well it scaled for you. In principle there is no reason a CouchDB server couldn't handle thousands of users.

由于有许多因素需要加以考虑,因此很难对此给出是或否答案。您真的需要做一些测试,看看它的缩放程度。原则上,CouchDB服务器没有理由无法处理数千个用户。

How many and how frequently documents are created and modified will have a big impact on replication. The more there is to replicate the more work the server will have to do.

创建和修改文档的次数和频率将对复制产生重大影响。复制服务器必须完成的工作越多,就越多。

Running a filter function on replication so that each user only gets their documents will crease the load on the server. All changed documents will be checked for all replications. A per-user database model will avoid this extra work.

在复制上运行过滤器功能,以便每个用户只获取其文档将增加服务器上的负载。将检查所有已更改的文档以进行所有复制。每用户数据库模型将避免这种额外的工作。

With a per-user database model you will also be able to scale out much more easily. If you find that you can comfortably host x users on a server, you can double that simply by adding another server.

使用每用户数据库模型,您还可以更轻松地扩展。如果您发现可以在服务器上轻松托管x用户,只需添加另一台服务器即可将其加倍。

#1


0  

It's difficult to give a yes or no answer to this as there are a number of factors that would have to be taken into account. You would really need to do some testing to see how well it scaled for you. In principle there is no reason a CouchDB server couldn't handle thousands of users.

由于有许多因素需要加以考虑,因此很难对此给出是或否答案。您真的需要做一些测试,看看它的缩放程度。原则上,CouchDB服务器没有理由无法处理数千个用户。

How many and how frequently documents are created and modified will have a big impact on replication. The more there is to replicate the more work the server will have to do.

创建和修改文档的次数和频率将对复制产生重大影响。复制服务器必须完成的工作越多,就越多。

Running a filter function on replication so that each user only gets their documents will crease the load on the server. All changed documents will be checked for all replications. A per-user database model will avoid this extra work.

在复制上运行过滤器功能,以便每个用户只获取其文档将增加服务器上的负载。将检查所有已更改的文档以进行所有复制。每用户数据库模型将避免这种额外的工作。

With a per-user database model you will also be able to scale out much more easily. If you find that you can comfortably host x users on a server, you can double that simply by adding another server.

使用每用户数据库模型,您还可以更轻松地扩展。如果您发现可以在服务器上轻松托管x用户,只需添加另一台服务器即可将其加倍。