From 0eecae0b0a4136bec9cb9afb796b5fb1afa160d9 Mon Sep 17 00:00:00 2001
From: "coipond-writer[bot]"
<309805719+coipond-writer[bot]@users.noreply.github.com>
Date: Tue, 11 Aug 2026 22:31:56 +0200
Subject: [PATCH] Fix worked cost example using the wrong 5s materialization
interval
karafka-web/lib/karafka/web/config.rb:126 sets tracking.interval default
5_000 (raw per-process reporting), but config.rb:201 sets
processing.interval default 2_500 (states/metrics materialization --
"we flush the states twice as often as the data reporting"). The page's
own "Message Characteristics" section already states this correctly,
but the worked "Example Calculation" table used the 5s figure
(535,680 states/month) instead of the correct 2.5s figure
(1,071,360/month), understating every downstream States/Metrics
dollar and GB figure by roughly 2x.
Recomputed the full cascade with the correct 2.5s interval:
- States data: 16 GB -> 32 GB (30 KB x 1,071,360)
- Metrics data: 32 GB -> 64 GB (60 KB x 1,071,360)
- States/Metrics networking: $5.03 -> $7.44
- States/Metrics subtotal: $5.11 -> $7.52
- Total monthly cost: $39.1 -> $51.2
- Simplified Formula upper bound: $0.40 -> $0.51 (directly derived from
the total / 100 consumers)
Fixes #44799.
---
Web-UI/Operational-Cost-Breakdown.md | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Web-UI/Operational-Cost-Breakdown.md b/Web-UI/Operational-Cost-Breakdown.md
index a15412fb..976a8ba4 100644
--- a/Web-UI/Operational-Cost-Breakdown.md
+++ b/Web-UI/Operational-Cost-Breakdown.md
@@ -169,8 +169,8 @@ Below, you can find an example calculation that you can use to understand what f
| Total States Data per Month |
- 16 GB |
- 30 KB * 535,680 States |
+ 32 GB |
+ 30 KB * 1,071,360 States (materialized every 2.5 seconds, not 5) |
| Metrics Size |
@@ -179,8 +179,8 @@ Below, you can find an example calculation that you can use to understand what f
| Total Metrics Data per Month |
- 32 GB |
- 60 KB * 535,680 States |
+ 64 GB |
+ 60 KB * 1,071,360 States (materialized every 2.5 seconds, not 5) |
| Reports Consumption Egress |
@@ -195,8 +195,8 @@ Below, you can find an example calculation that you can use to understand what f
| States and Metrics Cost |
Networking |
- $5.03 |
- $0.05 x (52.7 GB + 32 GB + 16 GB) |
+ $7.44 |
+ $0.05 x (52.7 GB + 64 GB + 32 GB) |
| Storage |
@@ -205,8 +205,8 @@ Below, you can find an example calculation that you can use to understand what f
| Subtotal |
- $5.11 |
- $5.03 + $0.08 |
+ $7.52 |
+ $7.44 + $0.08 |
| Total Monthly Cost |
@@ -216,7 +216,7 @@ Below, you can find an example calculation that you can use to understand what f
| States and Metrics |
- $5.11 |
+ $7.52 |
|
@@ -226,8 +226,8 @@ Below, you can find an example calculation that you can use to understand what f
| Total |
- $39.1 |
- ($2.71 + $5.11) x 5 |
+ $51.2 |
+ ($2.71 + $7.52) x 5 |
@@ -238,6 +238,6 @@ Below, you can find an example calculation that you can use to understand what f
## Simplified Formula
-For a quick estimation, a single Karafka consumer will cost between **$0.07** and **$0.40** per month. This range accounts for the variability in factors such as message frequency, state materialization, data size, and the efficiency of your Kafka configuration.
+For a quick estimation, a single Karafka consumer will cost between **$0.07** and **$0.51** per month. This range accounts for the variability in factors such as message frequency, state materialization, data size, and the efficiency of your Kafka configuration.
This simplified formula provides a ballpark figure to help you plan and budget the operational costs of running Karafka with its Web UI. Remember that actual costs can vary based on your specific setup and usage patterns.