Uninote
Uninote
用户根目录
emoji test🧚
欢迎你
爱神的飞刀
都市风光
🧚🧚
🧚🧚2
🧚🧚3
__import__
ELK集群部署
JS面向对象函数的四种调用模式
Java入门学习路线目录索引(持续更新中)
c
个人文库
掘金
ElasticSearch + Logstash进行数据库同步
ElasticSearch两个节点的情况下,shard是如何分配的
ElasticSearch安装教程
ElasticSearch设置用户名密码访问
ElasticSearch适用场景,功能以及特点介绍
Kali Linux安装教程
Linux设置虚拟内存教学和实战
Xdebug文档(一)基本特性
docker
init
vuex的源码一些理解
使用nginx控制ElasticSearch访问权限
使用python的scrapy来编写一个爬虫
再见 Docker,是时候拥抱下一代容器工具了
前端工具集(辅助工具、开发工具、技术栈、学习网站)
剖析ElasticSearch基础分布式架构
剖析ElasticSearch核心概念,NRT,索引,分片,副本等
原型链
推荐几款Linux下比Notepad++好的编辑器软件
搭了一个 wordpress 站点
收集整理的一些前端资源
浏览 GitHub 太卡了?教你两招!
用最简单的话告诉你什么是ElasticSearch
网络是怎样连接的?从浏览器输入URL开始
解决ChromeDriver安装与配置问题
**游记/杂记**
a
a
a
b
c
c
b
a
a
x
s
a
c
network
https
vue-src
index
_posts
hello
about
index
coc
index
menu
index
perf
index
support-vuejs
index
v2
api
index
cookbook
adding-instance-properties
avoiding-memory-leaks
client-side-storage
creating-custom-scroll-directives
debugging-in-vscode
dockerize-vuejs-app
editable-svg-icons
form-validation
index
packaging-sfc-for-npm
practical-use-of-scoped-slots
serverless-blog
unit-testing-vue-components
using-axios-to-consume-apis
examples
commits
deepstream
elastic-header
firebase
grid-component
hackernews
index
modal
select2
svg
todomvc
tree-view
guide
class-and-style
comparison
components
components-custom-events
components-dynamic-async
components-edge-cases
components-props
components-registration
components-slots
computed
conditional
custom-directive
deployment
events
filters
forms
index
installation
instance
join
list
migration
migration-vue-router
migration-vuex
mixins
plugins
reactivity
render-function
routing
single-file-components
ssr
state-management
syntax
team
transitioning-state
transitions
typescript
unit-testing
search
index
style-guide
index

背景

在中小型企业开发中,一般的采用的是两个节点来作为集群(也有可能是单机集群),我们现在一个indexß,需要存储在2个节点中。

介绍

本文将介绍在两个node情况下,shard是如果分配的,这里只说两个node是因为两个node已经可以组成一个完整的集群了,所以只要是两个或者两个以上的node都是像本文一样进行分配shard的。

所有主分片在一台机器上

先来介绍一下所有paimary shard都在一个节点上面的情况,replica shard在另一台节点上面,如图有两个节点,一个索引,索引被分成5个primary shard和一个replica shard 下图将展示所有分片分在同一个node上面的情况, 相当于所有的主分片存储在一台机器上面,副分片也存在一台机器上面,这个并没有违背primary shard 和 replica shard 不能存在同一台机器上面的原则。

主分片不在一台机器上

这里就介绍一下所有的主分片不在同一台机器上面的情况,所有的主分片不在同一台机器上面的时候,那么也就意味着这里是可能主副分片存放在一起,还是先看下没有进行分片的情况下的样子。 下图就是primary shard 和 replica shard 不在同一台节点上面分片过后可能产生的状态。

点赞(0) 阅读(59) 举报