Revisiting shared registers and leaderless consensus in WAN environments
摘要
Many consensus protocols are evaluated using key-value (KV) workloads solely involving read/write operations. Weaker primitives, such as shared registers, can also process these workloads to ensure linearizable access to each key. However, a thorough performance evaluation comparing these two methodologies is still missing, leaving the question open as to which strategy is more effective for managing KV workloads under varying conditions. In this paper, we compare the shared register protocol ABD and consensus protocol EPaxos, which have similar quorum sizes and communication rounds for coordinating client requests. Our evaluation exposes two seldom-discussed shortcomings of consensus protocols, in contrast to shared-register protocols, when managing KV workloads: coarse-grained processing and the immediate sub-effects of write operations. These weaknesses significantly increase the coordination cost of consensus protocols in high-throughput scenarios. On the other hand, ABD consistently requires two rounds of communication for write operations, putting it at a disadvantage when handling write-heavy workloads compared to EPaxos. To tackle this issue, we propose WABD, the watermark-optimized ABD algorithm. WABD leverages loosely synchronized clocks to eliminate one round of communication for coordinating write operations. However, read operations still require two rounds of communication in the worst case, leading to high communication overhead and limited throughput under high client load. To address this, WABD introduces a coordination-free read path that minimizes coordination in high client load scenarios. Our evaluation shows that WABD achieves up to 40 times the throughput of EPaxos and 1.6 times the throughput of ABD, while maintaining similar latency levels to ABD under low client loads.