REDIS HA Configuration

32 views
Skip to first unread message

Eric Fetzer

unread,
Sep 7, 2021, 2:19:00 PM9/7/21
to Redis DB
Hi all,

So in my little test setup to play around with HA, I just set it up with minimal configuration.  On the primary server, I used the following config:


# Create a strong password here
requirepass "a_strong_password"

# AUTH password of the primary instance in case this instance becomes a replica
masterauth "a_strong_password"

# Enable AOF file persistence
appendonly yes

# Choose a name for the AOF file
appendfilename "primary.aof"


And the replica config is:
# Port on which the replica should run
port 6379

# Address of the primary instance
replicaof <primaryIPaddress> 6379

# AUTH password of the primary instance
masterauth "a_strong_password"

# AUTH password for the replica instance
requirepass "a_strong_password"


I didn't have bind directives or anything and it worked.  Is that OK?  I guess it makes sense to me because the client has the ip addresses of the sentinels which connect to whichever is the primary at the time.  Wondering if I should be adding complete config files rather than these minimal configs?  Sorry, the config file redis comes with has a ton of settings in it and I want to make sure some of them aren't going to break my HA settings...  Thanks!
Reply all
Reply to author
Forward
0 new messages