
Our Favorite Elasticsearch Features, Part 2: Index Aliases - cambiumdaniel
https://cambium.consulting/articles/2018/2/22/our-favorite-elasticsearch-features-part-2-index-aliases?utm_source=hacker_news&utm_campaign=elasticsearch
======
Xylakant
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.

------
vasco
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.

~~~
andrewvc
Have you seen
[https://www.elastic.co/guide/en/elasticsearch/reference/curr...](https://www.elastic.co/guide/en/elasticsearch/reference/current/disk-
allocator.html#disk-allocator) ? Elasticsearch does take into account disk
usage when balancing shards. Perhaps you haven't yet hit the (configurable)
high water mark where that rebalancing would occur?

I work for Elastic, but not on Elasticsearch.

