-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
area/circuit-breakingIssues or PRs related to circuit breakingIssues or PRs related to circuit breakingkind/featureCategory issues or prs related to feature request.Category issues or prs related to feature request.
Milestone
Description
##Sentinel以后会增加熔断半打开状态吗?
Type: feature request
你好,发现目前的DegradeRule中不存在熔断的半打开状态,也就是当熔断窗口时间(timeWindow)到达以后,熔断会关闭,这时如果被调用服务还未恢复,有可能会造成大量请求失败或阻塞。而Hystrix中的熔断有一个半打开状态,只允许个别请求通过,确认被调用服务恢复后才关闭熔断。Sentinel以后有考虑增加这方面功能的改进吗?
synchronized (lock) {
if (!cut) {
// Automatically degrade.
cut = true;
ResetTask resetTask = new ResetTask(this);
pool.schedule(resetTask, timeWindow, TimeUnit.SECONDS);
}
return false;
}
......
private static final class ResetTask implements Runnable {
private DegradeRule rule;
ResetTask(DegradeRule rule) {
this.rule = rule;
}
@Override
public void run() {
rule.getPassCount().set(0);
rule.setCut(false);
}
}
Metadata
Metadata
Assignees
Labels
area/circuit-breakingIssues or PRs related to circuit breakingIssues or PRs related to circuit breakingkind/featureCategory issues or prs related to feature request.Category issues or prs related to feature request.