All Questions
Elasticsearch hard

Retrieving a document by ID (`GET /idx/_doc/1`) is considered 'Real-Time', whereas a query (`GET /idx/_search`) is 'Near Real-Time'. Why?

  1. A GET-by-ID is routed directly to the Master node's in-memory routing table.
  2. B The GET API synchronously checks the Transaction Log (Translog) for the most recent version of a document if it has not yet been flushed/refreshed into a searchable Lucene segment.
  3. C Search queries require a cluster-wide lock, while GET-by-ID does not.
  4. D GET-by-ID uses UDP for faster transmission than the HTTP-based search API.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions