8000 AWS S3 Storage Provider · Issue #9449 · dotnet/orleans · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

AWS S3 Storage Provider #9449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
seniorquico opened this issue Apr 17, 2025 · 4 comments
Open

AWS S3 Storage Provider #9449

seniorquico opened this issue Apr 17, 2025 · 4 comments

Comments

@seniorquico
Copy link
Contributor

AWS S3 now supports conditional writes using the If-None-Match and If-Match + ETag request headers:

https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html

As a looong follow-up to #6428... I'd be happy to prototype, test, and contribute an implementation. Is there interest in a PR to the core repo, or would this be better as an OrleansContrib package?

@ReubenBond
Copy link
Member

I am interested in this and having it in the core repo as long as we have an emulator for it in GitHub Actions. My understanding is that S3 doesn't let you overwrite an existing blob yet. Do you have ideas on how to implement updates?

@seniorquico
Copy link
Contributor Author

I am not aware of any issues with overwriting/updating blobs- but maybe there are some assumptions to lay out? I'm thinking of an implementation with a single PutObject call, not multi-part uploads. The docs seem to indicate multi-part uploads support conditional writes, as well. I don't have any experience with it, though. A single PutObject call would limit the total size of the grain state. I have to admit, it's not a concern for our specific use case. If this disqualifies it for contributing to core, I would understand.

A few years ago, AWS introduced strong read-after-write consistency. (That was another challenge with trying to use it as a storage provider.) That, combined with the conditional writes, I believe S3 is viable as a storage provider? I threw together this quick gist to test the conditional write behavior simulating concurrent writes based on ETags:

https://gist.github.com/seniorquico/e6e2d7616b599846d1f177a6f9782192

It's (obviously) not a high performance test to force race conditions server-side. That said, I tested with AWS S3, Cloudflare R2, and Min.io, and it worked as expected. (Cloudflare R2 and Min.io supported conditional writes before AWS S3.)

I'll have to do some research into emulator options for GitHub Actions and whether or not any support the conditional write behaviors.

@ReubenBond
Copy link
Member

Ok, this is great - I was mistaken. I see the updated docs on the behavior here: https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html

@seniorquico
Copy link
Contributor Author

FYI- We have an internal prototype, and we're planning out integration and load tests. We'll share a PR for feedback when we're confident in the approach.

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

No branches or pull requests

2 participants
0