AI Hints
Home›Elasticsearch Tutorial›Documents, Clusters and Setup
Elasticsearch · Lesson 5 of 120

Nodes, Shards and Clusters

How it scales.

⏱ 2 min read▶ Video at 4:02🎓 Free
Watch this lesson in the Elasticsearch courseWatch on YouTube ↗Full Elasticsearch course

One computer can only hold so much. Elasticsearch is built to spread across many computers, and keep working even when one of them fails.

  • One machine has limits
  • Spread across many
  • Survive failures

From cluster to shard

A cluster is the whole Elasticsearch system. It's made of nodes, and each node is one running Elasticsearch server. Each index is split into shards, and each shard is a small search engine of its own. Replicas are copies of shards, kept on other nodes.

  1. Cluster: the whole system
  2. Node: one server
  3. Index: split into shards
  4. Shard: a mini search engine
  5. Replica: a backup copy

Why shards and replicas

Shards let one index grow past one machine. Searches run on all shards at once, in parallel. Replicas keep a copy safe if a node dies. And replicas can answer searches too, so you get more speed.

keyvalue
Shardsindex bigger than one node
Parallelsearch all shards at once
Replicassurvive a lost node
Bonusreplicas serve reads

Summary

A cluster has nodes, indexes are split into shards, and replicas are copies on other nodes. In this course, we'll run one node, which is all you need to learn. Next, running Elasticsearch.

Key takeaways
  • Cluster → nodes
  • Index → shards
  • Replicas = copies
Next up: Running Elasticsearch — one Docker command