Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d2948bb

Browse files
committed
cleanup redis
1 parent a447d5f commit d2948bb

File tree

1 file changed

+50
-45
lines changed

1 file changed

+50
-45
lines changed

redis/docker-compose.yml

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ services:
2626
- 6379:6379/tcp
2727
#environment:
2828
command: >
29-
--slaveof 10.0.0.2 6379
29+
# Require clients to issue AUTH <PASSWORD> before processing any other commands.
3030
--requirepass changeme
3131
3232
# By default, if no "bind" configuration directive is specified, Redis listens for connections from all the
33-
# network interfaces available on the server.
33+
# network interfaces available on the server.
3434
--bind 0.0.0.0
3535
# Accept connections on the specified port, default is 6379 (IANA #815344).
3636
--port 6379
37+
# Set the max number of connected clients at the same time.
38+
#--maxclients 10000
39+
3740
# Protected mode is a layer of security protection. By default protected mode is enabled.
3841
--protected-mode yes
3942
@@ -92,6 +95,7 @@ services:
9295
# The working directory. The DB and Append Only File will be written inside this directory.
9396
--dir ./
9497
98+
9599
################################# REPLICATION #################################
96100
97101
# Master-Slave replication. Use slaveof to make a Redis instance a copy of
@@ -128,7 +132,7 @@ services:
128132
# an error "SYNC with master in progress" to all the kind of commands
129133
# but to INFO and SLAVEOF.
130134
#
131-
slave-serve-stale-data yes
135+
#slave-serve-stale-data yes
132136
133137
# You can configure a slave instance to accept writes or not. Writing against
134138
# a slave instance may be useful to store some ephemeral data (because data
@@ -144,7 +148,7 @@ services:
144148
# such as CONFIG, DEBUG, and so forth. To a limited extent you can improve
145149
# security of read only slaves using 'rename-command' to shadow all the
146150
# administrative / dangerous commands.
147-
slave-read-only yes
151+
#slave-read-only yes
148152
149153
# Replication SYNC strategy: disk or socket.
150154
#
@@ -175,7 +179,7 @@ services:
175179
#
176180
# With slow disks and fast (large bandwidth) networks, diskless replication
177181
# works better.
178-
repl-diskless-sync no
182+
#repl-diskless-sync no
179183
180184
# When diskless replication is enabled, it is possible to configure the delay
181185
# the server waits in order to spawn the child that transfers the RDB via socket
@@ -187,7 +191,7 @@ services:
187191
#
188192
# The delay is specified in seconds, and by default is 5 seconds. To disable
189193
# it entirely just set it to 0 seconds and the transfer will start ASAP.
190-
repl-diskless-sync-delay 5
194+
#repl-diskless-sync-delay 5
191195
192196
# Slaves send PINGs to server in a predefined interval. It's possible to change
193197
# this interval with the repl_ping_slave_period option. The default value is 10
@@ -220,7 +224,7 @@ services:
220224
# By default we optimize for low latency, but in very high traffic conditions
221225
# or when the master and slaves are many hops away, turning this to "yes" may
222226
# be a good idea.
223-
repl-disable-tcp-nodelay no
227+
#repl-disable-tcp-nodelay no
224228
225229
# Set the replication backlog size. The backlog is a buffer that accumulates
226230
# slave data when slaves are disconnected for some time, so that when a slave
@@ -261,7 +265,7 @@ services:
261265
# Redis Sentinel for promotion.
262266
#
263267
# By default the priority is 100.
264-
slave-priority 100
268+
#slave-priority 100
265269
266270
# It is possible for a master to stop accepting writes if there are less than
267271
# N slaves connected, having a lag less or equal than M seconds.
@@ -315,12 +319,6 @@ services:
315319
# slave-announce-port 1234
316320
317321
318-
# Require clients to issue AUTH <PASSWORD> before processing any other commands.
319-
requirepass changeme
320-
321-
# Set the max number of connected clients at the same time.
322-
#maxclients 10000
323-
324322
############################## MEMORY MANAGEMENT ################################
325323
326324
# Set a memory usage limit to the specified amount of bytes.
@@ -390,6 +388,7 @@ services:
390388
#
391389
# maxmemory-samples 5
392390
391+
393392
############################# LAZY FREEING ####################################
394393
395394
# Redis has two primitives to delete keys. One is called DEL and is a blocking
@@ -434,10 +433,11 @@ services:
434433
# in order to instead release memory in a non-blocking way like if UNLINK
435434
# was called, using the following configuration directives:
436435
437-
lazyfree-lazy-eviction no
438-
lazyfree-lazy-expire no
439-
lazyfree-lazy-server-del no
440-
slave-lazy-flush no
436+
#lazyfree-lazy-eviction no
437+
#lazyfree-lazy-expire no
438+
#lazyfree-lazy-server-del no
439+
#slave-lazy-flush no
440+
441441
442442
############################## APPEND ONLY MODE ###############################
443443
@@ -459,11 +459,11 @@ services:
459459
#
460460
# Please check http://redis.io/topics/persistence for more information.
461461
462-
appendonly no
462+
#appendonly no
463463
464464
# The name of the append only file (default: "appendonly.aof")
465465
466-
appendfilename "appendonly.aof"
466+
#appendfilename "appendonly.aof"
467467
468468
# The fsync() call tells the Operating System to actually write data on disk
469469
# instead of waiting for more data in the output buffer. Some OS will really flush
@@ -489,7 +489,7 @@ services:
489489
# If unsure, use "everysec".
490490
491491
# appendfsync always
492-
appendfsync everysec
492+
#appendfsync everysec
493493
# appendfsync no
494494
495495
# When the AOF fsync policy is set to always or everysec, and a background
@@ -511,7 +511,7 @@ services:
511511
# If you have latency problems turn this to "yes". Otherwise leave it as
512512
# "no" that is the safest pick from the point of view of durability.
513513
514-
no-appendfsync-on-rewrite no
514+
#no-appendfsync-on-rewrite no
515515
516516
# Automatic rewrite of the append only file.
517517
# Redis is able to automatically rewrite the log file implicitly calling
@@ -530,8 +530,8 @@ services:
530530
# Specify a percentage of zero in order to disable the automatic AOF
531531
# rewrite feature.
532532
533-
auto-aof-rewrite-percentage 100
534-
auto-aof-rewrite-min-size 64mb
533+
#auto-aof-rewrite-percentage 100
534+
#auto-aof-rewrite-min-size 64mb
535535
536536
# An AOF file may be found to be truncated at the end during the Redis
537537
# startup process, when the AOF data gets loaded back into memory.
@@ -555,7 +555,7 @@ services:
555555
# the server will still exit with an error. This option only applies when
556556
# Redis will try to read more data from the AOF file but not enough bytes
557557
# will be found.
558-
aof-load-truncated yes
558+
#aof-load-truncated yes
559559
560560
# When rewriting the AOF file, Redis is able to use an RDB preamble in the
561561
# AOF file for faster rewrites and recoveries. When this option is turned
@@ -569,7 +569,8 @@ services:
569569
#
570570
# This is currently turned off by default in order to avoid the surprise
571571
# of a format change, but will at some point be used as the default.
572-
aof-use-rdb-preamble no
572+
#aof-use-rdb-preamble no
573+
573574
574575
################################ LUA SCRIPTING ###############################
575576
@@ -587,7 +588,8 @@ services:
587588
# termination of the script.
588589
#
589590
# Set it to 0 or a negative value for unlimited execution without warnings.
590-
lua-time-limit 5000
591+
#lua-time-limit 5000
592+
591593
592594
################################ REDIS CLUSTER ###############################
593595
#
@@ -730,6 +732,7 @@ services:
730732
# cluster-announce-port 6379
731733
# cluster-announce-bus-port 6380
732734
735+
733736
################################## SLOW LOG ###################################
734737
735738
# The Redis Slow Log is a system to log queries that exceeded a specified
@@ -748,11 +751,12 @@ services:
748751
# The following time is expressed in microseconds, so 1000000 is equivalent
749752
# to one second. Note that a negative number disables the slow log, while
750753
# a value of zero forces the logging of every command.
751-
slowlog-log-slower-than 10000
754+
#slowlog-log-slower-than 10000
752755
753756
# There is no limit to this length. Just be aware that it will consume memory.
754757
# You can reclaim memory used by the slow log with SLOWLOG RESET.
755-
slowlog-max-len 128
758+
#slowlog-max-len 128
759+
756760
757761
################################ LATENCY MONITOR ##############################
758762
@@ -773,7 +777,8 @@ services:
773777
# impact, that while very small, can be measured under big load. Latency
774778
# monitoring can easily be enabled at runtime using the command
775779
# "CONFIG SET latency-monitor-threshold <milliseconds>" if needed.
776-
latency-monitor-threshold 0
780+
#latency-monitor-threshold 0
781+
777782
778783
############################# EVENT NOTIFICATION ##############################
779784
@@ -819,15 +824,15 @@ services:
819824
# By default all notifications are disabled because most users don't need
820825
# this feature and the feature has some overhead. Note that if you don't
821826
# specify at least one of K or E, no events will be delivered.
822-
notify-keyspace-events ""
827+
#notify-keyspace-events ""
823828
824829
############################### ADVANCED CONFIG ###############################
825830
826831
# Hashes are encoded using a memory efficient data structure when they have a
827832
# small number of entries, and the biggest entry does not exceed a given
828833
# threshold. These thresholds can be configured using the following directives.
829-
hash-max-ziplist-entries 512
830-
hash-max-ziplist-value 64
834+
#hash-max-ziplist-entries 512
835+
#hash-max-ziplist-value 64
831836
832837
# Lists are also encoded in a special way to save a lot of space.
833838
# The number of entries allowed per internal list node can be specified
@@ -842,7 +847,7 @@ services:
842847
# per list node.
843848
# The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size),
844849
# but if your use case is unique, adjust the settings as necessary.
845-
list-max-ziplist-size -2
850+
#list-max-ziplist-size -2
846851
847852
# Lists may also be compressed.
848853
# Compress depth is the number of quicklist ziplist nodes from *each* side of
@@ -858,20 +863,20 @@ services:
858863
# but compress all nodes between them.
859864
# 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail]
860865
# etc.
861-
list-compress-depth 0
866+
#list-compress-depth 0
862867
863868
# Sets have a special encoding in just one case: when a set is composed
864869
# of just strings that happen to be integers in radix 10 in the range
865870
# of 64 bit signed integers.
866871
# The following configuration setting sets the limit in the size of the
867872
# set in order to use this special memory saving encoding.
868-
set-max-intset-entries 512
873+
#set-max-intset-entries 512
869874
870875
# Similarly to hashes and lists, sorted sets are also specially encoded in
871876
# order to save a lot of space. This encoding is only used when the length and
872877
# elements of a sorted set are below the following limits:
873-
zset-max-ziplist-entries 128
874-
zset-max-ziplist-value 64
878+
#zset-max-ziplist-entries 128
879+
#zset-max-ziplist-value 64
875880
876881
# HyperLogLog sparse representation bytes limit. The limit includes the
877882
# 16 bytes header. When an HyperLogLog using the sparse representation crosses
@@ -885,7 +890,7 @@ services:
885890
# which is O(N) with the sparse encoding. The value can be raised to
886891
# ~ 10000 when CPU is not a concern, but space is, and the data set is
887892
# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
888-
hll-sparse-max-bytes 3000
893+
#hll-sparse-max-bytes 3000
889894
890895
# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
891896
# order to help rehashing the main Redis hash table (the one mapping top-level
@@ -905,7 +910,7 @@ services:
905910
#
906911
# use "activerehashing yes" if you don't have such hard requirements but
907912
# want to free memory asap when possible.
908-
activerehashing yes
913+
#activerehashing yes
909914
910915
# The client output buffer limits can be used to force disconnection of clients
911916
# that are not reading data from the server fast enough for some reason (a
@@ -940,9 +945,9 @@ services:
940945
# subscribers and slaves receive data in a push fashion.
941946
#
942947
# Both the hard or the soft limit can be disabled by setting them to zero.
943-
client-output-buffer-limit normal 0 0 0
944-
client-output-buffer-limit slave 256mb 64mb 60
945-
client-output-buffer-limit pubsub 32mb 8mb 60
948+
#client-output-buffer-limit normal 0 0 0
949+
#client-output-buffer-limit slave 256mb 64mb 60
950+
#client-output-buffer-limit pubsub 32mb 8mb 60
946951
947952
# Redis calls an internal function to perform many background tasks, like
948953
# closing connections of clients in timeout, purging expired keys that are
@@ -959,13 +964,13 @@ services:
959964
# The range is between 1 and 500, however a value over 100 is usually not
960965
# a good idea. Most users should use the default of 10 and raise this up to
961966
# 100 only in environments where very low latency is required.
962-
hz 10
967+
#hz 10
963968
964969
# When a child rewrites the AOF file, if the following option is enabled
965970
# the file will be fsync-ed every 32 MB of data generated. This is useful
966971
# in order to commit the file to the disk more incrementally and avoid
967972
# big latency spikes.
968-
aof-rewrite-incremental-fsync yes
973+
#aof-rewrite-incremental-fsync yes
969974
970975
# Redis LFU eviction (see maxmemory setting) can be tuned. However it is a good
971976
# idea to start with the default settings and only change them after investigating

0 commit comments

Comments
 (0)