问题背景

项目中全文检索接口响应时间超30s,排查接口逻辑,耗时主要花在es查询上,故对es集群进行排查。把接口请求生成的dsl拿去kibana中执行,发现响应时间确实太长,于是开始排查es健康问题

通过es命令对集群情况进行分析,得到以下结果:

1.集群健康状况为yellow,存在大量副本分片未分配情况;

{"cluster_name" : "cdb*","status" : "yellow","timed_out" : false,"number_of_nodes" : ***,"number_of_data_nodes" : ***,"active_primary_shards" : ***,"active_shards" : ***,"relocating_shards" : ***,"initializing_shards" : ***,"unassigned_shards" : 214, // ~注意看这里"delayed_unassigned_shards" : ***,"number_of_pending_tasks" : ***,"number_of_in_flight_fetch" : ***,"task_max_waiting_in_queue_millis" : ***
}

2.某个节点因位置原因导致连接不上,集群触发分片恢复;(1.把所有丢失的副本分片重新分配到集群其他健康节点中2.rebalancing操作)

{"unassigned_info": {"reason": "NODE_LEFT","at": "2020-11-20T03:12:16","details": "node_left ***","last_allocation_status": "no_attempt"}
}

3.分片恢复并发数(源节点并发数和目标节点并发数)使用的默认设置,导致分片恢复并发拉满,恢复速度过慢 ;

(cluster.routing.allocation.node_concurrent_incoming_recoveries=2、cluster.routing.allocation.node_concurrent_outgoing_recoveries=2)

问题描述:
{"node_id": "***","node_name": "mastersha","transport_address": "***","node_decision": "throttled","deciders": [{"decider": "throttling","decision": "THROTTLE","explanation": "reached the limit of incoming shard recoveries [2], cluster setting [cluster.routing.allocation.node_concurrent_incoming_recoveries=2] (can also be set via [cluster.routing.allocation.node_concurrent_recoveries])"}]
}{"node_id": "***","node_name": "master","transport_address": ***,"node_decision": "no","store": {"matching_sync_id": true},"deciders": [{"decider": "same_shard","decision": "NO","explanation": "the shard cannot be allocated to the same node on which a copy of the shard already exists [[index_execution][2], node[***], [P], s[STARTED], a[id=***]]"},{"decider": "throttling","decision": "THROTTLE","explanation": "reached the limit of outgoing shard recoveries [2] on the node [***] which holds the primary, cluster setting [cluster.routing.allocation.node_concurrent_outgoing_recoveries=2] (can also be set via [cluster.routing.allocation.node_concurrent_recoveries])"}]
}

注:

ES性能分析用到的一些DSL命令:

GET _cat/health
GET _cluster/health
GET _cat/nodes
GET _cluster/health?level=indices
GET _cluster/health?level=shards
GET _cluster/allocation/explain
GET _cat/indices
GET _cluster/state

es集群状态yellow排查相关推荐

  1. 精品分享:解决ES集群状态为yellow,原因(cannot allocate because allocation is not permitted to any of the nodes)

    新年第一天开工.兴致高高的来上班,想着拿个开门红包,红包没拿到.结果遇到了Elasticsearch有个索引状态为yellow.很好,很惊喜,perfect! 首先,介绍下个人理解的ES集群的三种状态 ...

  2. ES集群状态、节点、索引等查看及根据字段、排序查询

    ES集群基础: 1. 查看集群: http://172.xxx.xxx.8:9200 2. 查看状态: http://172.xxx.xxx.8:9200/_cat/health?v 3. 查看索引: ...

  3. elk 概念整理 集群状态 - yellow

    1. primary shard   -- raid0 2.replicas shard -- raid1 3.index -- 图书馆的借书指引 4.MySQL vs elasticsearch # ...

  4. ES命令行查询es集群的状态、分片、索引

    查看es集群状态 curl -XGET -uelastic -p http://172.18.35.144:9200/_cat/health?v cluster ,集群名称 status,集群状态 g ...

  5. Kubernetes 搭建 ES 集群(存储使用 local pv)

    推荐阅读 Helm3(K8S 资源对象管理工具)视频教程:https://edu.csdn.net/course/detail/32506 Helm3(K8S 资源对象管理工具)博客专栏:https: ...

  6. Kubernetes 搭建 ES 集群(存储使用 cephfs)

    推荐阅读 Helm3(K8S 资源对象管理工具)视频教程:https://edu.csdn.net/course/detail/32506 Helm3(K8S 资源对象管理工具)博客专栏:https: ...

  7. CentOS安装Elasticsearch_IK分词器拼音分词器_部署kibana_部署es集群

    CentOS安装Elasticsearch_IK分词器_部署kibana_部署es集群 一.部署单点es ①:创建网络 因为我们还需要部署kibana容器,因此需要让es和kibana容器互联.这里先 ...

  8. 【Elasticsearch】es 集群健康值 红色 red 分片 未分配

    1.概述 转载:https://zhuanlan.zhihu.com/p/101608973 转载这篇文章是因为根据我的文章 [Elasticsearch]elasticsearch 7.x 查看分片 ...

  9. ElasticSearch三master节点集群状态查看方法

    ES集群的状态实际上也是使用RESTful的接口,一般用的是GET方法 http://[主机IP]:[ES端口] 通常我们启动服务器之后,就可以通过这个简单的方式来验证服务器是否启动成功. 从下面返加 ...

  10. 处理Elasticsearch集群yellow和red状态

    原文出处:http://www.jwsblog.com/archives/59.html red 原因 red表示不是所有的主分片都可用,通常时由于某个索引的住分片为分片unassigned,只要找出 ...

最新文章

  1. tf.keras.layers.Conv1D 一维卷积 示例
  2. java 对象怎么序列化,java对象序列化总结
  3. RabbitMQ订阅者模式
  4. 11月17日学习内容整理:jquery文档处理,事件细讲,动画
  5. 做了一个画f(x,y)=0函数图像的算法,果断codeplex之
  6. openwrt运行linux软件,使用OpenWrt开发嵌入式Linux(二):先让系统跑起来(使用initramfs)...
  7. 不懂什么是 Java 中的锁?看看这篇你就明白了!
  8. 按月分隔时间段,java实现,DateRange
  9. 计算机网络实验三思考题,计算机网络实验思考题答案
  10. 微信记账小程序(附源码),你值得拥有!
  11. 关于路由器花生壳动态域名无法连接的解决方法
  12. VS项目下写.bat脚本清理中间文件,减少内存空间
  13. Snapde和Excel、PowerPivot、WPS打开超大CSV文件性能比较
  14. 02 推荐的起点:断物识人
  15. 【测试算法】深入浅出Pairwise 算法
  16. ORACLE EBS 请求日志打印工具-自动打印参数说明及参数值
  17. 【leetcode刷题笔记】动态规划
  18. 电磁阀的分类及应用范围
  19. 遇到不认识的字怎么办
  20. 【英语总结】十二月引领~

热门文章

  1. 我是这样搞懂一个神奇的BUG
  2. docker容器满了,如何清理内存
  3. 使用 Shiro 配合微信小程序或者app登录,做验权
  4. pon终端测试仪_6304-PON终端测试仪报价_测试仪-北京海富达科技有限公司
  5. matlabsvd提取特征值_在MATLAB中使用SVD压缩图像
  6. 计算机网络(十)CSMA详解
  7. 网络准入控制学习——Chap1
  8. 服务器网卡bond配置指引
  9. 【Word】去掉“项目符号/编号”之后的制表符
  10. 手机软件测试规范(含具体用例)