Does elastic master node really delete or create an index?

I am just confuse that what exactly does master node do in cluster

According to my understanding it just maintain cluster state and each data node have cluster state information.

From this documentation https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html#cluster-state-api-desc
According to the above link
The role of master node is to maintain cluster state

And in this link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#master-node

The master node is responsible for lightweight cluster-wide actions such as creating or deleting an index, tracking which nodes are part of the cluster, and deciding which shards to allocate to which nodes. It is important for cluster health to have a stable master node.

Both are correct but what makes me confuse that does master node actually create or delete the index ?

It may not actually create/delete the index if the index doesn't exist on the current master, so the key words there are responsible for. It's up to the master to receive the request and then update the cluster state that is then pushed to all other nodes.

if client wants to push the documents into index the request will route to master that please create this index and update the cluster state that this specific index have this number of primary shards and replicas . Is it correct ?

No, once the index is created any node can accept a request to index documents into it and route the request accordingly.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.