kvcache-ai / kvcache-ai/Mooncake

[RFC][Store]: Use redis as backup metadata store

Open
#4,047 1 comment 0 reactions 0 assignees View on GitHub
RFC
Dominant language
C++
Stars
6.6k
Forks
1.2k
Avg merge
3d 5h
Merged PRs (30d)
312

Description

### Changes proposed

最近在看mooncake HA,从工作经验看,一个系统如果一开始就不是严格的主从同步,后续通过补一些功能做成严格的主从同步,感觉工作量还是比较大的 https://github.com/kvcache-ai/Mooncake/issues/2807 。 还有一个原因是社区非常活跃,功能变更也比较多,估计做HA也要追这些功能变更。比如最近在看的DFS offload。追起来比较耗费时间和精力。

所以想,是不是能把metadata同步存在redis中,master就是负责切主,切主之后从redis中恢复数据。
感觉这种方式是目前能比较轻开发的支持切主,其实就是实时的snapshot;

当然,这里就比较浪费内存了,redis/master都要一部分内存。但是感觉能相对快速的recover follower。前期可以新主在恢复完数据前不服务,可能是分钟级别的不可用,后面可以lazy的方式逐渐加载历史数据(比较复杂)。但是基本不影响目前HA迭代。

或者引入raft机制(其实就是oplog+snapshot的机制类似),但是不依赖分布式文件系统存snapshot;

THX

### Before submitting a new issue...

- [x] Make sure you already searched for relevant issues and read the [documentation](https://kvcache-ai.github.io/Mooncake/)

Contributor guide

Open the contributing guide

Research direction

No implementation files, tests, or entry points are named. Start by reviewing the existing metadata-store and HA/failover paths, then compare Redis-backed recovery with the Raft alternative described in the RFC. Done criteria and implementation scope are not specified, so the design needs agreement before coding can begin.

Written by the indexing model from the issue text.

Assessment

Tech stack
redis
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.