当前位置:网站首页>Differences between nodes and sharding in ES cluster
Differences between nodes and sharding in ES cluster
2022-07-02 12:05:00 【What about Saipan】
At first I got confused , Think partition is node
node : Nodes are our hosts one by one , You can also understand it as one by one ES
Fragmentation : Sharding is to shard the data originally stored on a node , Then store it to different nodes .
Slice is divided into main slice and sub slice , Secondary fragmentation is used for data copying
For example, create an index library here
PUT /test
{
"settings": {
"number_of_shards": 3, // Number of slices
"number_of_replicas": 1 // Copy number
},
"mappings": {
"properties": {
// mapping Mapping definition ...
}
}
}
This means that the data of the index database will be stored in three partitions , Which node will the three partitions be distributed to? By default, there are ES control , At the same time, it can also be controlled by the master node
es01、es02、es03 Represents three nodes , The entity asterisk indicates that this node is the primary node , The number on the right is the number of slices , And it shows the distribution of slices on nodes
Let's look at the process of inserting a document , In this way, we can clearly understand the difference between nodes and partitions
The process :
1) Add a new one id=1 Documents
2) Master node pair id do hash operation , If you get 2, Should be stored in shard-2
3)shard-2 The main partition of is node3 node , Route data to node3
4)node3 Save the document
5)node3 Synchronize data to shard-2 Copy of replica-2, stay node2 node
6) Return the result to coordinating-node node
7) Return the result to the user
annotation :
1)shard It means dividing into pieces
2)hash Algorithm will document id Get the sequence number of slices by taking the remainder with the number of slices , Then the document data is stored in the host where the partition is located data Go to the data node
3) When the master partition saves data , Data backup should also be carried out for secondary fragmentation
Now you should know the difference between sharding and nodes
边栏推荐
- Implementation of address book (file version)
- Repeat, tile and repeat in pytorch_ The difference between interleave
- HOW TO EASILY CREATE BARPLOTS WITH ERROR BARS IN R
- 【C语言】十进制数转换成二进制数
- HR wonderful dividing line
- 高德地图测试用例
- Leetcode209 长度最小的子数组
- On data preprocessing in sklearn
- [visual studio 2019] create MFC desktop program (install MFC development components | create MFC application | edit MFC application window | add click event for button | Modify button text | open appl
- b格高且好看的代码片段分享图片生成
猜你喜欢
动态内存(进阶四)
BEAUTIFUL GGPLOT VENN DIAGRAM WITH R
Mish shake the new successor of the deep learning relu activation function
Dynamic debugging of multi file program x32dbg
基于Arduino和ESP8266的连接手机热点实验(成功)
自然语言处理系列(二)——使用RNN搭建字符级语言模型
Flesh-dect (media 2021) -- a viewpoint of material decomposition
6. Introduce you to LED soft film screen. LED soft film screen size | price | installation | application
The selected cells in Excel form have the selection effect of cross shading
Dynamic memory (advanced 4)
随机推荐
SSH automatically disconnects (pretends to be dead) after a period of no operation
Leetcode739 每日温度
The selected cells in Excel form have the selection effect of cross shading
How does Premiere (PR) import the preset mogrt template?
Le tutoriel F - String le plus facile à comprendre de l'histoire.
Small guide for rapid formation of manipulator (VII): description method of position and posture of manipulator
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
HOW TO CREATE A BEAUTIFUL INTERACTIVE HEATMAP IN R
MSI announced that its motherboard products will cancel all paper accessories
Esp32 stores the distribution network information +led displays the distribution network status + press the key to clear the distribution network information (source code attached)
Time format display
HOW TO ADD P-VALUES ONTO A GROUPED GGPLOT USING THE GGPUBR R PACKAGE
Orb-slam2 data sharing and transmission between different threads
[untitled] how to mount a hard disk in armbian
Uniapp uni list item @click, uniapp uni list item jump with parameters
Codeforces 771 div2 B (no one FST, refers to himself)
jenkins 凭证管理
PyTorch nn. Full analysis of RNN parameters
Larvel modify table fields
YYGH-BUG-04