Elasticsearch / OpenSearch concept page: distributed Lucene cluster (3 master + 3 data + coord), inverted index, sharding, query/fetch phases, aggregations, split-brain, mapping explosion
Elasticsearch — distributed search engine with a primary/replica shard model. Correctness requires not смешивать indexing ACK, Lucene refresh visibility, translog/recovery и master-eligible voting.
| Компонент | Ответственность |
|---|---|
| Index and Search Client | Отправляет writes, GET/search и consistency preconditions. |
| Coordinating Node | Маршрутизирует document write или scatter/gather search. |
| Primary Shard | Проверяет mutation и назначает sequence number. |
| Replica Shard A | Применяет ordered replication operation и может обслуживать search. |
| Replica Shard B | Независимая shard copy; не обязана ACK при weaker setting. |
| Master-Eligible Quorum | Публикует cluster state и allocation; не находится в per-document data path. |
| Snapshot Repository | Recoverable backup boundary, отличный от shard replicas. |
The coordinating node routes by document ID to one primary. The primary validates and assigns ordering metadata before parallel replica requests.
Проверяемый исход: The response reports actual successful/failed shard copies; it is not described as a mandatory 3-of-3 quorum.
A successful index response does not imply immediate search visibility. Refresh opens a new segment; real-time GET and search have different paths.
Проверяемый исход: Caller selects refresh=wait_for only when its latency/throughput trade-off is justified.
A client updates only if both if_seq_no and if_primary_term match the version it read. Another committed mutation makes the stale precondition fail.
Проверяемый исход: Lost update becomes an explicit 409/re-read decision rather than last-writer-wins by accident.
A formed cluster retains its cluster UUID. Restarting nodes discover that cluster; they never reuse initial bootstrap settings. Lost shards recover from peers or verified snapshots.
Проверяемый исход: No accidental second cluster is bootstrapped, and replicas are not mistaken for backups.
Числа выше — учебные inputs или размерностные формулы. Их нельзя выдавать за benchmark или SLA конкретного продукта.
[CONCEPT]database-replication-deep
Диаграмма показывает причинные границы и recovery contracts, а не скрытую реализацию конкретного managed-сервиса. Любая stronger guarantee действует только в явно названной transaction/checkpoint/acknowledgement boundary.
Введите числа или выберите пресет