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

Multi shard support #13

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

sundbry
Copy link

@sundbry sundbry commented Aug 6, 2019

Hello,
Let's just say I added a shard to my kinesis config and the only way to get production working again was to code this in a blitz!

I am only running one peer in my operations here but I have written the algorithm such that it should be capable of distributing consistently over n-peers. Of course any changes to n-peers if the job is resumed may risk reshuffling the partitions around, but it seems logically unavoidable in that case. It may be possible to keep the partitioning consistent even in the case of new shards getting opened, but I have not gone that far. This should be sufficent for #6

hasMoreShards support would be pretty trivial to add following this implementation as in #2 and I am not sure how the split/merge logic works (as in #1) or if it's even necessary. When a shard gets closed in Kinesis we still load it in our .getShards call and poll from it as long as it's there.

@sundbry
Copy link
Author

sundbry commented Aug 6, 2019

NB: this will break on existing checkpoints, so should mention that in release notes.

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