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.