当前位置:网站首页>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
边栏推荐
- Log4j2
- How to Visualize Missing Data in R using a Heatmap
- H5, add a mask layer to the page, which is similar to clicking the upper right corner to open it in the browser
- Flesh-dect (media 2021) -- a viewpoint of material decomposition
- 史上最易懂的f-string教程,收藏这一篇就够了
- Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
- Pytorch builds LSTM to realize clothing classification (fashionmnist)
- Leetcode922 按奇偶排序数组 II
- Codeforces 771-div2 C (trouble, permutation is not very good)
- CONDA common command summary
猜你喜欢

文件操作(详解!)

From scratch, develop a web office suite (3): mouse events

K-Means Clustering Visualization in R: Step By Step Guide

还不会安装WSL 2?看这一篇文章就够了

Thesis translation: 2022_ PACDNN: A phase-aware composite deep neural network for speech enhancement

How to Easily Create Barplots with Error Bars in R

Mish shake the new successor of the deep learning relu activation function

Applet link generation

HOW TO CREATE AN INTERACTIVE CORRELATION MATRIX HEATMAP IN R

Natural language processing series (II) -- building character level language model using RNN
随机推荐
时间格式化显示
GGPLOT: HOW TO DISPLAY THE LAST VALUE OF EACH LINE AS LABEL
自然语言处理系列(一)——RNN基础
Data analysis - Matplotlib sample code
Esp32 audio frame esp-adf add key peripheral process code tracking
Dynamic memory (advanced 4)
机械臂速成小指南(七):机械臂位姿的描述方法
ES集群中节点与分片的区别
easyExcel和lombok注解以及swagger常用注解
(C语言)八进制转换十进制
【2022 ACTF-wp】
pgsql 字符串转数组关联其他表,匹配 拼接后原顺序展示
高德地图测试用例
b格高且好看的代码片段分享图片生成
uniapp uni-list-item @click,uniapp uni-list-item带参数跳转
BEAUTIFUL GGPLOT VENN DIAGRAM WITH R
ORB-SLAM2不同线程间的数据共享与传递
Power Spectral Density Estimates Using FFT---MATLAB
Natural language processing series (II) -- building character level language model using RNN
5g era, learning audio and video development, a super hot audio and video advanced development and learning classic