Company
Date Published
Author
-
Word count
1348
Language
-
Hacker News points
None

Summary

Adaptive Replica Selection (ARS) is a feature in Elasticsearch designed to improve response latency by intelligently routing search requests to the most suitable shard copies, especially when some nodes experience performance degradation. Traditional round-robin routing can lead to inconsistent response times, as degraded nodes can significantly slow down search requests. ARS, based on a formula adapted from an academic paper originally written for Cassandra, evaluates various metrics like outstanding search requests and response times to rank shard copies, directing requests to those expected to perform best. This method ensures that requests are not consistently sent to overloaded nodes, thereby reducing tail latency and enhancing overall system performance. Benchmarks demonstrate that ARS improves both throughput and latency in scenarios with and without node stress, showing significant gains in handling loaded nodes by routing requests away from them. While ARS is available from Elasticsearch 6.1, it is turned on by default only in version 7.0 and later, allowing users to dynamically enable it in earlier versions to benefit from more efficient search request handling.