Elasticsearch hard
Adaptive Replica Selection (ARS) replaced Simple Round-Robin for routing shard requests. What specific metrics does ARS use to improve P99 tail latency?
- A It routes based only on the physical proximity of the node to the client's IP address.
- B Dynamic Health: It tracks real-time response times (EMA), query queue size on each node, and service-time metrics, routing traffic away from 'struggling' nodes (e.g., those in long GC pauses).
- C It uses the total number of open files on the node as the sole routing heuristic.
- D It always routes to the Primary Shard unless the Primary is at 100% CPU.
Answer: B. Dynamic Health: It tracks real-time response times (EMA), query queue size on each node, and service-time metrics, routing traffic away from 'struggling' nodes (e.g., those in long GC pauses).
In a distributed system, 'The Slowest Node' often determines the 'Search Speed'. ARS detects if Node A is taking 500ms while Node B is taking 10ms. By intelligently biasing traffic toward Node B, it prevents a single 'noisy neighbor' or hardware hiccup from ruining the experience for all users.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What are the two primary reasons for configuring one or more 'Replica Shards' for an index?
- When a String field is mapped as `text`, what process is performed to enable full-text search capability?
- What is the primary benefit of splitting an Elasticsearch index into multiple 'Primary Shards'?
- Every document stored in an Elasticsearch index is uniquely tracked by which mandatory metadata field?
- Elasticsearch search results include a metadata field called `_score`. What does this value primarily indicate?
- What is the primary architectural purpose of Elasticsearch in a modern software stack?