In the Elasticsearch cluster, you must create at least one node of each type (main, client, and data node).
It is recommended that you calculate the maximum number of data nodes on a specific server using the following formula:
V / 60 = X,
where V
is the size of all RAM on the server in gigabytes and X
is the maximum number of data nodes on the same server.
For example, on a server with 128 GB of RAM, 128 / 60 = 2.1(3) ≈ 2 data nodes can be running.
Requirements for the number of processor cores
The minimum number of processor cores is as follows:
- For the operation of one main node: 2
- For the operation of one client node: 2
- For the operation of one data node: 6
RAM requirements
It is recommended that all Elasticsearch nodes use no more than half of the server RAM on a server.
A maximum of 30 GB of RAM must be allocated for one data node.
Calculating the number of index fragments in a cluster
The Elasticsearch module saves traffic metadata in index fragments. You must calculate the maximum number of fragments that can be created based on hardware resources and the amount of metadata recorded daily. The size of each fragment must not exceed 50 GB.
To calculate the maximum number of index fragments, you need to divide the approximate traffic metadata volume in gigabytes written in one day by 50. The division result must be increased to a multiple of the number of data nodes in the Elasticsearch cluster. The resulting number is the maximum number of index fragments.
For example, if you plan to write 500 GB of metadata using four data nodes, the cluster must contain 500/50 + 2 = 12 fragments (3 fragments per data node). If you increase the daily amount of metadata, you must increase the number of fragments so that the size does not exceed 50 GB.