We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
项目中使用redis自增的方式为微服务集群每个节点动态分配workerId值,就是每次服务启动的时候采用redis从0开始自增获取workerId, 要是集群规模比较大的话,用不了多久这个workerId就能达到short最大值了吧,难道要重新把它刷到0开始自增吗
The text was updated successfully, but these errors were encountered:
参考实现(自动注册workderid): https://github.com/yitter/IdGenerator/blob/master/Go/regworkerid/regworkerid/reghelper.go
Sorry, something went wrong.
你的服务器集群,容器启动个数,会超过32700个吗?
当然会了,我们现在就是扩位的,16位,用IP最后两位,最大长度是2^16-1,short在这里不合理,对于java来说,java都是有符号位的。
No branches or pull requests
项目中使用redis自增的方式为微服务集群每个节点动态分配workerId值,就是每次服务启动的时候采用redis从0开始自增获取workerId,
要是集群规模比较大的话,用不了多久这个workerId就能达到short最大值了吧,难道要重新把它刷到0开始自增吗
The text was updated successfully, but these errors were encountered: