Tuesday, 20 December 2016

Architecture overview of Elasticsearch

If you are building an large application then you should definitely consider Elasticsearch for your datastore.Elasticsearch is not a good choice for the transaction processing system it is used for the search . We treat it as a search server and elasticsearch is built for speed and scalability. You should not be used elasticsearch for your primary data source because it may lose data.

Overview of elasticsearch

You can use elasticsearch for two reasons:

1. Real-Time analytics.
2. Powerful and Intelligent Search.

Elasticsearch is great for analytics applications:

  • Simple Super powerful Query DSL.
  • REST API for indexing data and querying it.
  • Easily configurable of shards and replicas.

Difference between elasticsearch and database.
In elasticsearch an index is like a database in which you can store different type of documents .Type of elastic is like a table in database , document you can call it a row and field in elasticsearch are coloumns in normal database.

Elasticsearch Relational Database
Index Database
Type Table
Document Row
Field Coloumn

Clusters and Nodes: Clusters are a collection of nodes that communicate with each other to read and write to an index. A cluster needs a unique name to prevent unnecessary nodes from joining and a node is single instance of ES usually it runs one instance per machine.It can communicate with network also so you can share it on network for reading and writing operations.

Shards and Indices: Let's take an example we have 1 TB machine it data is on it. If data is rapidlly increasing into machine then we might need a second machine to store some data. so data is divided into two machines which are in same cluster so we called it shards.

Replicas: Replicas are just shards that aren't actively used They're copies of your active shards to allow better availability should one of the nodes in your cluster fall down.

Please comment and share if you like the post.

Featured post

How to create dynamic schema in mongodb

Sometime what we need in our application is to create mongodb schema for collection and some of our collection schema are same but names are...

Popular Posts