Skip to content

README: sizing guidance for message_retention - #95

Merged
npezza93 merged 1 commit into
rails:mainfrom
yujiteshima:readme-message-retention-sizing
Oct 4, 2026
Merged

npezza93 merged 1 commit into
rails:mainfrom
yujiteshima:readme-message-retention-sizing

Conversation

@yujiteshima

@yujiteshima yujiteshima commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #94 ("prs welcome for the readme update").

Two sentences:

  • under message_retention: what the retention has to cover (the slowest subscriber's polling interval, plus a margin for a reconnecting listener) and what the default costs for frequent broadcasts — at 60 messages per second, 1.day keeps about 5 million rows (≈3.5 GB on SQLite), 5.minutes about 18,000.
  • in Trimming: the table settles at roughly broadcast rate × message_retention rows, so for frequent broadcasts the retention setting matters more than the trim batch size.

Numbers measured on 4.0.0 and 4.1.0 (SQLite, one Puma process, polling_interval 0.1 s); details and raw data in #94.

Closes #94

https://claude.ai/code/session_016abMvkfuZefDveQYGj6XN6

Explain what the retention has to cover (the slowest subscriber's polling
interval, plus a margin for a reconnecting listener) and what the default
costs for high-frequency broadcasts: at 60 messages per second, 1.day keeps
about 5 million rows (~3.5 GB on SQLite), 5.minutes about 18,000.

Measured on solid_cable 4.0.0 and 4.1.0; numbers and discussion in rails#94.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016abMvkfuZefDveQYGj6XN6
@npezza93
npezza93 merged commit bd0442f into rails:main Oct 4, 2026
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

message_retention: sizing guidance for high-frequency broadcasts (60 msg/s → ~5M rows/day at the default)

2 participants