captain
captain copied to clipboard
service discovery based on redis
redis是配置为master,slave的模式么?还是是配置为集群的模式? 如果是前者的话,那么master宕机的时候,server是否需要手动切换为slaver的配置。 以为,系统如何发现master宕机,如何进行切换? 是否改为集群的方式会更简洁一些?
1,你这个项目的思想主要是,将sortedset的score作为过期时间来管理,服务提供端定期更新这个时间,服务消费端定时遍历所有的score值判定是否超时。我这样理解对吗?谢谢。如果是这样的话,服务消费端需要不停地轮训判断啊,感觉有点浪费啊。是我哪里理解有问题吗?谢谢。 2,能否通过redis自带的事件通知机制来做到服务发现的呢?比如监听过期key 命令:psubscribe __keyevent@0__:expired 监听新增key命令:psubscribe __keyevent@0__:hset,总之redis本身提供了很多key变动的消息通知,感觉这样的好处是不需要客户端自己去轮训,只要阻塞等待结果就可以。我看etcd就是类似的阻塞等待通知的。是我哪里理解有问题吗?谢谢
Nice :)
Nice one @pyloque :) captain will be **featured** in our next [RedisWeekly](http://redisweekly.com)!
How can I use this as a library i.e. if I comment out the Spark http server, can I just use the discoveryService classes to create and get the service...
Hi there 👋, I'm [Safer Bot](https://gitlab.com/lsi-ufcg/vulnerabilidades/safer)! Safer is an open-source tool that automatically updates vulnerable dependencies to more secure and compatible versions. Our goal is to help maintainers keep their...
This PR was automatically created by Safer, an open-source tool that updates vulnerable dependencies with compatible and more secure versions. Analyzed commit: 5f6b097b11ed2d7537c715357f0d19ff98b80b63 File updated: pom.xml Vulnerabilities reduced: 30 ->...