Elasticsearch easy
Elasticsearch is considered a 'Near Real-Time' (NRT) system. What is the practical implication of this for a developer?
- A Indexed data is physically deleted after 1,000 milliseconds.
- B There is a minor latency (typically 1s) between indexing a document and when it appears in search results due to the 'Refresh' process.
- C The database requires an atomic clock to synchronize across nodes.
- D It can only be used for streaming data from tools like Apache Kafka.
Answer: B. There is a minor latency (typically 1s) between indexing a document and when it appears in search results due to the 'Refresh' process.
Elasticsearch buffers writes. Every second, it 'Refreshes' the index to create a new searchable Lucene segment. This batching is highly efficient for disk throughput but means you shouldn't build systems that require absolute 'Read-Your-Writes' consistency within milliseconds.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What are the two primary reasons for configuring one or more 'Replica Shards' for an index?
- When a String field is mapped as `text`, what process is performed to enable full-text search capability?
- What is the primary benefit of splitting an Elasticsearch index into multiple 'Primary Shards'?
- Every document stored in an Elasticsearch index is uniquely tracked by which mandatory metadata field?
- Elasticsearch search results include a metadata field called `_score`. What does this value primarily indicate?
- What is the primary architectural purpose of Elasticsearch in a modern software stack?