-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support "competing" readers #2
Comments
The above looks like an elegant design. This leaves open the question of consumer offset tracking. Without competing consumers, manually managed consumer offsets are easy. Just periodically write the last offset to some kind of persistent store. With competing consumers, this becomes a more tricky problem to get right as it is not a single offset that represents a high watermark of where consumption has reached. When we start offering built-in offset tracking, again it becomes more complex. |
I don't think a competing consumer can do offset tracking, the offset tracking is done by the read coordinator so new consumers just join the round-robin queue and are advised of the next chunk id to read |
It all sounds reasonable 👍 from me. |
👍 to "collaborate" |
How will it translate in term of API for reading client (e.g. the stream plugin)? Right now they |
OK, so competing readers get offset tracking for free? This is not supported yet for traditional readers, but when it will, they will have to issue a command (commit?) and will expect the broker to keep the offset where they left off. Are we on the same page for this? |
What about replay semantics? Can a group of competing consumers can start over? This implies some kind of deletion concept for the group, or at least offset reset for this group. |
Yes we should hide this complexity (choose which process to send to) behind a common api. |
Yes but I could imagine considering using the same process for keeping consumer offsets for this stream. Might need to ponder that a bit. :) |
No I don't think replay would be supported for a competing reader group, you can of course replay if you like as a "normal" reader, i.e. not competing. |
Currently all readers read the entire log and there is no mechanism for "competing" reads, i.e. where multiple readers read entries/chunks in round-robin order, i.e. in order to increase the speed at which entries for a given stream are processed.
A possible design for doing competing reads:
Downsides:
The text was updated successfully, but these errors were encountered: