-
I use MicroRaft to develop distributed storage. (I've often been indebted to GitHub discussions) So we want to do data sharding, for example by using multiple RaftGroups. (such as CockroachDB's MultiRaft Does current MicroRaft support sharding? Are there any plans for future support? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @bootjp. Welcome back! I am happy to support your use case. Please share your experience of using MicroRaft and I can take your input for planning future work! With MicroRaft, you can run multiple Raft groups in the same system. Raft groups are identified by unique ids which is set in which is carried in Basically you can map your logical shards into Raft groups where each Raft group runs a logical shard. In a single process, you can run multiple RaftNode objects belonging to different Raft groups. I think such a setup can work for building a sharded system. But there is definitely room for improvement. Some thoughts from me:
I can hear your requirements. Btw I just released v0.6 with a few new APIs that you may find interesting: https://github.com/MicroRaft/MicroRaft/releases/tag/v0.6 Cheers, |
Beta Was this translation helpful? Give feedback.
-
Oh, thank you. I will try to get Sharding implemented once. By the way, I saw the release of v 0.6. Thank you for always having a kind and polite discussion. |
Beta Was this translation helpful? Give feedback.
Hi @bootjp. Welcome back! I am happy to support your use case. Please share your experience of using MicroRaft and I can take your input for planning future work!
With MicroRaft, you can run multiple Raft groups in the same system. Raft groups are identified by unique ids which is set in
RaftNodeBuilder
:MicroRaft/microraft/src/main/java/io/microraft/RaftNode.java
Line 503 in d3696fe
which is carried in
RaftMessage
objects:MicroRaft/microraft/src/main/java/io/microraft/model/message/RaftMessage.java
Line 48 in d3696fe
Basically you can map your logical shards into Raft groups whe…