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

“5位数据中心标识 - 5位机器标识”这部分为什么要放到中间呢? #1

Open
quworld opened this issue May 9, 2018 · 1 comment

Comments

@quworld
Copy link

quworld commented May 9, 2018

“5位数据中心标识 - 5位机器标识”这两部分为什么要放到中间呢?
放到第二和第三部分可以吗?

@fantasticmao
Copy link

数据标识放在第二部分,自增计数放在第三部分,这样可以保证雪花算法生成的 ID 保持大致的递增规律。这种 ID 的递增规律对于某些场景十分有用,例如 MySQL 的 InnoDB 聚簇索引。

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

2 participants