You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.
You can deliver whole messages in any order, yes, and this implementation will be just fine with that. However if you simply swap TCP with UDP using the default implementation of the raft_io interface, then you might get partial messages (or any sort of byte rearrangement of the message stream), and that won't work. You'd need to implement your own version of the raft_io interface that is able to tolerate UDP re-arrangements and still deliver whole messages to the core engine (possibly out of order). See also raft.h for the definition of the raft_io interface.
I suppose my follow up would be if there's a maximum size for the datagram. I would imagine if it's below the link MTU then we wouldn't need to worry about re-arrangement. On the other hand, TCP probably works fine.
I suppose my follow up would be if there's a maximum size for the datagram. I would imagine if it's below the link MTU then we wouldn't need to worry about re-arrangement. On the other hand, TCP probably works fine.
We wouldn't need to worry about partial messages, correct. But the raft library can't make such a guarantee because the size of (say) AppendEntries messages basically depend on the user's payload.
Note that there's been anecdotal evidence that UDP doesn't make the Raft algorithm any faster in practice. Plus you'll very likely need to re-invent some part of TCP in your UDP-based implementation (e.g. flow control).
The docs seem to use TCP as the transport, but many Raft implementations work in an unordered, unreliable setting as well. Can UDP be used?
The text was updated successfully, but these errors were encountered: