Bird
Raised Fist0

You have an index with heavy write load and want to optimize indexing speed without losing data visibility for search. Which approach best balances performance and freshness?

hard🚀 Application Q15 of Q15
Elasticsearch - Performance and Scaling
You have an index with heavy write load and want to optimize indexing speed without losing data visibility for search. Which approach best balances performance and freshness?
ASet <code>index.refresh_interval</code> to a higher value during indexing, then manually refresh after bulk load
BSet <code>index.refresh_interval</code> to <code>0</code> to refresh after every write
CDisable refresh permanently by setting <code>index.refresh_interval</code> to <code>-1</code> and never refresh
DDelete the index and create a new one for each bulk load
Step-by-Step Solution
Solution:
  1. Step 1: Understand trade-off between refresh interval and indexing speed

    Frequent refreshes slow indexing but improve data freshness; less frequent refreshes speed indexing but delay visibility.
  2. Step 2: Choose best practice for heavy write load

    Setting a higher refresh interval during bulk indexing reduces refresh overhead, then manually refreshing after bulk load balances speed and search freshness.
  3. Final Answer:

    Set index.refresh_interval to a higher value during indexing, then manually refresh after bulk load -> Option A
  4. Quick Check:

    Adjust refresh interval for bulk, then manual refresh [OK]
Quick Trick: Increase refresh interval during bulk, refresh manually after [OK]
Common Mistakes:
MISTAKES
  • Setting refresh_interval to 0 causes slow indexing
  • Disabling refresh permanently loses search freshness
  • Deleting index wastes resources

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes