Newer
Older
# Copyright 2025 Chris Croome
#
# This file is part of the Webarchitects Valkey Ansible role.
#
# The Webarchitects Valkey Ansible role is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
#
# The Webarchitects Valkey Ansible role is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with the Webarchitects Valkey Ansible role. If not, see <https://www.gnu.org/licenses/>.
---
argument_specs:
main:
author: Chris Croome
description: Ansible role for installing and configuring nftables on Debian.
short_description: The main entry point for the Valkey role.
options:
valkey:
type: bool
required: true
description: Run the tasks in this role.
valkey_apt_backports:
type: str
required: true
description: String that will be present in the apt cache policy when backports are enabled.
elements: dict
required: true
description: A list of Valkey instances and their configuration.
config_file:
type: str
required: true
description: The path to the valkey instance configuration file.
state:
type: str
required: true
choices:
- absent
- enabled
description: The state of the Valkey instance.
config:
type: dict
required: false
description: A dictionary of keys and values for the Valkey configuration.
options:
include:
type: list
elements: str
description: Include one or more other config files.
required: false
loadmodule:
type: list
elements: str
description: Load modules at startup.
required: false
bind:
type: str
required: false
description: One or more IP addresses that the instance should bind to, each address can be prefixed by "-", which means that the server will not fail to start if the address is not available.
bind_source_addr:
type: str
required: false
description: Configure a specific address to bind to.
protected_mode:
type: bool
required: false
description: When protected mode is on and the default user has no password, the server only accepts local connections from the IPv4 address (127.0.0.1), IPv6 address (::1) or Unix domain sockets.
tcp_backlog:
description: In high requests-per-second environments you need a high backlog in order to avoid slow clients connection issues.
enable_protected_configs:
type: str
choices:
- "local"
- "no"
- "yes"
required: false
description: Enable protected configs.
enable_debug_command:
type: str
choices:
- "local"
- "no"
- "yes"
required: false
description: Enable debug command.
enable_module_command:
type: str
choices:
- "local"
- "no"
- "yes"
required: false
description: Enable module command.
port:
type: list
elements: int
required: true
description: A list of port numbers to accept connections on, the default is 6379. If port 0 is specified the server will not listen on a TCP socket.
unixsocket:
type: str
required: false
description: The path for the Unix socket that will be used to listen for incoming connections. There is no default, so the server will not listen on a unix socket when not specified.
unixsocketgroup:
type: str
required: false
description: UNIX socket group.
unixsocketperm:
type: int
required: false
description: The Unix socket octal permissions, default 700.
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
socket_mark_id:
type: int
required: false
description: The ID represents a connection mark. The default value is 0, which implies no marking is required.
tls_port:
type: str
required: false
description: TLS port.
tls_cert_file:
type: str
required: false
description: TLS cert file.
tls_key_file:
type: str
required: false
description: TLS key file.
tls_key_file_pass:
type: str
required: false
description: TLS key file password.
tls_client_cert_file:
type: str
required: false
description: TLS client cert file.
tls_client_key_file:
type: str
required: false
description: TLS client key file.
tls_client_key_file_pass:
type: str
required: false
description: TLS client key file password.
tls_dh_params_file:
type: str
required: false
description: TLS DH params file.
tls_ca_cert_file:
type: str
required: false
description: TLS CA cert file.
tls_ca_cert_dir:
type: str
required: false
description: TLS CA cert dirextory.
tls_auth_clients:
type: str
choices:
- "no"
- "optional"
required: false
description: TLS auth clients.
tls_replication:
type: bool
required: false
description: TLS replications.
tls_cluster:
type: bool
required: false
description: TLS cluster.
tls_protocols:
type: str
required: false
description: TLS protocols.
tls_ciphers:
type: str
required: false
description: TLS ciphers.
tls_ciphersuites:
type: str
required: false
description: TLS cipher suites.
tls_prefer_server_ciphers:
type: bool
required: false
description: TLS prefer server ciphers.
tls_session_caching:
type: bool
required: false
description: TLS session caching.
tls_session_cache_size:
type: int
required: false
description: TLS session cache size.
tls_session_cache_timeout:
type: int
required: false
description: TLS session cache timeout.
timeout:
type: int
required: false
description: Close the connection after a client is idle for N seconds (0 to disable).
tcp_keepalive:
type: int
required: false
description: On Linux, the specified value (in seconds) is the period used to send ACKs.
daemonize:
type: bool
required: false
description: When the server is supervised by upstart or systemd, this parameter has no impact.
dbfilename:
type: str
required: false
description: The filename where to dump the DB.
loglevel:
type: str
choices:
- debug
- nothing
- notice
- verbose
- warning
required: false
description: The loglevel.
logfile:
type: str
required: false
description: The log file path.
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
syslog_enabled:
type: bool
required: false
description: Enable logging to the system logger.
syslog_ident:
type: str
required: false
description: The syslog identity.
syslog_facility:
type: str
choices:
- user
- local0
- local1
- local2
- local3
- local4
- local5
- local6
- local7
crash_log_enabled:
type: bool
required: false
description: Disable the built in crash log.
crash_memcheck_enabled:
type: bool
required: false
description: Disable the fast memory check that's run as part of the crash log.
databases:
type: int
required: false
description: Set the number of databases.
always_show_logo:
type: bool
required: false
description: Show a ASCII art logo in startup logs.
hide_user_data_from_log:
type: bool
required: false
description: Prevent sensitive user information, such as PII, from being recorded in the server log file.
set_proc_title:
type: bool
required: false
description: Leave the process name as executed.
proc_title_template:
type: str
required: false
description: Process title template.
locale_collate:
type: str
required: false
description: Set the local environment which is used for string comparison operations. Empty String indicates the locale is derived from the environment variables.
extended_redis_compatibility:
type: bool
required: false
description: Extended Redis OSS compatibility mode makes Valkey pretend to be Redis.
save:
type: str
required: false
description: Save the DB to disk.
stop_writes_on_bgsave_error:
type: bool
required: false
description: By default the server will stop accepting writes if RDB snapshots are enabled (at least one save point) and the latest background save failed.
rdbcompression:
type: bool
required: false
description: Compress string objects using LZF when dump .rdb databases?
rdbchecksum:
type: bool
required: false
description: Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
sanitize_dump_payload:
type: str
choices:
- "clients"
- "no"
- "yes"
required: false
description: Enables or disables full sanitization checks for ziplist and listpack etc.
rdb_del_sync_files:
type: bool
required: false
description: Remove RDB files used by replication in instances without persistence enabled.
dir:
type: str
required: false
description: The DB will be written inside this directory, with the filename specified using the 'dbfilename' configuration directive.
replicaof:
type: str
required: false
description: Use replicaof to make a server a copy of another server.
primaryauth:
type: str
required: false
description: If the primary is password protected (using the "requirepass" configuration directive) it is possible to tell the replica to authenticate before starting the replication synchronization process, otherwise the primary will refuse the replica request.
primaryuser:
type: str
required: false
description: When primaryuser is specified, the replica will authenticate against its primary using the new AUTH form, AUTH <username> <password>.
replica_serve_stale_data:
type: bool
required: false
description: When a replica loses its connection with the primary, or when the replication is still in progress, the replica can act in two different ways.
replica_read_only:
type: bool
required: false
description: Read only replicas are not designed to be exposed to untrusted clients on the internet.
repl_diskless_sync:
type: bool
required: false
description: With slow disks and fast (large bandwidth) networks, diskless replication works better.
repl_diskless_sync_delay:
type: int
required: false
description: The delay is specified in seconds, and by default is 5 seconds. To disable it entirely just set it to 0 seconds and the transfer will start ASAP.
repl_diskless_sync_max_replicas:
type: int
required: true
description: When diskless replication is enabled with a delay, it is possible to let the replication start before the maximum delay is reached if the maximum number of replicas expected have connected. Default of 0 means that the maximum is not defined and the server will wait the full delay.
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
repl_diskless_load:
type: str
choices:
- disabled
- on-empty-db
- swapdb
required: false
description: Replica load mode.
dual_channel_replication_enabled:
type: bool
required: false
description: Dual channel replication sync.
repl_ping_replica_period:
type: int
required: false
description: Master send PINGs to its replicas in a predefined interval.
repl_timeout:
type: int
required: false
description: Replication timeout.
repl_disable_tcp_nodelay:
type: bool
required: false
description: Disable TCP_NODELAY on the replica socket after SYNC?
repl_backlog_size:
type: str
required: false
description: The replication backlog size.
repl_backlog_ttl:
type: int
required: false
description: The amount of seconds that need to elapse, starting from the time the last replica disconnected, for the backlog buffer to be freed.
replica_priority:
type: int
required: false
description: The replica priority is an integer number published by the server in the INFO output.
propagation_error_behavior:
type: str
choices:
- ignore
- panic
- panic-on-replicas
required: false
description: The propagation error behavior.
replica_announced:
type: bool
required: false
description: Exclude replica from Sentinel's announcements.
min_replicas_to_write:
type: int
required: false
description: By default min-replicas-to-write is set to 0 (feature disabled).
min_replicas_max_lag:
type: int
required: false
description: By default min-replicas-max-lag is set to 10.
replica_announce_ip:
description: IP address to be used by a replica for the "INFO replication" section and in the output of the "ROLE" command of a primary.
replica_announce_port:
type: int
required: false
description: Port to be used by a replica for the "INFO replication" section and in the output of the "ROLE" command of a primary.
tracking_table_max_keys:
type: int
required: false
description: If you set the value to 0, it means there are no limits, and the server will retain as many keys as needed in the invalidation table.
user:
type: list
elements: str
required: false
description: A list of ACL users and rules.
acllog_max_len:
type: int
required: false
description: Maximum entry length of the ACL Log.
aclfile:
type: str
required: false
description: External ACL file.
requirepass:
type: str
required: false
description: The instance default password.
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
acl_pubsub_default:
type: str
choices:
- allchannels
- resetchannels
required: false
description: Pub/Sub channels permission for new users.
rename_command:
type: list
elements: str
required: false
description: Deprecated option to change the name of dangerous commands.
maxclients:
type: int
required: false
description: The max number of connected clients at the same time, By default this limit is set to 10000 clients, however if the server is not able to configure the process file limit to allow for the specified limit the max number of allowed clients is set to the current file limit minus 32 (as the server reserves a few file descriptors for internal uses).
maxmemory:
type: int
required: false
description: Memory usage limit in bytes.
maxmemory_policy:
type: str
choices:
- allkeys-lfu
- allkeys-lru
- allkeys-random
- noeviction
- volatile-lfu
- volatile-lru
- volatile-random
- volatile-ttl
required: false
description: How the server will select what to remove when maxmemory is reached, the default is noeviction.
maxmemory_samples:
type: int
choices:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
required: false
description: The default of 5 produces good enough results. 10 Approximates very closely true LRU but costs more CPU. 3 is faster but not very accurate. The maximum value that can be set is 64.
maxmemory_eviction_tenacity:
type: int
choices:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
required: false
description: Default 10, If there is an unusually large amount of write traffic, this value may need to be increased.
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
replica_ignore_maxmemory:
type: bool
required: false
description: By default a replica will ignore its maxmemory setting.
active_expire_effort:
type: int
choices:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
required: false
description: It is possible to increase the expire effort that is normally set to 1, to a greater value, up to the value 10.
lazyfree_lazy_eviction:
type: bool
required: false
description: Lazyfree lazy eviction, the default value is yes.
lazyfree_lazy_expire:
type: bool
required: false
description: Lazyfree lazy expire, the default value is yes.
lazyfree_lazy_server_del:
type: bool
required: false
description: Lazyfree lazy server delete, the default value is yes.
replica_lazy_flush:
type: bool
required: false
description: Lazyfree lazy flush, the default value is yes.
lazyfree_lazy_user_del:
type: bool
required: false
description: Lazyfree lazy user delete, the default value is yes.
lazyfree_lazy_user_flush:
type: bool
required: false
description: Lazyfree lazy user flush, the default value is yes.
io_threads:
type: int
required: false
description: By default threading is disabled, enable only on machines that have at least 3 or more cores, leaving at least one spare core.
prefetch_batch_max_size:
type: int
required: false
description: The default batch size is 16, when set to 0, prefetching is disabled.
oom_score_adj:
type: str
choices:
- "no"
- "yes"
- absolute
- relative
required: false
description: The default is no, yes is the same as relative, with absolute oom-score-adj-values are written as is to the kernel.
oom_score_adj_values:
type: str
required: false
description: When oom-score-adj is used, this controls the specific values used for primary, replica and background child processes.
disable_thp:
type: bool
required: false
description: Usually the kernel Transparent Huge Pages control is set to madvise or or never by default, if you prefer to keep it enabled, you can set this config to no and the kernel global to always.
appendonly:
type: bool
required: false
description: The Append Only File is an alternative persistence mode that provides much better durability. Note that changing this value in a config file of an existing database and restarting the server can lead to data loss.
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
appendfilename:
type: str
required: false
description: The base name of the append only file. The default is appendonly.aof.
appenddirname:
type: str
required: false
description: The name of the directory for all persistent append-only files. Default appendonlydir.
appendfsync:
type: str
choices:
- always
- everysec
- "no"
description: The fsync() call tells the Operating System to actually write data on disk instead of waiting for more data in the output buffer. The default is everysec.
no_appendfsync_on_rewrite:
type: bool
required: false
description: When the AOF fsync policy is set to always or everysec, and a background saving process (a background save or AOF log background rewriting) is performing a lot of I/O against the disk, in some Linux configurations the server may block too long on the fsync() call. The default is no.
auto_aof_rewrite_percentage:
type: int
choices:
- 0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
- 94
- 95
- 96
- 97
- 98
- 99
- 100
required: false
description: The server is able to automatically rewrite the log file implicitly calling BGREWRITEAOF when the AOF log size grows by the specified percentage. Specify a percentage of zero in order to disable the automatic AOF rewrite feature.
auto_aof_rewrite_min_size:
type: str
required: false
description: A minimal size for the AOF file to be rewritten, this is useful to avoid rewriting the AOF file even if the percentage increase is reached but it is still pretty small.
aof_load_truncated:
type: bool
required: false
description: An AOF file may be found to be truncated at the end during the server startup process, either exit with an error when this happens, or load as much data as possible, The default is yes.
aof_use_rdb_preamble:
type: bool
required: false
description: The server can create append-only base files in either RDB or AOF formats. Using the RDB format is always faster and more efficient, the default is yes.
aof_timestamp_enabled:
type: bool
required: false
description: The server supports recording timestamp annotations in the AOF to support restoring the data from a specific point-in-time. However, using this capability changes the AOF format in a way that may not be compatible with existing AOF parsers. The default is no.
shutdown_timeout:
type: int
required: false
description: Maximum time to wait for replicas when shutting down, in seconds.
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
shutdown_on_sigint:
type: str
required: false
description: When the server receives a SIGINT shutdown is initiated. Options are Any combination of 'default', 'save', 'nosave', 'now' and 'force' as long as 'save' and 'nosave' are not set simultaneously.
shutdown_on_sigterm:
type: str
required: false
description: When the server receives a SIGTERM shutdown is initiated. Options are any combination of 'default', 'save', 'nosave', 'now' and 'force' as long as 'save' and 'nosave' are not set simultaneously.
lua_time_limit:
type: int
required: false
description: Maximum time in milliseconds for EVAL scripts, default 5000, set it to 0 to disable this mechanism (uninterrupted execution).
busy_reply_threshold:
type: int
required: false
description: Alias for lua-time-limit.
cluster_enabled:
type: bool
required: false
description: Normal server instances can't be part of a cluster; only nodes that are started as cluster nodes can. The default is false.
cluster_config_file:
type: str
required: false
description: Every cluster node has a cluster configuration file. Every cluster node requires a different cluster configuration file. Make sure that instances running in the same system do not have overlapping cluster configuration file names.
cluster_node_timeout:
type: int
required: false
description: Cluster node timeout is the amount of milliseconds a node must be unreachable for it to be considered in failure state.
cluster_port:
type: int
required: false
description: The cluster port is the port that the cluster bus will listen for inbound connections on. When set to the default value, 0, it will be bound to the command port + 10000. Setting this value requires you to specify the cluster bus port when executing cluster meet.
cluster_replica_validity_factor:
type: int
required: false
description: A replica of a failing primary will avoid to start a failover if its data looks too old. The default is 10.
cluster_migration_barrier:
type: int
required: false
description: Default is 1 (replicas migrate only if their primaries remain with at least one replica). To disable migration just set it to a very large value or set cluster-allow-replica-migration to 'no'. A value of 0 can be set but is useful only for debugging and dangerous in production.
cluster_allow_replica_migration:
type: bool
required: false
description: Turning off this option allows to use less automatic cluster configuration. Default is true (allow automatic migrations).
cluster_require_full_coverage:
type: bool
required: false
description: By default cluster nodes stop accepting queries if they detect there is at least a hash slot uncovered (no available node is serving it). The default id true.
cluster_replica_no_failover:
type: bool
required: false
description: This option, when set to true, prevents replicas from trying to failover its primary during primary failures. The default is false.
cluster_allow_reads_when_down:
type: bool
required: false
description: This is useful for two cases. The first case is for when an application doesn't require consistency of data during node failures or network partitions. The second use case is for configurations that don't meet the recommended three shards but want to enable cluster mode and scale later. The default is false.
cluster_allow_pubsubshard_when_down:
type: bool
required: false
description: This option, when set to true, allows nodes to serve pubsub shard traffic while the cluster is in a down state, as long as it believes it owns the slots. The default is true.
cluster_link_sendbuf_limit:
type: int
required: false
description: Cluster link send buffer limit is the limit on the memory usage of an individual cluster bus link's send buffer in bytes. This limit is disabled by default, set to a number greater than 0 to enable it.
cluster_announce_hostname:
type: int
required: false
description: Clusters can configure their announced hostname using this config. By default it is set to an empty string.
cluster_preferred_endpoint_type:
type: str
choices:
- hostname
- ip
- unknown-endpoint
required: false
description: Clusters can advertise how clients should connect to them using either their IP address, a user defined hostname, or by declaring they have no endpoint.
cluster_blacklist_ttl:
type: int
required: false
description: The blacklist TTL is 60 seconds by default, which should be sufficient for most clusters, but you may considering increasing this if you see nodes getting re-added while using CLUSTER FORGET.
cluster_slot_stats_enabled:
type: bool
required: false
description: By default, the 'cluster-slot-stats-enabled' is disabled, and only 'key-count' is captured. By enabling the 'cluster-slot-stats-enabled' config, the cluster will begin to capture advanced statistics.
cluster_announce_ip:
type: str
required: false
description: Cluster Docker / NAT setting. If cluster-announce-client-ipv4 and cluster-announce-client-ipv6 are omitted, then cluster-announce-ip is exposed to clients.
cluster_announce_client_ipv4:
type: str
required: false
description: Cluster Docker / NAT setting. Public IPv4 address.
cluster_announce_client_ipv6:
type: str
required: false
description: Cluster Docker / NAT setting. Public IPv6 address.
cluster_announce_tls_port:
type: int
required: false
description: Cluster Docker / NAT setting. If tls-cluster is set to yes and cluster-announce-tls-port is omitted or set to zero, then cluster-announce-port refers to the TLS port. Note also that cluster-announce-tls-port has no effect if tls-cluster is set to no.
cluster_announce_port:
type: int
required: false
description: Cluster Docker / NAT setting for cluster announce port.
cluster_announce_bus_port:
type: int
required: false
description: Cluster Docker / NAT setting. For cluster announce bus port.
slowlog_log_slower_than:
type: int
required: false
description: The server Slow Log is a system to log queries that exceeded a specified execution time. time is expressed in microseconds, so 1000000 is equivalent to one second. The default is 10000. Note that a negative number disables the slow log, while a value of zero forces the logging of every command.
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
slowlog_max_len:
type: int
required: false
description: There is no limit to this length. Just be aware that it will consume memory. Default 128.
latency_monitor_threshold:
type: int
required: false
description: The system only logs operations that were performed in a time equal or greater than the amount of milliseconds specified via the latency-monitor-threshold configuration directive. When its value is set to zero, the latency monitor is turned off. It defaults to zero.
latency_tracking:
type: bool
required: false
description: By default, the extended latency monitoring is enabled since the overhead of keeping track of the command latency is very small.
latency_tracking_info_percentiles:
type: str
required: false
description: By default the exported latency percentiles via the INFO latencystats command are the p50, p99, and p999.
notify_keyspace_events:
type: str
required: false
description: The server can notify Pub/Sub clients about events happening in the key space. This feature is documented at https://valkey.io/topics/notifications By default all notifications are disabled, the option is set to an empty string, because most users don't need this feature and the feature has some overhead.
hash_max_listpack_entries:
type: int
required: false
description: Hashes are encoded using a memory efficient data structure when they have a small number of entries, and the biggest entry does not exceed a given threshold. The default is 512.
hash_max_listpack_value:
type: int
required: false
description: Hashes are encoded using a memory efficient data structure when they have a small number of entries, and the biggest entry does not exceed a given threshold. The default is 64.
list_max_listpack_size:
type: str
required: false
description: he number of entries allowed per internal list node can be specified as a fixed maximum size or a maximum number of elements. For a fixed maximum size, use -5 through -1. Positive numbers mean store up to exactly that number of elements per list node. The default is -2 (max size 8 Kb).
list_compress_depth:
type: int
choices:
- 0
- 1
- 2
- 3
required: false
description: Compress depth is the number of quicklist ziplist nodes from each side of the list to exclude from compression. The default is 0, disable all list compression.
set_max_intset_entries:
type: int
required: false
description: Sets containing non-integer values are also encoded using a memory efficient data structure when they have a small number of entries, and the biggest entry does not exceed a given threshold. The default value is 128.
set_max_listpack_entries:
type: int
required: false
description: Sets containing non-integer values are also encoded using a memory efficient data structure when they have a small number of entries, and the biggest entry does not exceed a given threshold. The default value is 64.
set_max_listpack_value:
type: int
required: false
description: Sets containing non-integer values are also encoded using a memory efficient data structure when they have a small number of entries, and the biggest entry does not exceed a given threshold. The default value is 64.
zset_max_listpack_entries:
type: int
required: false
description: Similarly to hashes and lists, sorted sets are also specially encoded in order to save a lot of space. The default value is 128.
zset_max_listpack_value:
type: int
required: false
description: Similarly to hashes and lists, sorted sets are also specially encoded in order to save a lot of space. The default value is 64.
hll_sparse_max_bytes:
type: int
required: false
description: HyperLogLog sparse representation bytes limit. The default value is 3000.
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
stream_node_max_bytes:
type: int
required: false
description: Streams macro node max size, the default is 4096. When set to zero, the limit is ignored.
stream_node_max_entries:
type: int
required: false
description: Streams macro node max items, the default is 100. When set to zero, the limit is ignored.
activerehashing:
type: bool
required: false
description: Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in order to help rehashing the main server hash table (the one mapping top-level keys to values). The default is true.
client_output_buffer_limit:
type: list
elements: str
required: false
description: The client output buffer limits can be used to force disconnection of clients that are not reading data from the server fast enough for some reason (a common reason is that a Pub/Sub client can't consume messages as fast as the publisher can produce them). The limit can be set differently for the three different classes of clients, normal, replica and pubsub.
client_query_buffer_limit:
type: str
required: false
description: Client query buffers accumulate new commands. They are limited to a fixed amount by default in order to avoid that a protocol desynchronization (for instance due to a bug in the client) will lead to unbound memory usage in the query buffer. The commented default is 1gb.
maxmemory_clients:
type: str
required: false
description: A memory value can be used for the client eviction threshold, The commented default is 1g.
proto_max_bulk_len:
type: str
required: false
description: In the server protocol, bulk requests, that are, elements representing single strings, are normally limited to 512 mb. However you can change this limit here, but must be 1mb or greater.
hz:
type: int
required: false
description: The server calls an internal function to perform many background tasks, like closing connections of clients in timeout, purging expired keys that are never requested, and so forth. ot all tasks are performed with the same frequency, but the server checks for tasks to perform according to the specified "hz" value. The range is between 1 and 500, however a value over 100 is usually not a good idea. Most users should use the default of 10 and raise this up to 100 only in environments where very low latency is required.
dynamic_hz:
type: bool
required: false
description: Normally it is useful to have an HZ value which is proportional to the number of clients connected. Since the default HZ value by default is conservatively set to 10, the server offers, and enables by default, the ability to use an adaptive HZ value which will temporarily raise when there are many connected clients.
type: bool
required: false
description: When a child rewrites the AOF file, if the following option is enabled the file will be fsync-ed every 4 MB of data generated. This is useful in order to commit the file to the disk more incrementally and avoid big latency spikes.
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
rdb_save_incremental_fsync:
type: bool
required: false
description: When the server saves RDB file, if the following option is enabled the file will be fsync-ed every 4 MB of data generated. This is useful in order to commit the file to the disk more incrementally and avoid big latency spikes. The default is true.
lfu_log_factor:
type: int
required: false
description: The server's LFU eviction (see maxmemory setting) can be tuned. However it is a good idea to start with the default settings and only change them after investigating how to improve the performances and how the keys LFU change over time, which is possible to inspect via the OBJECT FREQ command. The default lfu-log-factor is 10.
lfu_decay_time:
type: int
required: false
description: The counter decay time is the time, in minutes, that must elapse in order for the key counter to be decremented. The default value for the lfu-decay-time is 1. A special value of 0 means we will never decay the counter.
max_new_connections_per_cycle:
type: int
required: false
description: The maximum number of new client connections accepted per event-loop cycle. By default, up to 10 new connection will be accepted per event-loop cycle for normal connections.
max_new_tls_connections_per_cycle:
type: int
required: false
description: The maximum number of new TLS connections accepted per event-loop cycle. By default up to 1 new connection per event-loop cycle for TLS connections.
activedefrag:
type: bool
required: false
description: Active (online) defragmentation allows a server to compact the spaces left between small allocations and deallocations of data in memory, thus allowing to reclaim back memory. Active defragmentation is disabled by default.
active_defrag_ignore_bytes:
type: int
required: false
description: Minimum amount of fragmentation waste to start active defrag.
active_defrag_threshold_lower:
type: int
required: false
description: Minimum percentage of fragmentation to start active defrag.
active_defrag_threshold_upper:
type: int
required: false
description: Maximum percentage of fragmentation at which we use maximum effort.
active_defrag_cycle_min:
type: int
required: false
description: Minimal effort for defrag in CPU percentage, to be used when the lower threshold is reached.
active_defrag_cycle_max:
type: int
required: false
description: Maximal effort for defrag in CPU percentage, to be used when the upper threshold is reached.
active_defrag_max_scan_fields:
type: int
required: false
description: Maximum number of set/hash/zset/list fields that will be processed from the main dictionary scan.
jemalloc_bg_thread:
type: bool
required: false
description: Jemalloc background thread for purging will be enabled by default.
server_cpulist:
type: str
required: false
description: It is possible to pin different threads and processes of the server to specific CPUs in your system, in order to maximize the performances of the server. You can pin the server/IO threads, bio threads, aof rewrite child process, and the bgsave child process.
bio_cpulist:
type: str
required: false
description: Unset by deafult.
aof_rewrite_cpulist:
type: str
required: false
description: Set aof rewrite child process to cpu affinity, unset by deafult.
bgsave_cpulist:
type: str
required: false
description: Set bgsave child process to cpu affinity, unset by deafult.
ignore_warnings:
type: str
required: false
description: In some cases the server will emit warnings and even refuse to start if it detects that the system is in bad state, it is possible to suppress these warnings by setting the following config which takes a space delimited list of warnings to suppress.
availability_zone:
type: str
required: false
description: Inform Valkey of the availability zone if running in a cloud environment. Currently this is only exposed via the info command for clients to use, but in the future we we may also use this when making decisions for replication.
pidfile:
type: str
required: false
description: Path to the pid file.
valkey_enabled:
type: bool
required: true
description: Enable and start Valkey.
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
valkey_jpq:
type: dict
required: true
description: A dictionary of JMESPath query strings.
options:
pkgs_absent:
type: str
required: true
description: JMESPath query string for the packages absent.
pkgs_present:
type: str
required: true
description: JMESPath query string for the packages present.
pkgs_present_backports:
type: str
required: true
description: JMESPath query string for the backports packages present.
service:
type: str
required: true
description: JMESPath query string for the Valkey service.
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
valkey_pkgs:
type: list
elements: dict
required: true
description: A list of distros and deb packages that should be absent and present.
options:
name:
type: str
required: true
description: The Linux distro name.
choices:
- bookworm
- noble
- trixie
pkgs_absent:
type: list
required: false
description: A list of deb packages that should be absent.
pkgs_present:
type: list
required: false
description: A list of deb packages that should be present.
pkgs_present_backports:
type: list
description: A list of deb packages that should be present from backports.
valkey_protected_configs:
type: list
required: false
description: A list of Valkey config to be editing using lineinfile.
valkey_verify:
type: bool
required: true
description: Use the argument specification to verify the variables that start with valkey_.