Details
Description
Proposal: Introducing Leader Lease Read into Ratis
Objective:
The primary objective of this proposal is to introduce the Leader Lease Read feature into Ratis, enhancing the read capabilities and addressing the existing limitations in the current implementation.
Current Implementation:
At present, Ratis supports two read operations:
- Leader Bypass Read: This type of read operation offers improved latency and throughput. However, it is constrained to the leader and may produce inconsistent results.
- Server Linearizable Read (ReadIndex): This type allows clients to read from any server, ensuring linearizability but suffers from suboptimal latency. Experiments from Alluxio liuyaolong shows a 20-30% dropdown in throughput when switch to ReadIndex from bypass read.
Reasons for the Proposed Feature:
To address the limitations, I propose to incorporate the Leader Lease Read type into Ratis.
This feature has already been validated by other communities, such as Sofa-Jraft, where it resulted in a remarkable 15% improvement in throughput performance.
Additionally, some of our downstream dependents, like IoTDB, demand low-latency read capabilities to efficiently serve time-series queries.
References:
- Previous community discussions on Leader Lease in
RATIS-1273and relevant contributions on https://github.com/apache/ratis/pull/383 - Quantitative results showcasing the benefits of Leader Lease Read can be found at https://www.sofastack.tech/en/projects/sofa-jraft/jraft-user-guide/ in Section 5. Linearizable read.
Attachments
Issue Links
- is duplicated by
-
RATIS-1273 Fix split brain by leader lease
- Resolved
- is related to
-
RATIS-1557 Support linearizable read from followers (Read Index)
- Resolved
- links to
1.
|
Add leader lease configuration | Resolved | Song Ziyang |
|
||||||||
2.
|
Maintain leader lease after AppendEntries | Resolved | Song Ziyang |
|
||||||||
3.
|
Refactor hasMajority code during configuration changes | Resolved | Song Ziyang |
|
||||||||
4.
|
Implement LeaseRead | Resolved | Song Ziyang |
|