The use case is that we have customers in US, EU and China. Due to legislation, EU customers data should not be stored outside EU, US customers data should not be stored in China. Due to performance, data should be as close to the customer as possible, and should be replicated/redundant as much as possible. So the plan is split the customers data into 3 shards, customer_us
, customer_eu
, customer_cn
, and have 3 data-center, California
, Beijing
and Geneva
, such that:
Beijing
holdscustomer_cn
California
holdscustomer_cn
andcustomer_us
Geneva
holdscustomer_cn
,customer_us
andcustomer_eu
Now the whole example is taken from http://orientdb.com/docs/2.1/Distributed-Sharding.html , but OrientDB has the concept of Class and Inheritance. AFAIK, ArangoDB shards by shard key
. My question is
- Can we do the same sharding using ArangoDB shard
key
, and how do we configure sharding and replication as such? - If we have associated data, say "invoice", such that each invoice must belong to one and only one customer, can we automatically, somehow, distributed them in the same manner without taking care of shard
key
?