Couchdb 2.0 replicate multiple user databases to single db

805 Views Asked by At

I am using couchdb and each user has their own database.

However, I have a web app that should be able to look up an _id in any database and return the document. With thousands of users, querying across thousands of couchdb instances would be impractical.

How can I replicate my data to a single master database so that I can query by _id?

1

There are 1 best solutions below

1
On BEST ANSWER

What I ended up doing is replicating every userdb to a master db when the database was created, using the _replicate API endpoint. The master db then contains a read-only copy of all the other databases.