Cluster 19

1-02-2. Cluster Health

Many statistics can be monitored in an Elasticsearch cluster, but the single most important one is cluster health, which reports a status of either green, yellow, or red:Elasticsearch cluster를 모니터링할 수 있는 많은 통계가 있지만, 가장 중요한 하나는 cluster health 이다. 이것은 green, yellow, red 중의 하나로 표시되어 status 로 보고된다.GET /_cluster/healthCOPY AS CURLVIEW IN SENSE On an empty cluster with no indices, this will return som..

1-02-3. Add an Index

To add data to Elasticsearch, we need an index—a place to store related data. In reality, an index is just a logical namespace that points to one or more physical shards.Elasticsearch에 데이터를 추가하기 위해서는, 관련된 데이터를 저장할 수 있는 장소인 index 가 필요하다.실제로, index는 하나 이상의 물리적인 shards 를 가리키는 logical namespace 이다.A shard is a low-level worker unit that holds just a slice of all the data in the index. In Inside a Sh..

1-02-4. Add Failover

Running a single node means that you have a single point of failure—there is no redundancy.Fortunately, all we need to do to protect ourselves from data loss is to start another node.단일 node를 실행한다는 것은 단일 장애 지점을 가지고 있다(복사본이 없다)는 것을 의미한다. 다행히, 데이터 손실을 피하기 위해, 해야 할 것은, 다른 node를 시작하는 것뿐이다.두 번째 node를 시작하려면To test what happens when you add a second node, you can start a new node in exactly the same wa..

1-02-5. Scale Horizontally

What about scaling as the demand for our application grows? If we start a third node, our cluster reorganizes itself to look like Figure 4, “세 개의 node를 가진 cluster(shard는 부하를 분산하기 위하여 재할당되었다)”.응용프로그램에 대한 수요가 증가함에 따라, 확장하면 어떠할까? 세 번째 node를 시작하면, cluster는 Figure 4, “세 개의 node를 가진 cluster(shard는 부하를 분산하기 위하여 재할당되었다)”처럼 스스로를 인식할 것이다.Figure 4. 세 개의 node를 가진 cluster(shard는 부하를 분산하기 위하여 재할당되었다) One shar..

1-02-6. Coping with Failure

We’ve said that Elasticsearch can cope when nodes fail, so let’s go ahead and try it out. If we kill the first node, our cluster looks like Figure 6, “node 하나를 kill한 후의 cluster”.node에 장애가 발생할 경우, Elasticsearch는 대응할 수 있다고 했는데, 한 번 test해 보자. cluster의 첫 번째 node를 kill하면, Figure 6, “node 하나를 kill한 후의 cluster”처럼 보일 것이다.Figure 6. node 하나를 kill한 후의 cluster The node we killed was the master node. A clust..

1-04-2. How Primary and Replica Shards Interact

For explanation purposes, let’s imagine that we have a cluster consisting of three nodes. It contains one index called blogs that has two primary shards. Each primary shard has two replicas. Copies of the same shard are never allocated to the same node, so our cluster looks something like Figure 8, “1개의 index와 3개의 node를 가진 cluster”.설명을 위해, 3개의 node를 가진 cluster를 가정해 보자. 그것은 2개의 primary shard를 가진 ..

1-10-02. Deleting an Index

To delete an index, use the following request:index를 삭제하기 위해서, 아래 request를 사용한다.DELETE /my_indexYou can delete multiple indices with this:아래와 같이, 다수의 indices를 지울 수도 있다.DELETE /index_one,index_two DELETE /index_*You can even delete all indices with this:_모든_ indices를 지울 수도 있다.DELETE /_all DELETE /*For some, the ability to delete all your data with a single command is a very scary prospect. If you..

7-1-2. Cluster Health

An Elasticsearch cluster may consist of a single node with a single index. Or it may have a hundred data nodes, three dedicated masters, a few dozen client nodes—all operating on a thousand indices (and tens of thousands of shards).Elasticsearch의 cluster는 단일 index를 가진 단일 node로 구성되어 있을 수 있다. 또는 모두 천 개의 index(그리고, 수만 개의 shard를 가지고 있는)에서 운영되는, 수백 개의 데이터 node, 3개의 전용 master node, 수십 개의 클라이언트 node 등을..

7-1-4. Cluster Stats

The cluster-stats API provides similar output to the node-stats. There is one crucial difference: Node Stats shows you statistics per node, while cluster-stats shows you the sum total of all nodes in a single metric.cluster-stats API는 node-stats 와 유사한 출력을 제공한다. 결정적인 차이점이 하나 있는데, node-stats 는 node 별 통계를 보여주는 반면에, cluster-stats 는 모든 node의 총 합을 하나의 통계로 보여준다.This provides some useful stats to glance..