'maximum'에 해당되는 글 1건

  1. 2020.03.19 [Elasticsearch] 작은 팁!!

[Elasticsearch] 작은 팁!!

Elastic/Elasticsearch 2020. 3. 19. 20:15

Elasticsearch 를 사용 하다 보면 Maximum 값에 대한 궁금증이 생길 때가 있습니다.

지나가다 또 기억 못할 까봐 적어 봅니다.

 

1. Shard 하나가 가질 수 있는 최대 Document/Term 의 수는 대략 21억개 입니다.

Elasticsearch 에서 Shard 는 Lucene 기준에 Segments 에 해당 합니다.

공식 문서에는 아래와 같이 나와 있습니다.

https://lucene.apache.org/core/8_4_1/index.html

https://lucene.apache.org/core/8_4_1/core/org/apache/lucene/codecs/lucene84/package-summary.html#Limitations

Lucene uses a Java int to refer to document numbers, 
and the index file format uses an Int32 on-disk to store document numbers. 
This is a limitation of both the index file format and 
the current implementation. 
Eventually these should be replaced with either UInt64 values, 
or better yet, VInt values which have no limit.

 

그래서 == 2,147,483,647

 

2. Shard  1개의 크기는 너무 작아도 너무 커도 안됩니다.

실시간 서비스를 위한 용도로는 ~ 10GB

백오피스 운영을 위한 용도로는 ~ 50GB (그러나 Aggregation 질의가 많고 검색 범위가 넓을 경우 20GB 정도로 사용하세요.)

정답은 없으며, 다양한 환경에 따라 적절히 구성해서 사용을 하셔야 합니다.

 

3. Document 1개의 크기는 최대 2GB 까지 입니다.

그러나 이렇게 까지 사용 하시라고 절대 저는 추천 하지 않습니다.

 

: