Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想了解一下graph数据分片的问题 #16

Open
lustlost opened this issue May 25, 2015 · 5 comments
Open

想了解一下graph数据分片的问题 #16

lustlost opened this issue May 25, 2015 · 5 comments

Comments

@lustlost
Copy link

数据分片是基于主机,还是基于监控项做分片?是不是同一个endpoint的数据都存在同一个graph上。在动态增删graph和transfer的时候,分片的数据是如何处理的,是否自动loadblance?

@laiwei
Copy link
Contributor

laiwei commented May 26, 2015

基于完整的监控项(endpoint/counter/tags) 做一致性hash,分片到不同的graph主机上。

所以同一个endpoint的多个监控项,是打散在后端的多个graph机器上。

transfer是无状态的集群,增删单个transfer,没有任何影响。

增删某个graph,默认情况下会导致1/n之一的数据丢失。
不过我们提供了一个简单的方案,可以减轻影响,后续会发个文章介绍。

@lustlost
Copy link
Author

数据分片是hash后除以graph数量后取余,去分片的么?

@laiwei
Copy link
Contributor

laiwei commented May 26, 2015

不是取余

是采用的一致性hash算法,减少因为graph的增删引起的数据迁移数量。

@wkshare
Copy link

wkshare commented May 31, 2015

@laiwei
如果我有3个graph1、graph2、graph3;2个transfer1、transfer2。
配置对应关系如下,会怎么样?

transfer1: graph1,graph2,graph3
transfer2: graph2,graph3

数据会混乱吧

@UlricQin
Copy link

必须混乱啊。 @wkshare

transfer是无状态的,所有的transfer的配置都是一样的。配置的相同的graph的列表

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants