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

请问分布式环境如何使用? #1

Open
dahvlhldle opened this issue Jul 20, 2020 · 2 comments
Open

请问分布式环境如何使用? #1

dahvlhldle opened this issue Jul 20, 2020 · 2 comments

Comments

@dahvlhldle
Copy link

你好,请问分布式环境怎么保证不重复呢,以及怎么确保递增呢?

@hvritual
Copy link

刚刚核算了一下,这个算法思路不错,但是只存在于理想状态(机器永不宕机)下使用;
使用该算法的需要考虑:
1、宕机以后自增数归0怎么办
2、如何做到发号机器的容灾
最后你还是会发现回到了snake算法

@llxisdsh
Copy link

用redis也会出现主机宕机, 然后回拨

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

3 participants