Under watch execution, it is noted that
"On each node, that contains one of the .watches shards, a scheduler, that is bound to the watcher lifecycle runs. On each node, that contains one of the .watches shards, a scheduler, that is bound to the watcher lifecycle runs. Even though all primaries and replicas are taken into account, when a watch is triggered, watcher also ensures, that each watch is only triggered on one of those shards. The more replica shards you add, the more distributed the watches can be executed. If you add or remove replicas, all watches need to be reloaded. If a shard is relocated, the primary and all replicas of this particular shard will reload.
Because the watches are executed on the node, where the watch shards are, you can create dedicated watcher nodes by using shard allocation filtering.
You could configure nodes with a dedicated node.attr.role: watcher property and then configure the .watches index like this:
PUT .watches/_settings
{
"index.routing.allocation.include.role": "watcher"
}"
- Here, by nodes are they referring to physical nodes in the elasticsearch cluster. And do watchers have their own shards?
- Can you elaborate on The more replica shards you add, the more distributed the watches can be executed.
- What is the use of creating dedicated watcher nodes? Do we assign an existing node in the cluster itself as a watcher node or is it a new physical node