chai icon indicating copy to clipboard operation
chai copied to clipboard

Scaling / HA using Raft / Multiraft

Open joeblew99 opened this issue 5 years ago • 3 comments

Do any of the dB drivers have any scaling aspects ?

I would like to use genji in the traditional embedded scenario on desktops but also in servers. So for server usage I need a way to make it use Raft.

I saw bitcask and bitraft references in the issues. Looks like a promising candidate but it's not integration into genji yet. @prologic: happy to know the status.

I think that is a badger Multiraft implementation on GitHub.

Please let me know blockers so I can decide if we should help do contribution

joeblew99 avatar Dec 12 '19 12:12 joeblew99

https://github.com/BBVA/raft-badger

Looks promising..

joeblew99 avatar Dec 12 '19 12:12 joeblew99

This is a much preferred implementation of a raft framework. It also supports the new pebble store

https://github.com/lni/dragonboat

winwisely99 avatar Mar 08 '20 07:03 winwisely99

To have a scalable system with raft, even multiraft, isn't very straight forward. There is quite a bit to consider. MIT 6.824: Distributed Systems can abridge some of this knowledge for anyone not in the know right now.

What should the FSM do? If it is only doing GET/PUT/DEL operations, the database is only highly available. This wont help with scaling data distribution or read/write scaling. It would only be useful as a locking system, from which coordination can be done in addition to.

Assuming that multiraft is used, one group would still need to maintain coordination of other groups. An entire system schema is necessary for that to work effectively.

The common problems to solve for multiraft are:

  • how to handle coordination? (the answer is always some form of distributed locking and placement driver)
  • scaling reads and writes (each group is fully replicated, think write amplification)
  • handling transactions (sometimes these are partitioned to their own raft groups OR timestamping with 2Phase commits on top of MVCC)

protosam avatar Jan 28 '23 08:01 protosam