Repository navigation
feat: forward ext.az to spawn launch --az (pin task placement to an AZ) (#62) - #63
Merged
Merged
Conversation
Fast Snapshot Restore is per-AZ: a volume created from an FSR-warmed snapshot is only fast-restored in the AZ where FSR is enabled — elsewhere it lazy-loads blocks from S3 (~6-8 MB/s), e.g. ~40 min to load a 16 GB Kraken2 DB before the tool classifies a read. SpawnTaskHandler read no AZ directive and spawn left placement to EC2, so there was no in-band way to land a task in the FSR AZ. Read ext.az in submit() and thread it into buildLaunchCommand, which appends --az <zone> only when set (back-compat: unset preserves spawn's own placement, matching the --ami/--volume-size pattern). spawn already has the --az flag. Test: passes --az only when set; no --az otherwise. 55 specs green. README directive table + CHANGELOG updated. Fixes #62
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.
Implements #62.
Why
Fast Snapshot Restore is per-AZ. A volume created from an FSR-warmed snapshot is only fast-restored in the AZ where FSR is enabled; in any other AZ it lazy-loads first-touch blocks from S3 at ~6–8 MB/s (≈40 min to load a 16 GB Kraken2 DB, worse for a 40 GB MetaPhlAn index).
SpawnTaskHandlerread no AZ directive andspawn launchleft placement to EC2, so a task landed in whatever AZ EC2 picked — observed bouncing between us-east-1a and 1c across runs, wasting FSR.Change
ext.azinsubmit()(default empty).buildLaunchCommand, which appends--az <zone>only when set — back-compat: unset preserves spawn's own placement, exactly like the existing--ami/--volume-sizehandling.spawn launchalready has--az(cmd/launch.go:216).process { withName: 'KRAKEN2_KRAKEN2' { ext.az = 'us-east-1a' // AZ where the DB snapshot's FSR is enabled ext.volumes = [[ snapshot: 'snap-...', mount: '/opt/databases/kraken2', readOnly: true ]] } }Tests / docs
passes --az only when ext.az is set, to pin FSR placement (#62)— asserts--az <zone>when set and absent otherwise. 55 specs green (./gradlew test).ext.azrow; CHANGELOGAddedunder Unreleased.build.gradleversion left at 0.6.0 (bumped at release per the tag-matches-version workflow); this rides the next release like the other Unreleased entries.Fixes #62.