From ccdfbdab2c3207cf6091627cd6f97c532cd88ed3 Mon Sep 17 00:00:00 2001 From: Chris Croome <chris@webarchitects.co.uk> Date: Wed, 12 Feb 2025 18:12:37 +0000 Subject: [PATCH] fix template config --- tasks/instance_present.yml | 2 +- templates/valkey.conf.j2 | 70 +++++++++++++++++++------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/tasks/instance_present.yml b/tasks/instance_present.yml index 13c7e80..f3d0a3c 100644 --- a/tasks/instance_present.yml +++ b/tasks/instance_present.yml @@ -125,7 +125,7 @@ owner: valkey group: valkey mode: "0600" - diff: false + # diff: false register: valkey_instance_config_templated - name: Debug valkey_instance_config_templated diff --git a/templates/valkey.conf.j2 b/templates/valkey.conf.j2 index b37506b..bfd9c5d 100644 --- a/templates/valkey.conf.j2 +++ b/templates/valkey.conf.j2 @@ -428,8 +428,8 @@ set-proc-title yes # proc-title-template "{title} {listen-addr} {server-mode}" -# Set the local environment which is used for string comparison operations, and -# also affect the performance of Lua scripts. Empty String indicates the locale +# Set the local environment which is used for string comparison operations, and +# also affect the performance of Lua scripts. Empty String indicates the locale # is derived from the environment variables. locale-collate "" @@ -686,13 +686,13 @@ repl-diskless-sync-max-replicas 0 # replication history. # Note that this requires sufficient memory, if you don't have it, # you risk an OOM kill. -# "on-empty-db" - Use diskless load only when current dataset is empty. This is +# "on-empty-db" - Use diskless load only when current dataset is empty. This is # safer and avoid having old and new dataset loaded side by side # during replication. repl-diskless-load disabled -# This dual channel replication sync feature optimizes the full synchronization process -# between a primary and its replicas. When enabled, it reduces both memory and CPU load +# This dual channel replication sync feature optimizes the full synchronization process +# between a primary and its replicas. When enabled, it reduces both memory and CPU load # on the primary server. # # How it works: @@ -700,12 +700,12 @@ repl-diskless-load disabled # the data is sent directly to the syncing replica. # 2. The primary's background save (bgsave) process streams the RDB snapshot directly # to the replica over a separate connection. -# +# # Tradeoff: -# While this approach reduces load on the primary, it shifts the burden of storing -# the replication buffer to the replica. This means the replica must have sufficient -# memory to accommodate the buffer during synchronization. However, this tradeoff is -# generally beneficial as it prevents potential performance degradation on the primary +# While this approach reduces load on the primary, it shifts the burden of storing +# the replication buffer to the replica. This means the replica must have sufficient +# memory to accommodate the buffer during synchronization. However, this tradeoff is +# generally beneficial as it prevents potential performance degradation on the primary # server, which is typically handling more critical operations. # # When toggling this configuration on or off during an ongoing synchronization process, @@ -792,7 +792,7 @@ replica-priority 100 # The propagation error behavior controls how the server will behave when it is # unable to handle a command being processed in the replication stream from a primary # or processed while reading from an AOF file. Errors that occur during propagation -# are unexpected, and can cause data inconsistency. +# are unexpected, and can cause data inconsistency. # # If an application wants to ensure there is no data divergence, this configuration # should be set to 'panic' instead. The value can also be set to 'panic-on-replicas' @@ -965,10 +965,10 @@ replica-priority 100 # commands. For instance ~* allows all the keys. The pattern # is a glob-style pattern like the one of KEYS. # It is possible to specify multiple patterns. -# %R~<pattern> Add key read pattern that specifies which keys can be read +# %R~<pattern> Add key read pattern that specifies which keys can be read # from. # %W~<pattern> Add key write pattern that specifies which keys can be -# written to. +# written to. # allkeys Alias for ~* # resetkeys Flush the list of allowed keys patterns. # &<pattern> Add a glob-style pattern of Pub/Sub channels that can be @@ -995,10 +995,10 @@ replica-priority 100 # allchannels (if acl-pubsub-default is set), off, clearselectors, -@all. # The user returns to the same state it has immediately after its creation. # (<options>) Create a new selector with the options specified within the -# parentheses and attach it to the user. Each option should be -# space separated. The first character must be ( and the last +# parentheses and attach it to the user. Each option should be +# space separated. The first character must be ( and the last # character must be ). -# clearselectors Remove all of the currently attached selectors. +# clearselectors Remove all of the currently attached selectors. # Note this does not change the "root" user permissions, # which are the permissions directly applied onto the # user (outside the parentheses). @@ -1024,7 +1024,7 @@ replica-priority 100 # Basically ACL rules are processed left-to-right. # # The following is a list of command categories and their meanings: -# * keyspace - Writing or reading from keys, databases, or their metadata +# * keyspace - Writing or reading from keys, databases, or their metadata # in a type agnostic way. Includes DEL, RESTORE, DUMP, RENAME, EXISTS, DBSIZE, # KEYS, EXPIRE, TTL, FLUSHALL, etc. Commands that may modify the keyspace, # key or metadata will also have `write` category. Commands that only read @@ -1342,7 +1342,7 @@ lazyfree-lazy-user-flush yes # # By default threading is disabled, we suggest enabling it only in machines # that have at least 3 or more cores, leaving at least one spare core. -# We also recommend using threaded I/O only if you actually have performance problems, with +# We also recommend using threaded I/O only if you actually have performance problems, with # instances being able to use a quite big percentage of CPU time, otherwise # there is no point in using this feature. # @@ -1355,7 +1355,7 @@ lazyfree-lazy-user-flush yes # Setting io-threads to 1 will just use the main thread as usual. # When I/O threads are enabled, we use threads for reads and writes, that is # to thread the write and read syscall and transfer the client buffers to the -# socket and to enable threading of reads and protocol parsing. +# socket and to enable threading of reads and protocol parsing. # # When multiple commands are parsed by the I/O threads and ready for execution, # we take advantage of knowing the next set of commands and prefetch their @@ -1655,8 +1655,8 @@ aof-timestamp-enabled no # # cluster-node-timeout 15000 -# 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 +# 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-port 0 @@ -1793,12 +1793,12 @@ aof-timestamp-enabled no # PubSub message by default. (client-query-buffer-limit default value is 1gb) # # cluster-link-sendbuf-limit 0 - -# Clusters can configure their announced hostname using this config. This is a common use case for + +# Clusters can configure their announced hostname using this config. This is a common use case for # applications that need to use TLS Server Name Indication (SNI) or dealing with DNS based # routing. By default this value is only shown as additional metadata in the CLUSTER SLOTS -# command, but can be changed using 'cluster-preferred-endpoint-type' config. This value is -# communicated along the clusterbus to all nodes, setting it to an empty string will remove +# command, but can be changed using 'cluster-preferred-endpoint-type' config. This value is +# communicated along the clusterbus to all nodes, setting it to an empty string will remove # the hostname and also propagate the removal. # # cluster-announce-hostname "" @@ -1812,20 +1812,20 @@ aof-timestamp-enabled no # a user defined hostname, or by declaring they have no endpoint. Which endpoint is # shown as the preferred endpoint is set by using the cluster-preferred-endpoint-type # config with values 'ip', 'hostname', or 'unknown-endpoint'. This value controls how -# the endpoint returned for MOVED/ASKING requests as well as the first field of CLUSTER SLOTS. -# If the preferred endpoint type is set to hostname, but no announced hostname is set, a '?' +# the endpoint returned for MOVED/ASKING requests as well as the first field of CLUSTER SLOTS. +# If the preferred endpoint type is set to hostname, but no announced hostname is set, a '?' # will be returned instead. # # When a cluster advertises itself as having an unknown endpoint, it's indicating that -# the server doesn't know how clients can reach the cluster. This can happen in certain -# networking situations where there are multiple possible routes to the node, and the +# the server doesn't know how clients can reach the cluster. This can happen in certain +# networking situations where there are multiple possible routes to the node, and the # server doesn't know which one the client took. In this case, the server is expecting # the client to reach out on the same endpoint it used for making the last request, but use # the port provided in the response. # # cluster-preferred-endpoint-type ip -# The cluster blacklist is used when removing a node from the cluster completely. +# The cluster blacklist is used when removing a node from the cluster completely. # When CLUSTER FORGET is called for a node, that node is put into the blacklist for # some time so that when gossip messages are received from other nodes that still # remember it, it is not re-added. This gives time for CLUSTER FORGET to be sent to @@ -1835,12 +1835,12 @@ aof-timestamp-enabled no # # cluster-blacklist-ttl 60 -# Clusters can be configured to track per-slot resource statistics, +# Clusters can be configured to track per-slot resource statistics, # which are accessible by the CLUSTER SLOT-STATS command. # # 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. -# These statistics can be leveraged to assess general slot usage trends, identify hot / cold slots, +# These statistics can be leveraged to assess general slot usage trends, identify hot / cold slots, # migrate slots for a balanced cluster workload, and / or re-write application logic to better utilize slots. # # cluster-slot-stats-enabled no @@ -2166,7 +2166,7 @@ client-output-buffer-limit pubsub 32mb 8mb 60 # errors or data eviction. To avoid this we can cap the accumulated memory # used by all client connections (all pubsub and normal clients). Once we # reach that limit connections will be dropped by the server freeing up -# memory. The server will attempt to drop the connections using the most +# memory. The server will attempt to drop the connections using the most # memory first. We call this mechanism "client eviction". # # Client eviction is configured using the maxmemory-clients setting as follows: @@ -2293,11 +2293,11 @@ rdb-save-incremental-fsync yes # Adjusting this to a larger number can slightly improve efficiency for new connections # at the risk of causing timeouts for regular commands on established connections. It is # not advised to change this without ensuring that all clients have limited connection -# pools and exponential backoff in the case of command/connection timeouts. +# pools and exponential backoff in the case of command/connection timeouts. # # If your application is establishing a large number of new connections per second you should # also consider tuning the value of tcp-backlog, which allows the kernel to buffer more -# pending connections before dropping or rejecting connections. +# pending connections before dropping or rejecting connections. # # max-new-connections-per-cycle 10 # max-new-tls-connections-per-cycle 1 -- GitLab