The relationship between replicas (backup) ElasticSearch of ELK study notes the cluster (Cluster), the node (Node), fragmentation (Shard), Indices (index)

[ Cluster ]
clusters, a cluster ES by one or more nodes (Node), each cluster has a cluster name as identification
--------------------- ---------------------------
[ node ]
node, a node is an instance of ES, a machine may have multiple instances, it is not He said that a machine is a node, each node in most cases run on a stand-alone environment or a virtual machine.
------------------------------------------------
[ index ]
index, ie a series of documents in the collection
----------------------------------------- -------
[ shard ]
Fragmentation, ES is distributed search engine, each index has one or more slices, the index data is allocated to each slice, a bucket of water corresponding to a cup package with a N, fragment facilitate scale , N sub-sheet is evenly (rebalance of) distribution as possible on the different nodes (e.g., nodes you have two, four primary slicing (irrespective backup), then each node will be assigned to slice 2 , then you add the two nodes, then you are on the four nodes will have a slice, a process called relocation, auto-complete after ES perception), fragmentation is independent, for the behavior of a Search Request, each slice will execute the Request Further, each slice is a Lucene Index, so that a slice can only store Integer.MAX_VALUE -. 128 = 2,147,483,519 a docs. [The LUCENE-5843] AN IndexWriter Should refuse to index with the Create More Within last INT_MAX docs
--------------------------------- ---------------
[ replica ]
replication, backup slice will be appreciated, there is a corresponding primary shard (primary slice), main fragment and the fragment does not appear prepared in the same on a node (prevent single point of failure), by default, an index created five slices a backup (ie 5primary + 5replica = 10 pieces of fragmented), if you have only one node, then the five replica can not be assigned (unassigned) In this case cluster status will turn Yellow. The main role of replica including:

1. DR: primary fragmentation loss, fragmentation will be on top of the replica to become the new master slice, creating a new replica based on this new master slice, cluster data safe

2. improve query performance: primary and replica data slice is the same, so for a search query either the main fragmentation fragments may be prepared to check, within a suitable range in the plurality of replica better performance (it is to be considered footprint also enhance [cpu / disk / heap]) , additional index request only occurs on the primary slice, replica can not execute index request.
For an index, it can not be adjusted unless otherwise rebuild the index number (main number of fragments, number_of_shards) slice, but you can always adjust the number of replica (number_of_replicas).

Guess you like

Origin www.cnblogs.com/JetpropelledSnake/p/11425730.html