Shard 26

1-11. Inside a Shard

In Life Inside a Cluster, we introduced the shard, and described it as a low-level worker unit. But what exactly is a shard and how does it work? In this chapter, we answer these questions:Life Inside a Cluster에서, low-level worker unit 이라 묘사된, shard를 소개했었다. 이 장에서는 shard가 정확이 무엇이고, shard가 동작하는 방법에 대한 설명을 하도록 하겠다.Why is search near real-time?왜 검색은 실시간에 가까운가?Why are document CRUD (create-read-updat..

1-11-2. Dynamically Updatable

The next problem that needed to be solved was how to make an inverted index updatable without losing the benefits of immutability? The answer turned out to be: use more than one index.해결해야 할 다음 문제는, 불변성의 장점을 잃지 않고, inverted index를 업데이트 가능하도록 만드는 방법이다. 답은 하나 이상의 index를 사용하는 것이다.Instead of rewriting the whole inverted index, add new supplementary indices to reflect more-recent changes. Each invert..

6-4-01. The Unit of Scale

In Dynamically Updatable Indices, we explained that a shard is a Lucene index and that an Elasticsearch index is a collection of shards. Your application talks to an index, and Elasticsearch routes your requests to the appropriate shards.Dynamically Updatable Indices에서, shard는 Lucene의 index 이고, Elasticsearch의 index는 shard의 집합이라고 설명했었다. 응용프로그램이 index에 request하면, Elasticsearch는 적절한 shard에 해당 reque..

6-4-02. Shard Overallocation

A shard lives on a single node, but a node can hold multiple shards. Imagine that we created our index with two primary shards instead of one:shard는 단일 node에 존재하지만, node는 여러 개의 shard를 가질 수 있다. 하나가 아닌 두 개의 primary shard를 가진, index를 생성했다고 가정해 보자.PUT /my_index { "settings": { "number_of_shards": 2, "number_of_replicas": 0 } }replica shard 없이, 두 개의 primary shard를 가진 index를 생성With a single node, both..

6-4-03. Kagillion Shards

The first thing that new users do when they learn about shard overallocation is to say to themselves:새로운 사용자가 shard 초과 할당에 대해 배울 때, 처음 하는 일은, 다음과 같이 결정하는 것이다. I don’t know how big this is going to be, and I can’t change the index size later on, so to be on the safe side, I’ll just give this index 1,000 shards…이것이 앞으로 얼마나 커질지 잘 모르겠다. 나중에 index 크기를 변경할 수 없으니, 안전하게 하기 위해, 이 index에 1,000개의 shard를 할당..

6-4-05. Replica Shards

Up until now we have spoken only about primary shards, but we have another tool in our belt: replica shards. The main purpose of replicas is for failover, as discussed in Life Inside a Cluster: if the node holding a primary shard dies, a replica is promoted to the role of primary.지금까지는 primary shard에 대해서만 이야기했다. 그러나 replica shard라는 또 다른 도구를 가지고 있다. Life Inside a Cluster에서 언급했지만, replica shard의 주..