0

我目前正在使用模对 UUID 空间进行分区,因此数据查找不需要 ping 每一台服务器。但是,模数的主要问题是扩展,因为向数据存储添加更多节点可能需要一些数据迁移。在您看来,在保持服务可用的同时向系统添加更多节点的最佳方法是什么?

提前致谢!

克里斯

4

1 回答 1

0

我可以看到添加更多节点的两种方案:

  1. 您当前的节点集不足以满足您的性能要求。
  2. 您正在添加新数据,因此随着时间的推移,您需要添加新节点

在第二种情况下,如果 UUID 有一些基于时间的组件,那么按年龄分区可能就足够了

但我猜这是第一个更有趣的案例。随着数据使用的变化,您会发现分区需要更改以充分分配工作。在那种情况下,我看不到将某些分区移动到新节点的任何替代方法,根据定义,当前节点组已超载。我不清楚问题的严重程度——麻烦的是实际迁移吗?还是客户突然需要去一个新的地方获取他们的数据?

你能实现某种惰性查找方法吗?

Client initialises with current table of servers, 
    (hence knows the modulus to apply to uuid and can route on that basis)

Servers decide to reorganise themselves

Client gets a request, calclulates a now invalid modulus

Attempts to access the data

response says "Gone Away" **AND** gives the new server info

Client can now recompute the location
于 2009-11-10T10:04:49.383 回答