【问题标题】:spring security redis token store in clustered redis集群redis中的spring security redis令牌存储
【发布时间】:2017-03-21 18:46:03
【问题描述】:

我正在尝试部署一个 spring-security 服务器,使用 Redis 作为令牌存储。 为了在 Redis 中有一些冗余,我们希望将其部署为集群。 问题是spring security作为底层库使用的jedis,集群模式下不支持pipelining,但是spring security使用的是pipelining。 我的问题是如何解决这种情况。更准确地说:

1- 我应该使用 Redis 的另一种部署模式吗?什么实际上有效。 2- 我可以以某种方式强制 Spring Security 使用 reddison 连接到 Resid 吗?

请注意。

【问题讨论】:

    标签: spring redis spring-security-oauth2


    【解决方案1】:

    如果您想要冗余,请使用复制(主/从)而不是集群。

    如果机器上的数据多于 RAM,请使用集群。

    如果您的机器上的数据多于 RAM 并且需要冗余,请使用具有复制功能的集群。

    Jedis 支持使用 sentinel 进行复制,因此除非您有大量数据,否则请尝试一下。更多关于使用的信息:https://github.com/xetorthio/jedis/issues/725

    【讨论】:

      猜你喜欢
      • 2016-02-18
      • 2020-06-12
      • 2017-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-15
      相关资源
      最近更新 更多