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

请教一些问题,谢谢。 #2

Open
yiippee opened this issue Oct 19, 2019 · 0 comments
Open

请教一些问题,谢谢。 #2

yiippee opened this issue Oct 19, 2019 · 0 comments

Comments

@yiippee
Copy link

yiippee commented Oct 19, 2019

1,你这个项目的思想主要是,将sortedset的score作为过期时间来管理,服务提供端定期更新这个时间,服务消费端定时遍历所有的score值判定是否超时。我这样理解对吗?谢谢。如果是这样的话,服务消费端需要不停地轮训判断啊,感觉有点浪费啊。是我哪里理解有问题吗?谢谢。
2,能否通过redis自带的事件通知机制来做到服务发现的呢?比如监听过期key 命令:psubscribe keyevent@0:expired 监听新增key命令:psubscribe keyevent@0:hset,总之redis本身提供了很多key变动的消息通知,感觉这样的好处是不需要客户端自己去轮训,只要阻塞等待结果就可以。我看etcd就是类似的阻塞等待通知的。是我哪里理解有问题吗?谢谢

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

1 participant