Across region data migration
All regions share one Ring file, and the data distribute algorithm is balance targeted. With such a global shared Ring file
and rebalance algorithm, every time one rebalance the ring after add or delete storage node(device) will causes data
migration both across region and in local region. The theoretical ratio value of data migration should be:
num_of_migrate_partitions = (num_of_added_devs/total_devs )* (R* 2^P) …(1)
R: replica number; 2^P: the total number of partition.
I tested the data migration ratio across two regions. The test results match the theoretical analysis.
So, while multi-region deployment. I think, we should notice the affection of across region data migration, at least:
1) Instantaneous increased network load;
2) Data inconsistency window and costs.
Test records of across region data migration:
---------------------------------------------------------------------------------------------------------------------------------
A. The initial Ring (ring_v1):
1048576 partitions, 3.000000 replicas, 2 regions, 23 zones, 1850 devices, 0.04 balance, 185 storage nodes
B. Add 6 zones with 60 devices to region 1. And rebalance the Ring (ring_v2):
1048576 partitions, 3.000000 replicas, 2 regions, 29 zones, 1910 devices, 0.06 balance, 191 storage nodes
C. Calculate the number of data migrated across these two regions:
Total partition reassigned from Region_1 to Region_2: 52022
Total partitions numbers (with replica 3): 3145728
Data migration ratio: 1.65%
如果在Region之间摒弃balance要求,让ring-builder在rebalance 的时候能够知晓是在multi-region情况,可以解决因为rebalance而导致的跨(region)数据中心的数据迁移。