Skip to content

lease-read: discuss election timeout / lease window enlargement (deferred from #549) #552

@bootjp

Description

@bootjp

Background

Current Raft tick configuration:

  • defaultTickInterval = 10 ms
  • defaultElectionTick = 100 → election timeout 1 s
  • Lease window = 1 s − leaseSafetyMargin (300 ms) = 700 ms (margin 30%)

TiKV reference: election timeout 10 s, max lease 9 s (margin 10%). The larger window absorbs GC pauses and apply-queue depth without consuming the safety margin.

Trade-off

  • Larger election timeout → slower failover detection.
  • PR Adjust raft tick intervals for stability #529 already shifted heartbeatTick 1→10 and electionTick 10→100 for stability.
  • Another 10× shift would push failover detection into the 10 s range; may be unacceptable for the Redis-compatible latency profile.

Proposed action

  • Decide an SLO for failover detection latency.
  • If 1 s remains the SLO: keep current config and accept the 30% margin.
  • If a 3-5 s SLO is acceptable: raise electionTick to 300-500 (3-5 s window), giving the 10% margin TiKV uses.

References: PR #549, PR #529.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions