Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
37b43c8a
Commit
37b43c8a
authored
Nov 21, 2013
by
antirez
Browse files
Sentinel: example sentinel.conf updated.
parent
cc605368
Changes
1
Show whitespace changes
Inline
Side-by-side
sentinel.conf
View file @
37b43c8a
...
@@ -9,6 +9,10 @@ port 26379
...
@@ -9,6 +9,10 @@ port 26379
# Tells Sentinel to monitor this slave, and to consider it in O_DOWN
# Tells Sentinel to monitor this slave, and to consider it in O_DOWN
# (Objectively Down) state only if at least <quorum> sentinels agree.
# (Objectively Down) state only if at least <quorum> sentinels agree.
#
#
# Note that whatever is the ODOWN quorum, a Sentinel will require to
# be elected by the majority of the known Sentinels in order to
# start a failover, so no failover can be performed in minority.
#
# Note: master name should not include special characters or spaces.
# Note: master name should not include special characters or spaces.
# The valid charset is A-z 0-9 and the three characters ".-_".
# The valid charset is A-z 0-9 and the three characters ".-_".
sentinel
monitor
mymaster
127
.
0
.
0
.
1
6379
2
sentinel
monitor
mymaster
127
.
0
.
0
.
1
6379
2
...
@@ -42,11 +46,6 @@ sentinel monitor mymaster 127.0.0.1 6379 2
...
@@ -42,11 +46,6 @@ sentinel monitor mymaster 127.0.0.1 6379 2
# Default is 30 seconds.
# Default is 30 seconds.
sentinel
down
-
after
-
milliseconds
mymaster
30000
sentinel
down
-
after
-
milliseconds
mymaster
30000
# sentinel can-failover <master-name> <yes|no>
#
# Specify if this Sentinel can start the failover for this master.
sentinel
can
-
failover
mymaster
yes
# sentinel parallel-syncs <master-name> <numslaves>
# sentinel parallel-syncs <master-name> <numslaves>
#
#
# How many slaves we can reconfigure to point to the new slave simultaneously
# How many slaves we can reconfigure to point to the new slave simultaneously
...
@@ -57,19 +56,28 @@ sentinel parallel-syncs mymaster 1
...
@@ -57,19 +56,28 @@ sentinel parallel-syncs mymaster 1
# sentinel failover-timeout <master-name> <milliseconds>
# sentinel failover-timeout <master-name> <milliseconds>
#
#
# Specifies the failover timeout in milliseconds. When this time has elapsed
# Specifies the failover timeout in milliseconds. It is used in many ways:
# without any progress in the failover process, it is considered concluded by
#
# the sentinel even if not all the attached slaves were correctly configured
# - The time needed to re-start a failover after a previous failover was
# to replicate with the new master (however a "best effort" SLAVEOF command
# already tried against the same master by a given Sentinel, is two
# is sent to all the slaves before).
# times the failover timeout.
#
# - The time needed for a slave replicating to a wrong master according
# to a Sentinel currnet configuration, to be forced to replicate
# with the right master, is exactly the failover timeout (counting since
# the moment a Sentinel detected the misconfiguration).
#
#
# Also when 25% of this time has elapsed without any advancement, and there
# - The time needed to cancel a failover that is already in progress but
# is a leader switch (the sentinel did not started the failover but is now
# did not produced any configuration change (SLAVEOF NO ONE yet not
# elected as leader), the sentinel will continue the failover doing a
# acknowledged by the promoted slave).
# "takeover".
#
#
# Default is 15 minutes.
# - The maximum time a failover in progress waits for all the slaves to be
sentinel
failover
-
timeout
mymaster
900000
# reconfigured as slaves of the new master. However even after this time
# the slaves will be reconfigured by the Sentinels anyway, but not with
# the exact parallel-syncs progression as specified.
#
# Default is 3 minutes.
sentinel
failover
-
timeout
mymaster
180000
# SCRIPTS EXECUTION
# SCRIPTS EXECUTION
#
#
...
@@ -114,32 +122,20 @@ sentinel failover-timeout mymaster 900000
...
@@ -114,32 +122,20 @@ sentinel failover-timeout mymaster 900000
#
#
# sentinel client-reconfig-script <master-name> <script-path>
# sentinel client-reconfig-script <master-name> <script-path>
#
#
# When the
failover starts, ends, or is aborted,
a script can be called in
# When the
master changed because of a failover
a script can be called in
# order to perform application-specific tasks to notify the clients that the
# order to perform application-specific tasks to notify the clients that the
# configuration has changed and the master is at a different address.
# configuration has changed and the master is at a different address.
#
#
# The script is called in the following cases:
#
# Failover started (a slave is already promoted)
# Failover finished (all the additional slaves already reconfigured)
# Failover aborted (in that case the script was previously called when the
# failover started, and now gets called again with swapped
# addresses).
#
# The following arguments are passed to the script:
# The following arguments are passed to the script:
#
#
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port>
# <master-name> <role> <state> <from-ip> <from-port> <to-ip> <to-port>
#
#
# <state> is
"start", "end" or "abort
"
# <state> is
currently always "failover
"
# <role> is either "leader" or "observer"
# <role> is either "leader" or "observer"
#
#
# The arguments from-ip, from-port, to-ip, to-port are used to communicate
# The arguments from-ip, from-port, to-ip, to-port are used to communicate
# the old address of the master and the new address of the elected slave
# the old address of the master and the new address of the elected slave
# (now a master) in the case state is "start" or "end".
# (now a master).
#
# For abort instead the "from" is the address of the promoted slave and
# "to" is the address of the original master address, since the failover
# was aborted.
#
#
# This script should be resistant to multiple invocations.
# This script should be resistant to multiple invocations.
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment