Just an important note here, when using awareness allocation, and lets say you "hit" a node on rack1 (i.e. send an HTTP search request that will hit nodeX on rack1), it will prefer to execute the search "within the rack" if possible, i.e., it will prefer copies of shards that exist on nodes within rack1, compared to going "outside" of the rack.
Hi Govind,
On Sat, Jan 5, 2013 at 6:10 AM, Govind Chandrasekhar govind201@gmail.com wrote:
Hi Radu,
Thanks for that. Are there any good resources for better understanding how the query scattering and gathering process is conducted?
I think this is a good place to look:
Elasticsearch Platform — Find real-time answers at scale | Elastic
If I were to create 3 spot racks + 1 reserved rack as you mentioned, will average query response time improve (aside from the benefit of support for more concurrent connections + larger cache) , i.e., will the query be scattered across all the racks, making use of CPU resources in all racks?
One query is sent to one set of shards (whether they are primaries or replicas it doesn't matter). So in the 4-rack scenario, if you run a single query when all is quiet and we ignore the state of caches and other possible variables, you should get the same X response time no matter which shards your query hits. In your 2-rack scenario, I would assume queries that hit shards with 3x nodes would be faster. So the average query time should be better.
However, if you have more than 2 concurrent queries on average, I would expect the 4-rack scenario to get you better average times. And more consistent times of course - because all nodes would have the same load. Plus there's less chance of a bottleneck on your reserved instances.
I'd also recommend to run a test and see the real-life results. And observe the load, too.
Also, are the caches of each of these nodes interlinked - if a filter is cached in node A but the query is directed to node B, will the cached filter on node A be used or will the filter be rebuilt on node B?
The filter will run on the selected shard and benefit from the cache of the node where the shard is located. So node B won't benefit from the cache on node A.
You can warm up the caches if you use 0.20+ by using the Warmers API:
Elasticsearch Platform — Find real-time answers at scale | Elastic
Best regards,
Radu
http://sematext.com/ -- Elasticsearch -- Solr -- Lucene
Govind
On Thursday, January 3, 2013 2:59:32 AM UTC-8, Radu Gheorghe wrote:
Hello Govind,
On Mon, Dec 31, 2012 at 6:27 PM, Govind Chandrasekhar govi...@gmail.com wrote:
I currently run my Elasticsearch cluster on 'Y' number of AWS EBS backed reserved (reliable) instances. I'm now exploring the possibility of introducing '3Y' AWS spot instances (unreliable but very cheap) with the same specs into the system, turning them on and off depending on the load on the cluster.
So:
'Y' reserved (reliable) machines
'3Y' spot (unreliable) machines
I want at least one copy of each shard to be available on the 'Y' reserved (reliable) machines, therefore I've placed all 'Y' reserved instances in "rack1" and '3Y' spot instances in "rack2" with forced awareness (Elasticsearch Platform — Find real-time answers at scale | Elastic) and one replica for each shard.
Thus, the Y reserved instances will now have ~3 times as many shards as the 3Y spot instances and "rack1" will cumulatively have lesser memory and CPU. As a result, will searches that are directed to the 'Y' reserved instances be slower than searches that are directed to the '3Y' spot instances?
Yes, searches that will hit the busy nodes should be slower. But you can fix that by having 4 racks: 1 with the Y reserved instances and 2,3 and 4 as equal numbers within your poll of 3Y spot instances. Then make 3 replicas instead of 1 and you should have everything balanced. Plus, your cluster should handle more concurrent searches.
Or will a search directed at "rack1" (which, within itself, contains 1 copy of each shard) be scattered/gathered across all nodes, including those in "rack2"?
AFAIK, ES simply round robins between the needed shards (primaries and replicas don't matter here, unless you specify that in your search preferences[0]). So it won't be aware that some shard will return results faster than others.
[0] Elasticsearch Platform — Find real-time answers at scale | Elastic
Best regards,
Radu
http://sematext.com/ -- Elasticsearch -- Solr -- Lucene
--
--