[Searchable Snapshot] [Design Proposal] Shard Allocator for Remote Search Shards #4759
Labels
discuss
Issues intended to help drive brainstorming and decision making
enhancement
Enhancement or improvement to existing feature or request
feature
New feature or request
v2.4.0
'Issues and PRs related to version v2.4.0'
This document outlines a proposal for implementing a new allocator to enable searchable snapshots using remote search shards. Please feel free to leave comments below with any thoughts or suggestions!
Overview
Searchable Snapshots for OpenSearch will introduce support for remote search shards which will enable search for snapshots within the repository without downloading all the data onto the nodes. These remote search shards will be assigned to a node which has the new
search
role - which provides the capability to perform data caching on configured storage when remotely searching the snapshots.Problem Statement
Currently, OpenSearch allocation and initialization works solely for shards which are located on the node’s filesystem. The shard placement strategy can be broken into two smaller subproblems: which shard to act on, and which target node to place it at. The default OpenSearch implementation,
BalancedShardsAllocator
, divides its responsibilities into three major code paths:The allocation mechanism takes into picture the shard size, disk thresholds and other attributes which contribute to the weighted balancing of shards and index across the nodes within the cluster.
The remote search shards for searchable snapshots will rely on the data cache which will be configured as a part of
search
nodes (nodes with the rolesearch
assigned to them). The allocation process should take into account these remote shards while assigning, moving or balancing them across clusters such that they are only assigned to nodes with the specificsearch
role.Additionally, in order to incorporate the remote nature of shards, the balancing logic has to be updated for both the remote and local shards since the requirements in terms of disk, shard count and other variables that are used for weight based calculation will differ for these shards.
Requirements
Terminology
search
role capability.Current State
High Level Overview
A high level overview of the current allocation process, assuming the default OpenSearch implementation, is outlined below.
canAllocate
,canRebalance
,canRemain
,canMoveAway
for shard-level and index-level decisions on a per-node basis.Proposed Solution
High Level Overview
The proposed solution will involve introducing a completely independent balancer which will handle the management for remote search shards. Following is a high level overview of the solution -
Pros:
search
nodes will minimize any skewing or imbalance.Cons:
Future Work:
Other Approaches
Update the existing weight function and balancer
Backward Compatibility
The proposed solution described for proposed solution will maintain backwards compatibility across previous major versions even with the feature flag turned on.
The text was updated successfully, but these errors were encountered: