Add opt-in STAGGERED onboarding mode - #95
Open
ShvaykaD wants to merge 13 commits into
Open
Conversation
…_FIRST_JITTER_SEC config
…C starts at ramp-complete)
…ng success; announce before subscribe; fail fast on unsupported config; add unit tests
… starting the reporter
…gagement-neutral comments, regression tests
…er gateway under STAGGERED
…0s until ramp-complete
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.
Summary
Adds an opt-in STAGGERED onboarding mode for the persistent gateway and device tests. Instead of the phased warmup (connect-all → subscribe-all → announce-all), each entity runs its own lifecycle — connect → announce sub-devices (gateway) → subscribe → per-entity telemetry — paced by a concurrency cap and startup jitter. When all entities reach a terminal state (onboarded or failed), the existing RPC burst sender starts unchanged on the full device list.
Motivation: the phased warmup produces a synchronized connect/announce storm at startup. Staggering onboarding is closer to a real device fleet coming online gradually and avoids the artificial cold-start spike, while keeping the same steady-state load so results stay comparable to PHASED.
Opt-in / backward compatibility
ONBOARD_MODEconfig key; defaultPHASED= existing behavior, unchanged.ONBOARD_MODE=STAGGERED. The PHASED, ephemeral, and device-default paths are unchanged.Config keys
ONBOARD_MODEPHASEDPHASED(existing) orSTAGGEREDONBOARD_MAX_CONCURRENT200ONBOARD_FIRST_JITTER_SEC60Steady-state matches PHASED: per-entity telemetry period =
entityCount / MESSAGES_PER_SECONDseconds; no telemetry timer is scheduled whenMESSAGES_PER_SECOND <= 0.Scope / known limitations
gateway.batch=trueand no alarms; it fails fast on other combinations rather than silently diverging.Tests
mvn -T 1C clean install.See
STAGGERED-ONBOARDING-RUNBOOK.mdfor a usage/verification runbook.