Motivation
Once I completed my first two articles, I realized there are a lot of possibilities exposed by proxying MongoDB collections through FerretDB backed by CockroachDB. CockroachDB has unique data domiciling capabilities available through multi-region abstractions, inverted and partial indexes, computed columns and of course strong consistency. Today, we’re going to discuss unique constraints in MongoDB and CockroachDB.
High-level Steps
Start a 9-node multi-region cluster (CockroachDB Dedicated)
Start FerretDB (Docker)
Unique Indexes
Considerations
Conclusion
Step-by-step Instructions
Start a 9-Node Multi-region Cluster (Cockroachdb Dedicated)
I am going to use the same CockroachDB Dedicated cluster from the previous article. Please refer to the previous article for the detailed steps. You can get a 30-day trial of CockroachDB Dedicated following this link.