基于Redis实现注册中心
2020-08-02 20:36:49 5 举报
登录查看完整内容
为你推荐
查看更多
redis实现注册中心
作者其他创作
大纲/内容
Master Redis
约定好,你的服务注册的key都是:service_ORDER,service_PRODUCT,scan扫描指定的前缀开头的所有的key,一次性把注册表里的几十个到几百个服务都给扫描出来,获取到一个完整的注册表
服务A
Slave Redis
每隔5秒刷新一次注册表的过期时间为30s
服务注册数据间隔30s后过期
服务B
每隔30秒查询一次Redis注册表
每隔30秒查询一次redis注册表
0 条评论
回复 删除
下一页