I want to migrate an existing application that has approx. 10 million records stored in a relational database to CouchDB. The thing that I love about CouchDB is easy replication and fast cached views. The thing I don't like is the write and view creation speeds which will be very slow with 10 million documents.
One idea I have to get around these potential bottlenecks is to have three CouchDB instances:
- Write only instance: This is the master instance. Our single point of truth. Only updates, inserts and deletes allowed here. There are no reads and no views on this instance.
- View creation only instance: Only used to create and cache views. There are no reads or writes on this instance.
- Read only instance: Read access via replicated views.
Instance 2 is replicated from instance 1. Since there will not be any applications that use instance 2, it makes it feasible to create new views without affecting production applications.
Instance 3 is replicated from instance 2 which includes all the cached views.
Is this a feasible solution?