From c28d1ebfa092013978c845a3444d8dc27b563189 Mon Sep 17 00:00:00 2001 From: Alexander Bogdanov Date: Thu, 6 Feb 2020 19:48:24 +0100 Subject: [PATCH 1/3] Adding note on raft log size --- nats-streaming-server/configuring/storelimits.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nats-streaming-server/configuring/storelimits.md b/nats-streaming-server/configuring/storelimits.md index 83c4f5c..be2cf9d 100644 --- a/nats-streaming-server/configuring/storelimits.md +++ b/nats-streaming-server/configuring/storelimits.md @@ -138,3 +138,8 @@ On startup, the server will apply the store limits, which means that this channe We strongly recommend not raising the limit back to the higher limit if messages have been removed in the previous step because those removed messages may or may not become available again depending on the store implementation or if running in clustering mode or not. +## Clustering +When running --clustered, messages are kept in RAFT consensus log file (under --cluster_log_path) in addition to the configured store. +This directory will grow as more messages keep coming within the 2-4 minute intervals of RAFT Snapshotting. +After snapshotting - the RAFT log will not shrink, but the space for more messages will be allocated internally. +As a result - in addition to max_bytes multiplied by max_channels - disk space needs to be provisioned for RAFT Log, which can grow up to the size of payloads that channels could receive per minute * 4. From 0c9faaa484c1006ef3635fb7cc0041302e12849b Mon Sep 17 00:00:00 2001 From: Alexander Bogdanov Date: Thu, 6 Feb 2020 19:50:46 +0100 Subject: [PATCH 2/3] Update storelimits.md --- nats-streaming-server/configuring/storelimits.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nats-streaming-server/configuring/storelimits.md b/nats-streaming-server/configuring/storelimits.md index be2cf9d..b1ce46a 100644 --- a/nats-streaming-server/configuring/storelimits.md +++ b/nats-streaming-server/configuring/storelimits.md @@ -139,7 +139,7 @@ On startup, the server will apply the store limits, which means that this channe We strongly recommend not raising the limit back to the higher limit if messages have been removed in the previous step because those removed messages may or may not become available again depending on the store implementation or if running in clustering mode or not. ## Clustering -When running --clustered, messages are kept in RAFT consensus log file (under --cluster_log_path) in addition to the configured store. +When running --clustered, messages are kept in a RAFT consensus log file (under --cluster_log_path) in addition to the configured store. This directory will grow as more messages keep coming within the 2-4 minute intervals of RAFT Snapshotting. -After snapshotting - the RAFT log will not shrink, but the space for more messages will be allocated internally. +After snapshotting the RAFT log will not shrink, but the space for more messages will be allocated internally. As a result - in addition to max_bytes multiplied by max_channels - disk space needs to be provisioned for RAFT Log, which can grow up to the size of payloads that channels could receive per minute * 4. From 440554199ebae7f67059b7a62eef7951b2dddede Mon Sep 17 00:00:00 2001 From: Alexander Bogdanov Date: Fri, 7 Feb 2020 13:54:51 +0100 Subject: [PATCH 3/3] Responding to review comments --- nats-streaming-server/configuring/storelimits.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nats-streaming-server/configuring/storelimits.md b/nats-streaming-server/configuring/storelimits.md index b1ce46a..7cec34a 100644 --- a/nats-streaming-server/configuring/storelimits.md +++ b/nats-streaming-server/configuring/storelimits.md @@ -139,7 +139,8 @@ On startup, the server will apply the store limits, which means that this channe We strongly recommend not raising the limit back to the higher limit if messages have been removed in the previous step because those removed messages may or may not become available again depending on the store implementation or if running in clustering mode or not. ## Clustering -When running --clustered, messages are kept in a RAFT consensus log file (under --cluster_log_path) in addition to the configured store. +When running `--clustered`, messages are kept in a RAFT consensus log file (under `--cluster_log_path`) in addition to the configured store. + This directory will grow as more messages keep coming within the 2-4 minute intervals of RAFT Snapshotting. After snapshotting the RAFT log will not shrink, but the space for more messages will be allocated internally. -As a result - in addition to max_bytes multiplied by max_channels - disk space needs to be provisioned for RAFT Log, which can grow up to the size of payloads that channels could receive per minute * 4. +As a result - in addition to `max_bytes` multiplied by `max_channels` - disk space needs to be provisioned for RAFT Log, which can grow up to the size of payloads that channels could receive per minute * 4.