使用couchDB处理多个数据库的最佳实践

时间:2021-12-09 22:51:38

I have opted for having a database per user in couchdb. (all the database are totally independent and no aggregation is needed between them) Now my app is growing and i have thousands of databases.

我选择在couchdb中为每个用户设置一个数据库。 (所有数据库都是完全独立的,它们之间不需要聚合)现在我的应用程序正在增长,我有数千个数据库。

couchDb does not keep more than 100 open db at the same time. to improve performance, is it better to

couchDb不会同时保持超过100个开放数据库。提高性能,是否更好

  1. keep one instance of couchdb and increase the number of open DB
  2. 保留一个couchdb实例并增加open DB的数量

  3. launch another couch DB server instance and split users between.
  4. 启动另一个沙发数据库服务器实例并将用户分开。

so to sum up, the question is :

总而言之,问题是:

if you have independent data DBs, is it better to scale horizontally or vertically ?

如果您有独立的数据DB,水平或垂直缩放是否更好?

2 个解决方案

#1


1  

I would personally vote for horizontal scaling. It comes with less lookup time and some failure diversification. But, as @Alexis Côté stated, nothing beats the cluster.

我个人会投票支持横向缩放。它具有较少的查找时间和一些故障多样化。但是,正如@AlexisCôté所说,没有什么能比集群更好。

#2


1  

Clustering ist one of the new inbuild features of CouchDB 2.0

集群是CouchDB 2.0新的内置功能之一

#1


1  

I would personally vote for horizontal scaling. It comes with less lookup time and some failure diversification. But, as @Alexis Côté stated, nothing beats the cluster.

我个人会投票支持横向缩放。它具有较少的查找时间和一些故障多样化。但是,正如@AlexisCôté所说,没有什么能比集群更好。

#2


1  

Clustering ist one of the new inbuild features of CouchDB 2.0

集群是CouchDB 2.0新的内置功能之一