Design proposal: S3 as optional primary storage backend (future work, server-ng-targeted) #3232
jayakasadev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Status
This is a design proposal for future work targeting
core/server-ngonce cluster + consensus have landed. Not a request to implement againstcore/server.Filed at the suggestion of @hubcio in #3228: "a feature this size should land as a GitHub Discussion before an issue + stacked PRs." PRs #3226 / #3227 are closed; this Discussion is the design-level reset.
Goal
Allow iggy to run with an S3-compatible object store as the only persistence medium — no local data files. Useful for ephemeral / scale-to-zero compute, durable-by-default archive, and deployments where local NVMe provisioning is the bottleneck. Local-disk mode remains the default; S3 mode is opt-in via config and behind a default-off cargo feature.
Why now (and why "future work")
core/serveris being replaced bycore/server-ng(VSR-based). Landing a 10-phase persistence rewrite intocore/serverships into actively-deprecated code. So this proposal targets the post-server-ng codebase, after consensus + cluster have merged. Filing the design now gives the core team time to weigh in on shape so implementation isn't bottlenecked on design when server-ng is ready.High-level shape
A small
ObjectStoragetrait abstracts the persistence subsystem:Three backends:
CompioFsStorage— passthrough to compio fs (current behavior)S3Storage— built onrusty-s3(sans-IO SigV4) +cyper(compio HTTP, rustls TLS), behind theobject-storagecargo featureInMemoryStorage—cfg(test), HashMap-backed (replaces whatopendal::services::Memorywould have given us)No tokio. No opendal. Compio-native end-to-end so it doesn't undo the work in #2020 / #2247.
Phase 0 spike (already run, against real AWS S3)
A throwaway feasibility spike validated the rusty-s3 + cyper + compio + rustls combination against real AWS S3 in an ephemeral bucket (us-east-1, 1-day lifecycle backstop, torn down on exit). 5/5 scenarios passed:
If-None-Match: *)Three correctness findings:
rustls::crypto::ring::default_provider().install_default()is required at boot when cyper is configureddefault-features = false.rusty-s3'scomplete_multipart_uploadre-wraps them, so callers must.trim_matches('"')-strip before passing back. Otherwise:400 InvalidPart.BufferedMultipartWriter) to coalesce them into legal parts.Open questions for server-ng integration
The trait + S3 backend + buffering + credential chain are backend-agnostic. The questions are about where they plug in:
MessagesWriter/MessagesReadershape live in server-ng? Is the multipart-during-write model still the right fit, or does VSR's commit model change the durability story?If-None-Matchrequirement anymore.)ack_after_uploadsemantics. Producer ack waits for S3 PUT success. VSR adds a quorum-ack on top. Which is the user-visible commit point?Rc<dyn ObjectStorage>(per-shard) the right model for server-ng, or does it wantArc<dyn ObjectStorage>shared more broadly?AWS credential chain (already designed)
Subset of the standard provider chain, no AWS SDK dep, all on cyper:
[system.storage.object]access_key_id + secret_access_key)AWS_ACCESS_KEY_ID+AWS_SECRET_ACCESS_KEY+ optionalAWS_SESSION_TOKEN)AWS_CONTAINER_CREDENTIALS_FULL_URI/RELATIVE_URI— covers ECS task roles + EKS Pod Identity)AssumeRoleWithWebIdentity(covers EKS IRSA)Credential refresh + IMDSv2 deferred to a later "hardening" phase.
What I'd like from this Discussion
Happy to revise based on any of the above.
References to closed artifacts: PRs #3226 / #3227 and issue #3228 contain the original (server-targeted) design and Phase 0 spike findings.
Beta Was this translation helpful? Give feedback.
All reactions