我使用 redis gem 包,从 redis 文档中看到提供 sentinel 的支持,其中其配置如下 (link:https://github.com/redis/redis-rb)
SENTINELS = [{:host => "127.0.0.1", :port => 26380},
{:host => "127.0.0.1", :port => 26381}]
redis = Redis.new(:url => "redis://mymaster", :sentinels => SENTINELS, :role => :master)
但是根据上述配置,返回的 redis 是 nil,不知道哪里有问题,还望各位大牛指教?