What kind of data is that? Time based data like logs, sensors, ...?
I guess it is because you mention the rollover API which is often used in that case.
At index time, plan A will perform better than plan B.
For plan B you said "shrink to only one shard". Do you mean that for Plan B you will use at index time more than one shard, let say 4 so 5m docs per shard, then after Shrink 20m docs for a single shard. Is that right?
I'd personally go to that route. So a mix of plan A and plan B:
Create index with x shards
Rollover the alias
Shrink the index to 1 shard
I recommend that you look at this video from @pmusa which explains all that in details.
in both plan, at index time, the write index has 5 shard
in plan B, I use alias named write_indexName, and rollover it , and then shrink the old index to only one shard.
and that you said "a mix of plan A and plan B" is the same what I mean plain B.
so, I donnot know, what "shard" means for a BLOCK_WRITE index (like just time based data, only write new data),
maybe we only need multi "shard" at index time ? we can use smaller index replace the use of "shard" ?
I means that, like time based data such as logs, we only write and never modify.
maybe we only need multi shard at index time ?
and then shrink it to ONE shard ?
at search time, we can split a big index that contain multi shard to multi index that contain only one shard?
can I say, there is NO NEED multi shard at search time?
I have multi index, that index data from 0 to 100000000 per day per index,
at beggin, I set 200000000 docs to rollover ( 1 replica ), 500G per index, 250G for primary, 6 primary shards
and it hard to prepare shrink
and it hard to recovery when it happen node disconnected. ( 3 node)
now I change it to 80000000 to rollover, and 200G per index, after shrink, 100G per shard.
may be too big?
4400 docs/second. and cdn log is too big witch contain session field.
and another, my node often load heavy when search or shrink ( not SSD ), it may cause node disconnected,
and it cost 12+ hours to recovery to green ( maybe it disconnected again at recovery time ), many old index set BLOCK_WRITE, but when disconnected for about 20s, all data recovery from remote than local, can you give some advice for this?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.