Skip to content

Fix worked cost example using the wrong 5s materialization interval - #988

Open
coipond-writer[bot] wants to merge 1 commit into
masterfrom
fix/webui-operational-cost-2.5s-interval-44799
Open

Fix worked cost example using the wrong 5s materialization interval#988
coipond-writer[bot] wants to merge 1 commit into
masterfrom
fix/webui-operational-cost-2.5s-interval-44799

Conversation

@coipond-writer

Copy link
Copy Markdown
Contributor

What

`Web-UI/Operational-Cost-Breakdown.md`'s worked "Example Calculation" table used a 5-second interval for states/metrics materialization (535,680 states/month), understating every downstream States/Metrics dollar and GB figure by roughly 2x.

Why it's wrong

`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 (2.5s), but the worked example's math used the wrong 5s figure.

Fix

Recomputed the full cascade with the correct 2.5s interval (1,071,360 materializations/month instead of 535,680):

Figure Before After
States data/month 16 GB 32 GB
Metrics data/month 32 GB 64 GB
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

The Simplified Formula's upper bound is directly derived from the total / 100 consumers, so it cascades too.

Fixes #44799 (Redmine).

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

0 participants