Setting up different node roles
Elasticsearch is natively designed for the cloud, so when you need to release a production environment with a huge number of records and you need high availability (HA) and good performance, you need to aggregate more nodes in a cluster.
Elasticsearch allows you to associate different roles to nodes to balance and improve overall performance.
Getting ready
As described in the Downloading and installing Elasticsearch recipe, you need a working Elasticsearch installation and a simple text editor to change the configuration files.
How to do it…
For the advanced setup of a cluster, there are some parameters that must be configured to define different node types.
These parameters are in the config/elasticsearch.yml
, file and they can be set with the following steps:
- Set up whether the node can only be a master, as follows:
node.roles: [ master ]
- Set up whether a node can only contain data, as follows...