Repository navigation
feat(client): limits of the bytes of a live topic and a live state (CLI-101) - #465
Merged
Merged
Conversation
…LI-101) The product of the keys, the bytes of a value and the topics was above 64 GiB, so the limits did not bound the memory of a host. maxTopicBytes (1 MiB) bounds a topic, its snapshot and its window event. maxBytes (64 MiB) bounds the state. A value from another host has the same limits. The getter bytes gives the sum. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mark1russell7
added a commit
that referenced
this pull request
Nov 6, 2026
…ix (CLI-101) snapshot-k64, window-s10-k64 and window-s100-k64 read a topic of 64 keys of 16,384 bytes. The report gives the heap of a topic and of a state at the limits of bytes of #465, and the share of the heap limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efaults (CLI-101) Run 42152574477 of the bench live-limits: a full topic at 1 MiB keeps 1,075,659 bytes, a full state at 64 MiB keeps 68,842,177 bytes (1.53 percent of a 4,496,293,888-byte heap). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fault
The live state had three limits: 1,024 keys on a topic, 16,384 bytes in a value and 4,096 topics. Their product is more than 64 GiB. A default Node heap is approximately 4.5 GB. So the limits did not bound the memory of a host. Approximately 260 full topics fill that heap.
The change
maxTopicBytes(default 1 MiB) bounds the JSON bytes of the values of one topic. It bounds a snapshot and a window event too.maxBytes(default 64 MiB) bounds the JSON bytes of all values of a state.FORBIDDEN, reasonwrite-not-allowed. A set that makes a value smaller goes. A refused set changes nothing.expired.bytesgives the sum. The end of a key andclose()give the bytes back.TextEncoder: its bytes are its length.Version
The changeset is
minor: a set that 0.48 kept can now get a refusal. The changeset has the migration step. The strategist decides the version call.The defaults
The defaults are not yet from a measure. The bench of #464 reads the heap of a key, the cost of a snapshot and the block of a window event at these edges. Its run sets the defaults before this merges.
Checks
@procedures/clientis clean.live-state.ts: 1,052 passed.ste-linthas no error on the changed prose.🤖 Generated with Claude Code