Skip to content

[FEATURE] Add follower-read consistency modes for raftstore #91

@feichai0017

Description

@feichai0017

🚀 Is your feature request related to a problem?

Distributed reads are leader-centric today, which can increase tail latency and leader pressure. There is no explicit follower-read consistency mode.

💡 Proposed Solution

Add follower-read modes with clear consistency levels.

Suggested modes:

  • strong (leader/read-index),
  • bounded-stale,
  • follower-prefer (when safe).

🎨 Alternatives Considered

  1. Keep all reads on leader.
  2. Add ad-hoc follower reads without explicit consistency contract.

An explicit mode contract is safer and easier to reason about.

📝 Technical Details / Implementation Plan

  • Define read consistency enum/options in RPC path.
  • Implement follower-read admission checks (applied index/lease/read index constraints).
  • Add integration tests covering stale-read bounds and failover behavior.

🧐 Additional Context

This would improve horizontal read scalability for multi-replica deployments.

Metadata

Metadata

Assignees

Labels

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions