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

Allow setting replica interval offsets #523

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hifi
Copy link
Collaborator

@hifi hifi commented Nov 15, 2023

If using S3 replicas the extra LIST call on startup may be expensive in scale if a lot of Litestreams are started in quick succession.

Allowing configuring the snapshot offset externally allows the caller to spread around the snapshots without relying on access to the remote replica making restarts no-op.

Same thing applies to retention checks that they can easily stack too close.

@hifi hifi marked this pull request as draft November 16, 2023 12:55
@hifi
Copy link
Collaborator Author

hifi commented Nov 16, 2023

I'll modify this a little as we need an offset for retention check as well.

If using S3 replicas the extra LIST call on startup may be
expensive in scale if a lot of Litestreams are started in quick
succession.

Allowing configuring the snapshot offset externally allows the
caller to spread around the snapshots without relying on access to
the remote replica making restarts no-op.

Same thing applies to retention checks that they can easily stack
too close.
@hifi hifi force-pushed the for-upstream/snapshot-offset branch from d6a5f8f to 4eefea0 Compare November 17, 2023 12:31
@hifi hifi changed the title Allow setting replica snapshot interval offset Allow setting replica interval offsets Nov 17, 2023
@hifi hifi marked this pull request as ready for review November 17, 2023 12:32
@hifi
Copy link
Collaborator Author

hifi commented Nov 17, 2023

Expanded to cover all intervals. We use both snapshot and retention check offsets to prevent storming a bucket with requests around the same time.

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.

1 participant