@Christian_Dahlqvist thanks for pointing to the shard allocation awareness.
@DavidTurner wont using shard allocation awareness ensure that ES always write a copy to non-ram disk nodes, if that is how I segregate the nodes?
To give some further details and background, our ES cluster is focused towards search of structured data. So we will be able to reindex the data from scratch from SOR, if everything goes south in worst case scenario. Our data itself is not too big (less than 15 GB) and can be reindexed in matter of few minutes.
Now coming back to why I want to try this out. We are partially re-purposing our existing servers which currently run our app layer and web layer. Over period of time, all our apps have been converted to client side apps. So the web servers are not really doing much apart from serving the initial page load. So we are running our ES as windows service on both these type of servers, along with them continuing to support current apps.
The thought was that on these web servers, we could potentially run ES as in purely in-memory mode and on app servers, we run it with disk mode. From request routing perspective, plan was to create a VIP with loader balancing between the web servers and route all search requests into this VIP, where as all indexing requests can go to another VIP on the app servers. We have 3 web and 3 app servers from load balancing perspective.
I get your point about "if data can anyway fit in memory, then ES will anyway serve it from RAM". But for this to happen, the entire index has to be loaded into memory. Previously, we could index warmer queries, which has been removed long time back. So now, the way to achieve this would be via index.store.preload option. The downside for me to use this setting is that this will be applied across nodes on the cluster, where this index resides. So even on the servers, where I don't intend to route my search traffic, this will end up happening. So I will still need to have RAM to back this up on servers where I dont want to route the search traffic.
Similar to the shard awareness feature, if the preload settings could be controlled at an attribute level, then I think that we could still go with regular disk based setup. Only on the nodes where search traffic has to be routed, this attribute would be set and the index would be preloaded. Is this something can be requested as a feature?
To also add, shard allocation awareness also works better, as it will prefer local shards. So essentially, our search requests would try to serve the response only from the shards on the web servers as we would be routing all search requests to it.