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

braft supports rocksdb as the log storage engine #484

Open
lqxhub opened this issue Feb 19, 2025 · 2 comments
Open

braft supports rocksdb as the log storage engine #484

lqxhub opened this issue Feb 19, 2025 · 2 comments

Comments

@lqxhub
Copy link

lqxhub commented Feb 19, 2025

当前braft使用leveldb 存储 raft的log等数据, 有没有考虑支持 rocksdb 作为存储引擎.

首先我先说一下提出这个问题的原因:

  1. rocksdb 和 leveldb 在读写接口上差距很小, 如果要实现改动不大
  2. 很多数据库都会采用 rocksdb作为存储引擎, 如果想使用 braft 支持分布式, 还需要多一个leveldb的依赖,如果braft支持rocksdb, 那么可以少一个依赖
  3. rocksdb的性能大多数场景下会强于leveldb, 替换后可能会提升braft的性能

不知道 有没有实现这个 feature 的计划

@ljcui
Copy link

ljcui commented Feb 20, 2025

可以看下这个,https://github.com/TuGraph-family/etcd-raft-cpp. 只有一个raft状态机,rpc和存储都可自定义。

@lqxhub
Copy link
Author

lqxhub commented Feb 21, 2025

可以看下这个,https://github.com/TuGraph-family/etcd-raft-cpp. 只有一个raft状态机,rpc和存储都可自定义。

差不多是这个意思, 把braft的存储抽象一层, 下层可以是 leveldb 也可以是 rocksdb,可以做到无感替换

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

No branches or pull requests

2 participants