6 comments

[ 3.2 ms ] story [ 27.4 ms ] thread
Index aliases are one of the most underappreciated features in ES. In general, when building an app that uses ES I’d recommend to always hide the actual index behind an alias. There’s a minor error in the post: you can write to an alias, but only if it points to exactly one index. By using an alias to read and write, the actual index is hidden from the app. This allows tweaking indices and doing test runs on two indices with different mappings/settings by modifying the alias. Especially when doing performance or scoring optimizations, this can massively improve your agility when testing such a change.
Meanwhile, my biggest issue with elasticsearch is that for any kind of system where you have indices of different sizes (eg you have several data models being indexed), your cluster will make no attempt at trying to distribute smartly and instead will stop at "same number of indices per node". Which means you very often end up with a very unbalanced cluster with regards to disk usage. For earlier versions there was a plugin that had a smarter allocator, which would look at disk usage when assigning nodes, but for any recent ES cluster (>2.0) you're left with a shrug.
I have this issue as well. I just over-allocate nodes to my cluster so every node is comfortably below a disk usage threshold rather than waste time on optimizing this.
(comment deleted)