From 792afb443211f190b3f8bea15e945661453fbddf Mon Sep 17 00:00:00 2001 From: ny0312 <49037844+ny0312@users.noreply.github.com> Date: Thu, 16 Dec 2021 21:56:59 -0800 Subject: Introduce memory management on cluster link buffers (#9774) Introduce memory management on cluster link buffers: * Introduce a new `cluster-link-sendbuf-limit` config that caps memory usage of cluster bus link send buffers. * Introduce a new `CLUSTER LINKS` command that displays current TCP links to/from peers. * Introduce a new `mem_cluster_links` field under `INFO` command output, which displays the overall memory usage by all current cluster links. * Introduce a new `total_cluster_links_buffer_limit_exceeded` field under `CLUSTER INFO` command output, which displays the accumulated count of cluster links freed due to `cluster-link-sendbuf-limit`. --- redis.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'redis.conf') diff --git a/redis.conf b/redis.conf index b2810996d..1350ac96d 100644 --- a/redis.conf +++ b/redis.conf @@ -1576,6 +1576,17 @@ lua-time-limit 5000 # # cluster-allow-reads-when-down no +# Cluster link send buffer limit is the limit on the memory usage of an individual +# cluster bus link's send buffer in bytes. Cluster links would be freed if they exceed +# this limit. This is to primarily prevent send buffers from growing unbounded on links +# toward slow peers (E.g. PubSub messages being piled up). +# This limit is disabled by default. Enable this limit when 'mem_cluster_links' INFO field +# and/or 'send-buffer-allocated' entries in the 'CLUSTER LINKS` command output continuously increase. +# Minimum limit of 1gb is recommended so that cluster link buffer can fit in at least a single +# PubSub message by default. (client-query-buffer-limit default value is 1gb) +# +# cluster-link-sendbuf-limit 0 + # In order to setup your cluster make sure to read the documentation # available at https://redis.io web site. -- cgit v1.2.1