目录

es扩容节点以后写入数据量增加1倍

目录

es扩容节点以后写入数据量增加1倍

背景:

es扩容一倍的数据节点以后 写入数据量增加1倍

业务反馈业务访问量没增加。

最后定位是监控数据:

PUT _cluster/settings
{
  "persistent": {
        "xpack.monitoring.collection.enabled" : "false"
  }
}

这个索引记录的是 节点的状态 统计了每个节点 索引数 查询情况 资源使用情况等等很多的数据 节点多 shard 多 数据量就大, 不需要禁止掉。

禁止以后qps就降低了。

https://i-blog.csdnimg.cn/direct/c15af092d3b24d26a4ad76bcf143bd23.png

查看配置

GET _cluster/settings?flat_settings&include_defaults

其它配置

配置监控数据只保留1天。

PUT _cluster/settings
{"persistent": {"xpack.monitoring.history.duration":"1d"}}