如何为ELK Stack中的节点分配CPU,RAM,Disk,Shards?

How to allocate CPU,RAM,Disk,Shards to nodes in ELK Stack?

我用 3 个节点 制作了一个 ELK STACK,其中一个节点是主节点,两个数据节点。 假设我有大约 1GB 的数据要与集群一起使用。 我需要知道

我在 Ubuntu 平台上构建 ELK Stack。

系统 1 属性

系统 2 属性

系统 3 属性

由于有 3 个节点,我将分片数设置为 9 ?( 3*3=9)。使用 Rest API。

curl -X POST "http://localhost:9200/_template/default" -H 'Content-Type: application/json' -d'
{
  "index_patterns": ["*"],
  "order": -1,
  "settings": {
    "number_of_shards": "9",
    "number_of_replicas": "1"
  }
}
'

不知道对不对

我需要建立一个健康的集群。

是否有分配分片、副本、RAM、磁盘space等的方法或参数?

有什么方法可以根据文件大小找到理想的分片数量吗?

必须为每个节点分配多少 CPU 核心?

到目前为止,我参考了以下链接来构建 ELK 集群。

碎片详情

一般来说,如果您预计数据不会显着增长,我们建议:

One primary shard is fine if you have less than 100K documents

One primary shard per node is good if you have over 100K documents

One primary shard per CPU core is good if you have at least a couple million documents

一个索引可以有多个分片,但任何给定的分片只能属于一个索引。

参考:https://docs.bonsai.io/article/122-shard-primer