Last active
October 14, 2022 12:12
-
-
Save tdooner/53e62737af2c2a72f5d7 to your computer and use it in GitHub Desktop.
Sidekiq Redis Sentinel configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/sidekiq.rb | |
Sidekiq.configure_client do |config| # and repeat this inside a Sidekiq.configure_server | |
config.redis = { | |
master_name: 'your-master-name', | |
sentinels: [ | |
"sentinel://sentinel01.example.com:26379", | |
"sentinel://sentinel02.example.com:26379", | |
"sentinel://sentinel03.example.com:26379", | |
], | |
failover_reconnect_timeout: 20, # roughly 3-5 seconds longer than the sentinel failover-timeout | |
namespace: 'your-namespace', # optional | |
} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment