Skip to content

Commit

Permalink
Add retry budget circuit breaker configuration to Destination Rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdbishop committed Jun 20, 2024
1 parent 341dd53 commit 4e8b763
Show file tree
Hide file tree
Showing 8 changed files with 1,211 additions and 360 deletions.
612 changes: 612 additions & 0 deletions kubernetes/customresourcedefinitions.gen.yaml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions networking/v1/destination_rule_alias.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

837 changes: 478 additions & 359 deletions networking/v1alpha3/destination_rule.pb.go

Large diffs are not rendered by default.

66 changes: 65 additions & 1 deletion networking/v1alpha3/destination_rule.pb.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions networking/v1alpha3/destination_rule.proto
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,8 @@ message LoadBalancerSettings {
// amount of requests.
// Currently this is only supported for ROUND_ROBIN and LEAST_REQUEST load balancers.
google.protobuf.Duration warmup_duration_secs = 4;

RetryBudget retry_budget = 5;
}

// Connection pool settings for an upstream host. The settings apply to
Expand Down Expand Up @@ -642,6 +644,10 @@ message ConnectionPoolSettings {
// The maximum number of concurrent streams allowed for a peer on one HTTP/2 connection.
// Defaults to 2^31-1.
int32 max_concurrent_streams = 8;

// The amount of concurrent retries allowed in the case of failure, a
// percentage of the active requests.
RetryBudget retry_budget = 9;
};

// Settings common to both HTTP and TCP upstream connections.
Expand All @@ -650,6 +656,20 @@ message ConnectionPoolSettings {
HTTPSettings http = 2;
}

message RetryBudget {
// The limit on concurrent retries as a percentage of active requests and
// active pending requests.
// ex. if there are 100 active requests and the budget_percent is set
// to 25, there may be 25 active retries.
// This parameter is optional. Defaults to 20%.
Percent budget_percent = 1;

// The minimum number of concurrent retries allowed for the retry budget.
// The limit on the number of active retries may never go below this number.
// This parameter is optional. Defaults to 3.
google.protobuf.UInt32Value min_retry_concurrency = 2;
}

// A Circuit breaker implementation that tracks the status of each
// individual host in the upstream service. Applicable to both HTTP and
// TCP services. For HTTP services, hosts that continually return 5xx
Expand Down
21 changes: 21 additions & 0 deletions networking/v1alpha3/destination_rule_deepcopy.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions networking/v1alpha3/destination_rule_json.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions networking/v1beta1/destination_rule_alias.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4e8b763

Please sign in to comment.