elasticsearch - 为什么elasticsearch仍然使用模数的简单路由值?

标签 elasticsearch sharding consistent-hashing

只是想知道为什么 elasticsearch 仍然使用这种简单的路由值方法来决定数据必须存储到哪个分片。实际上,这种方法限制了我们将来更改分片的数量。如果 elasticsearch 使用一致性哈希(或什至更好的技术)之类的方法,它可以让我们有机会在未来更改分片编号。有人对此有解释或想法吗?

最佳答案

从 Elasticsearch 版本 6.1.0 开始,索引拆分是可能的。请参阅发行说明:https://www.elastic.co/blog/elasticsearch-6-1-0-released .

Split Index documentation实际上更详细地解释了为什么 Elasticsearch 不使用 Consistent Hashing。

Consistent hashing only requires 1/N-th of the keys to be relocated when growing the number of shards from N to N+1. However Elasticsearch’s unit of storage, shards, are Lucene indices. Because of their search-oriented data structure, taking a significant portion of a Lucene index, be it only 5% of documents, deleting them and indexing them on another shard typically comes with a much higher cost than with a key-value store.

关于elasticsearch - 为什么elasticsearch仍然使用模数的简单路由值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46236029/

相关文章:

ruby-on-rails - 这种搜索称为什么类型,什么是最好的搜索方式?

database - SQLAlchemy、UUID、Sharding 和 AUTO_INCREMENT 主键……如何让它们协同工作?

cassandra - 如何确保一致性哈希有效?

hashtable - 一致性哈希 : Where is the data-structure of ring kept

添加已填充集合的新分片时,MongoDB 无法正确扩展

java - 一致性哈希如何工作?

elasticsearch - ElasticSearch中的内存不足与电路中断异常

elasticsearch - 如何在Elasticsearch中删除特定的响应正文内容

elasticsearch - Elasticsearch订单响应,然后进行构面

django 1.4 数据库路由器 - "cannot import name connection"