# Understanding the Basics of Elasticsearch Architecture
Welcome to this blog where we'll discuss the architecture of Elasticsearch and Kibana. If you're new to these tools, don't worry—we'll explain everything in simple terms with plenty of examples.
## What is Elasticsearch?
Elasticsearch is a powerful search and analytics engine. Once installed, it starts up an instance called a **node**. A node is where data is stored. You can have multiple nodes to store large amounts of data. For example, if you need to store many terabytes of data, you can run multiple nodes, each storing part of the data.
### Nodes and Machines
A node is not the same as a machine. You can run several nodes on a single machine. This is useful for development where you might want to test how multiple nodes work together without needing multiple machines. However, in a production environment, it’s best to have each node on a separate machine, virtual machine, or within a container to ensure stability and performance.
## Clusters: Bringing Nodes Together
Nodes don't work alone—they belong to a **cluster**. A cluster is a group of nodes that together store all your data. You usually only need one cluster, but you can have more if needed. For instance, you might have one cluster for an e-commerce application and another for monitoring application performance (Application Performance Management or APM).
### Automatic Cluster Formation
When you start a node, it automatically forms a cluster. If there are other nodes configured to join the same cluster, they will connect. Even if you only have one node, it will still be part of a cluster. This is useful for development, but in a real-world scenario, having multiple nodes in a cluster is essential for data availability and scalability.
## Storing Data: Documents and Indices
### Documents
In Elasticsearch, data is stored in **documents**. A document is a JSON object that can contain any data you want. For example, a document representing a person might look like this:
```json
{
"name": "Deepak Yadav",
"country": "India"
}
```
### Indices
- Documents are grouped into indices. An index is a collection of documents that are logically related. For instance, all documents representing people could be stored in an index named "people". Similarly, documents representing departments could be stored in an index named "departments".
- Each document is stored within an index, and when you search for data, you specify which index to search in. This logical grouping helps in organizing data and optimizing search operations.
## Recap: Key Takeaways
Let's summarize the key points:
1. Node: An instance of Elasticsearch that stores data. Multiple nodes can run on a single machine for development, but in production, each node should be on a separate machine or container.
2. Cluster: A group of nodes that store all your data. A cluster forms automatically when you start a node.
3. Document: A JSON object that contains your data. Each document is a unit of information, like a person, product, or event.
4. Index: A collection of documents that are logically related. Indices help organize documents and optimize search operations.
Understanding these concepts is crucial as you work with Elasticsearch and Kibana. In future posts, we'll dive deeper into how data is distributed across nodes, how to search within indices, and more advanced configurations to optimize performance. Stay tuned!