Skip to content

Commit 43dbe39

Browse files
committed
Add per-host connection limits to DestinationRule
Add perHostLimits field to ConnectionPoolSettings to enable per-host connection limits for individual endpoints in a cluster.This aligns with Envoy's per_host_thresholds capability and is useful for preventing endpoint overload in autoscaling scenarios. Currently only maxConnections field is supported per Envoy's implementation. Fixes #57697
1 parent ce7b580 commit 43dbe39

File tree

9 files changed

+1434
-89
lines changed

9 files changed

+1434
-89
lines changed

kubernetes/customresourcedefinitions.gen.yaml

Lines changed: 1077 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1/destination_rule_alias.gen.go

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/destination_rule.pb.go

Lines changed: 155 additions & 64 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/destination_rule.pb.html

Lines changed: 57 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/destination_rule.proto

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,27 @@ message WarmupConfiguration {
594594
// interval: 75s
595595
// ```
596596
//
597+
// The following example sets a per-host connection limit of 10 connections
598+
// for each individual endpoint in the reviews service. This is useful for
599+
// preventing overload of individual endpoints, especially in autoscaling scenarios.
600+
// Note: currently only the max_connections field is supported for per-host limits.
601+
//
602+
// ```yaml
603+
// apiVersion: networking.istio.io/v1
604+
// kind: DestinationRule
605+
// metadata:
606+
// name: reviews-per-host-limits
607+
// spec:
608+
// host: reviews.prod.svc.cluster.local
609+
// trafficPolicy:
610+
// connectionPool:
611+
// tcp:
612+
// maxConnections: 100
613+
// perHostLimits:
614+
// tcp:
615+
// maxConnections: 10
616+
// ```
617+
//
597618
message ConnectionPoolSettings {
598619
// Settings common to both HTTP and TCP upstream connections.
599620
message TCPSettings {
@@ -701,6 +722,21 @@ message ConnectionPoolSettings {
701722
TCPSettings tcp = 1;
702723
// HTTP connection pool settings.
703724
HTTPSettings http = 2;
725+
726+
// Per-host connection limits that apply to each individual host in the upstream service.
727+
// These limits allow controlling connections to each endpoint independently,
728+
// which is useful for preventing overload of individual hosts and managing
729+
// concurrency in autoscaling scenarios.
730+
//
731+
// Note: Currently only the `maxConnections` field is supported for per-host limits,
732+
// as per Envoy's circuit breaker implementation.
733+
message PerHostLimits {
734+
// Per-host TCP settings. Currently only `maxConnections` is supported.
735+
TCPSettings tcp = 1;
736+
}
737+
738+
// Optional per-host connection limits.
739+
PerHostLimits per_host_limits = 3;
704740
}
705741

706742
// A Circuit breaker implementation that tracks the status of each

networking/v1alpha3/destination_rule_deepcopy.gen.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1alpha3/destination_rule_json.gen.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

networking/v1beta1/destination_rule_alias.gen.go

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
apiVersion: release-notes/v2
2+
kind: feature
3+
area: traffic-management
4+
issue:
5+
- https://github.com/istio/istio/issues/42490
6+
7+
releaseNotes:
8+
- |
9+
**Added** `perHostSettings` to the `ConnectionPoolSettings` in the `DestinationRule` API to enable configuring per-host connection limits for each individual endpoint in a cluster. This is useful for preventing overload of individual hosts and managing concurrency in autoscaling scenarios. Note: currently only the `maxConnections` field is supported for per-host limits.

0 commit comments

Comments
 (0)