[Elasticsearch - The Definitive Guide] bulk-format

Elastic/TheDefinitiveGuide 2015. 11. 30. 11:43

Elasticsearch에서 bulk request 시 사용하는 format 에 대한 이야기 입니다.

이 이야기를 기록하는 이유는 elasticsearch 내부에서 동작하는 원리를 쉽게 이해 할 수 있기 때문 입니다.


원문링크)

https://www.elastic.co/guide/en/elasticsearch/guide/current/distrib-multi-doc.html#bulk-format


[Why the funny format?]

  • Parse the JSON into an array (including the document data, which can be very large)
  • Look at each request to determine which shard it should go to
  • Create an array of requests for each shard
  • Serialize these arrays into the internal transport format
  • Send the requests to each shard


정리하자면,

bulk request 를 받아서 다시 풀고 적절한 node의 shard 로 forward 되도록 생성한 후 send or request 한다 입니다.

: