Hi,
Solr has CPU and Memory circuit breakers that will terminate Search Requests
only.
See
https://solr.apache.org/guide/solr/latest/deployment-guide/circuit-breakers.html
for docs.
Example:
<circuitBreaker class="solr.CircuitBreakerManager" enabled="true">
<str name="memEnabled">true</str>
<str name="memThreshold">75</str>
<str name="cpuEnabled">true</str>
<str name="cpuThreshold">75</str>
</circuitBreaker>
A Solr node typically gets overloaded by the combined update and query traffic,
and
I'm looking into enabling ciricuit breakers for update requests. For many
workloads, pausing
update traffic would resolve the situation, with the benefit of users not being
affected by aborted
queries.
So ideally I'd want to be able to choose to enable/disable CB on update/query
individually.
Or better, to kill update requests on e.g. 80% threshold and search requests on
90% threshold.
The current breaker impl for search
<https://github.com/apache/solr/blob/branch_9_2/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java#L372:380>
[1] is hardcoded into SearchHandler in such a way that if ANY
of the configured breakers trips, search requests are aborted. Also the
breakers seem to be generic
in nature, named CPUCircuitBreaker
<https://github.com/apache/solr/blob/branch_9_2/solr/core/src/java/org/apache/solr/util/circuitbreaker/CPUCircuitBreaker.java>
and MemoryCircuitBreaker
<https://github.com/apache/solr/blob/branch_9_2/solr/core/src/java/org/apache/solr/util/circuitbreaker/MemoryCircuitBreaker.java>,
so adding new UpdateCPUCircuitBreaker
does not seem to be the intention here.
I'm also unclear on the usefulness of having CB on the core level and not the
node level. If you have
10 cores from 10 collections on a node, and only some have CBs while others do
not, the node will
still be overloaded unless the admin convinces every collection owner to
implement the same CBs?
So my question becomes - how do we enable CB for update requests into this mix
in a clean way?
Jan