What are circuit breakers in Elasticsearch?
Answer
Circuit breakers are memory protection mechanisms in Elasticsearch that prevent operations from causing an OutOfMemoryError by estimating memory usage before allocating it and rejecting the request with a CircuitBreakingException (HTTP 429) if it would exceed configured limits. Key circuit breakers include: Field data circuit breaker (limits memory used by loading field data for aggregations and sorting — default 40% of heap), Request circuit breaker (limits memory for a single search request, including aggregation data structures — default 60% of heap), In-flight requests circuit breaker (limits memory for all currently in-flight requests — default 100% of heap), and the parent circuit breaker (overall limit across all child breakers — default 95% of heap). Monitor circuit breaker trips in logs and DevTools as they indicate memory pressure.
Previous
How do you optimize Elasticsearch indexing throughput?
Next
What is kNN vector search in Elasticsearch 8.x?
More Elasticsearch Questions
View all →- Advanced What are cluster health states in Elasticsearch and what causes each?
- Advanced What is hot-warm-cold architecture in Elasticsearch?
- Advanced What is Index Lifecycle Management (ILM) in Elasticsearch?
- Advanced What is Cross-Cluster Replication (CCR) and Cross-Cluster Search (CCS)?
- Advanced How do script_score and function_score work for custom relevance?