What is new in RavenDB 3.5Collection Specific Replication
With RavenDB 3.5, we added a really cool feature to the RavenDB Replication. Actually, I’m not sure how much of a “feature” this is, because this actually take away capabilities .
As the name suggest, this allows you to select specific collections and only replicate those to a specific destination. For example, in this example, we can see that we are only replicating the Categories, Companies and Employees collection, instead of replicating the entire database.
Why is this important?
Because it opens up new ways of managing your data. It allows you to use RavenDB replication (high throughput, reliable and error resilient) to manage data distribution.
Let us imagine for a moment that we have a web ordering system, with multiple tenants. And we have some common information that needs to be shared among all the tenants. For example, the baseline pricing information.
We can setup replication like so:
The Shared database contains a lot of information, but only the pricing information is replicated. This means that you can change it once, and it will propagate to all the end destinations on its own.
Common scenarios for such shared data include:
- Users /logins
- Base data for local modifications (product catalog that each tenant can override)
- Rules
Note that because we are using collection specific replication, this does not make the destination database into a duplicate of the source. As such, it will not take part in failover configuration for the source database.
You can mix and match, a single database can replicate to failover destination (full replication) and partial (only specific collections). And the clients will know how to fail to the right node if something bad happens.
More posts in "What is new in RavenDB 3.5" series:
- (12 Aug 2015) Monitoring support
- (11 Aug 2015) Monitoring active I/O operations
- (10 Aug 2015) Filters & transformers with RavenDB Replication
- (06 Aug 2015) Collection Specific Replication
- (15 Jul 2015) Exploring data in the dark
- (14 Jul 2015) My thread pool is smarter
- (10 Jul 2015) Smuggling data across servers
Comments
Nice! It would be awesome if it is possible to filter inside the collections too :-) any plans for that?
Edward, Wait for it :-)
Comment preview