Feature Overview
Instance-level circuit breaking rules are used to perform circuit breaking for multiple service instances or individual service instances under specific groups.
Usage Instructions
To implement service circuit breaking, two steps are required:
Step 1: Set circuit breaking rules and active probing rules in the console.
Step 2: Integrate circuit breaking capability on the client side.
For detailed operation instructions, refer to the following section.
Step 1: Configure Circuit Breaking Rules
2. In the left sidebar, select Polaris (North Star), and then select the target engine instance on the instance details page.
3. Click Circuit Breaking and Degradation in the left sidebar to go to the circuit breaking rules display page, and click New Circuit Breaking Rule.
The meanings of the fields in the interface are as follows:
Basic Information:
Rule name: The rule name must be globally unique, is required, and cannot exceed 64 characters.
Description: The description of the rule, used to provide additional information about the rule. (Optional.)
Priority: A smaller number indicates a higher priority.
Matching Conditions: Matching conditions are primarily used to determine the scope of application for circuit breaking rules. Clients use these conditions to filter the applicable circuit breaking rules for local invocations.
Calling Service: Configure the service name and namespace of the calling party. (Optional.) If not configured, it takes effect for all callers by default.
Called Service: Configure the service name and namespace of the called party. (Optional.) If not configured, it takes effect for all called services by default.
Additionally, the service name specified in the circuit breaking rules can be any service name and does not necessarily have to exist in the Polaris registry.
Circuit Breaking Granularity: Select Instance.
Circuit Breaking Configuration:
Circuit Breaking Policy:
Error Judgment Conditions: Multiple judgment conditions can be configured. Requests that meet any of the conditions will be identified as error requests. Supports two judgment methods: return code and latency.
Circuit Breaking Trigger Conditions: Multiple trigger conditions can be configured. If any condition is met, circuit breaking is triggered and resources enter the circuit breaking state. Supports two types of trigger conditions: number of consecutive errors and error rate.
Consecutive Error Count: When the number of consecutive errors reaches the threshold, circuit breaking is triggered.
Error Rate: The error rate of requests invoking this v within the statistical period is calculated. Circuit breaking is triggered when the error rate reaches the threshold. To prevent amplification effects under low traffic, a minimum request threshold can be configured for error rate statistics—circuit breaking is evaluated only when the number of requests exceeds this threshold.
Circuit Breaking Recovery Policy:
Circuit Breaking Recovery: After circuit breaking is triggered on a resource, requests to that resource are blocked for a period of time. The system then attempts to recover the resource. When a specified number of consecutive successful requests are achieved, the resource returns to the normal state. Users can configure the circuit breaking duration (in seconds) and the number of consecutive successful requests.
Active Probing: You can choose to enable active probing. When active probing is enabled, the caller initiates probes to the callee based on the probing rules associated with the callee service/interface. The probing results are combined with business invocations and serve as one of the bases for triggering or recovering from circuit breaking.
Whether to Enable: Select whether to enable this rule.
Step 2: Integrate Circuit Breaking Capability on the Client Side