Skip to content
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

Add Support for S3 as Lock Storage Backend #2322

Conversation

caiooliveiraeti
Copy link
Contributor

@caiooliveiraeti caiooliveiraeti commented Jan 2, 2025

Description:
This pull request introduces support for using Amazon S3 as a lock storage backend for ShedLock, leveraging S3's recently introduced conditional writes for concurrency control.

Motivation:
The addition of S3 as a lock storage backend allows users to take advantage of Amazon S3's scalability, availability, and now its conditional write operations. This makes S3 a compelling choice for distributed lock management in environments where S3 is already utilized.

https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-s3-functionality-conditional-writes/
https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes.html

@caiooliveiraeti
Copy link
Contributor Author

caiooliveiraeti commented Jan 2, 2025

Hi @lukas-krecan,

I just created a draft pull request to add support for Amazon S3 as a lock storage backend for ShedLock. The implementation uses S3 object metadata to store lock information such as (lockUntil, lockedAt and lockedBy). It also leverages S3's new conditional writes to concurrency control.

I believe this functionality could be valuable for users who already rely on Amazon S3 and need a scalable and reliable solution for distributed locks.

I’d love to hear your thoughts on this idea and if there’s anything I can adjust or improve in the code. I’m happy to discuss further and make any necessary changes!

Thank you for your time and consideration.

Best regards,
@caiooliveiraeti

@lukas-krecan
Copy link
Owner

Hi, thanks a lot. I will look at it in the next few days

@lukas-krecan
Copy link
Owner

lukas-krecan commented Jan 3, 2025

Hi, I made some small changes. If you are OK with that, I will merge it and release it.

@caiooliveiraeti
Copy link
Contributor Author

Hi @lukas-krecan,

Thank you for reviewing the PR and making the changes! I’m completely fine with them. I appreciate the time and effort you’ve put into this. Feel free to merge and release it whenever it works for you.

Let me know if there’s anything else I can assist with!

Thanks again! 😊

@caiooliveiraeti caiooliveiraeti marked this pull request as ready for review January 4, 2025 11:23
README.md Outdated Show resolved Hide resolved
@caiooliveiraeti
Copy link
Contributor Author

Merged in #2325

@lukas-krecan
Copy link
Owner

Released in 6.1.0, thanks again

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

Successfully merging this pull request may close these issues.

2 participants