We have a 3 node elastic cluster running as part of our application. All the 3 are master eligible nodes. We also have mongodb cluster and our application cluster also running in the same node.
Design is, master of our application and mongodb always runs on the same node. Elastic master can be any of the 3 nodes.
There is high CPU usage when all the three (application, mongodb, elasticsearch) runs as master in same node. Particularly this is because we use BulkProcessor to index the documents in elasticsearch with concurrentRequests set as '4', elasticsearch is spawning 10 writer threads in this setup.
To reduce/distribute this CPU usage, would need to make sure that node that is running as master of our application and mongodb should not be elected as Elasticsearch master. Is there a way we can achieve this?