Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace GRPC state of world updates with ADS Delta #6806

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelogs/unreleased/6806-saley89-minor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## Replace GRPC state of world updates with ADS Delta

The mechanism used for xDS updates between Contour and Envoy has been changed from standard `GRPC` (aka "state of the world" updates) to
[Aggregated Discovery Service](https://www.envoyproxy.io/docs/envoy/latest/configuration/overview/xds_api#aggregated-discovery-service) (ADS) `Delta GRPC` updates. This change is a part of the ongoing effort to improve the performance and scalability of Contour.
With this mechanism in place Contour will now send only the changes to Envoy, instead of the entire state of the world on every update. Additionally, using ADS allows all the communication to be delivered on a single, bidirectional gRPC stream.
Together these changes drastically reduce the cpu and memory footprint of Contour and Envoy, and improve the overall performance of the system allowing for greater numbers of HttpProxies in a single cluster.
4 changes: 2 additions & 2 deletions internal/envoy/v3/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func UpstreamTLSContext(peerValidationContext *dag.PeerValidationContext, sni st
if clientSecret != nil {
clientSecretConfigs = []*envoy_transport_socket_tls_v3.SdsSecretConfig{{
Name: envoy.Secretname(clientSecret),
SdsConfig: ConfigSource("contour"),
SdsConfig: ConfigSource(),
}}
}

Expand Down Expand Up @@ -125,7 +125,7 @@ func DownstreamTLSContext(serverSecret *dag.Secret, tlsMinProtoVersion, tlsMaxPr
},
TlsCertificateSdsSecretConfigs: []*envoy_transport_socket_tls_v3.SdsSecretConfig{{
Name: envoy.Secretname(serverSecret),
SdsConfig: ConfigSource("contour"),
SdsConfig: ConfigSource(),
}},
AlpnProtocols: alpnProtos,
},
Expand Down
13 changes: 10 additions & 3 deletions internal/envoy/v3/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func bootstrapConfig(c *envoy.BootstrapConfig) *envoy_config_bootstrap_v3.Bootst
LayerSpecifier: &envoy_config_bootstrap_v3.RuntimeLayer_RtdsLayer_{
RtdsLayer: &envoy_config_bootstrap_v3.RuntimeLayer_RtdsLayer{
Name: DynamicRuntimeLayerName,
RtdsConfig: ConfigSource("contour"),
RtdsConfig: ConfigSource(),
},
},
},
Expand All @@ -187,8 +187,15 @@ func bootstrapConfig(c *envoy.BootstrapConfig) *envoy_config_bootstrap_v3.Bootst
},
},
DynamicResources: &envoy_config_bootstrap_v3.Bootstrap_DynamicResources{
LdsConfig: ConfigSource("contour"),
CdsConfig: ConfigSource("contour"),
AdsConfig: &envoy_config_core_v3.ApiConfigSource{
ApiType: envoy_config_core_v3.ApiConfigSource_DELTA_GRPC,
TransportApiVersion: envoy_config_core_v3.ApiVersion_V3,
GrpcServices: []*envoy_config_core_v3.GrpcService{
GrpcService("contour", "", timeout.DefaultSetting()),
},
},
LdsConfig: ConfigSource(),
CdsConfig: ConfigSource(),
},
StaticResources: &envoy_config_bootstrap_v3.Bootstrap_StaticResources{
Clusters: []*envoy_config_cluster_v3.Cluster{{
Expand Down
Loading
Loading