Sharding

Index split into N shards. Each shard is a Lucene index. Documents routed to shard by hash(id) mod N. Fixed at index creation.

Advertisement

Sharding

Index split into N shards. Each shard is a Lucene index. Documents routed to shard by hash(id) mod N. Fixed at index creation.

Advertisement

Replicas

Each shard has R replicas. Replicas serve reads + provide HA. If primary fails, replica promoted. Configurable per index.

Coordinator role

Any node can be coordinator. Receives request, fans out to shards, aggregates results. Client can hit any node.

Master maintains state

Dedicated master nodes track cluster state (shard allocation, node membership). Small workload but critical. Odd count for quorum.

Query = fan-out + merge

Search hits every shard in parallel. Each returns top-K local hits. Coordinator merges into global top-K. Sort/aggregate carefully.