Skip to content

Commit

Permalink
service config: update xDS LB policy configs for gRFC A74
Browse files Browse the repository at this point in the history
  • Loading branch information
markdroth committed Dec 19, 2023
1 parent 37330a0 commit 16b395a
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions grpc/service_config/service_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,9 @@ message XdsClusterManagerLoadBalancingPolicyConfig {
// Configuration for the cds LB policy.
message CdsConfig {
string cluster = 1; // Required.

// If true, a dynamic subscription will be started for the cluster.
bool is_dynamic = 2;
}

// Represents an xDS server.
Expand All @@ -412,6 +415,7 @@ message XdsServer {
}

// Configuration for xds_cluster_resolver LB policy.
// Deprecated.
message XdsClusterResolverLoadBalancingPolicyConfig {
// Describes a discovery mechanism instance.
// For EDS or LOGICAL_DNS clusters, there will be exactly one
Expand Down Expand Up @@ -482,10 +486,15 @@ message XdsClusterImplLoadBalancingPolicyConfig {
// Cluster name. Required.
string cluster = 1;

// Child policy.
repeated LoadBalancingConfig child_policy = 6;

// REMAINING FIELDS ARE DEPRECATED.

// EDS service name.
// Not set if cluster is not an EDS cluster or if it does not
// specify an EDS service name.
string eds_service_name = 2;
string eds_service_name = 2 [deprecated = true];

// Server to send load reports to.
// If unset, no load reporting is done.
Expand All @@ -498,27 +507,25 @@ message XdsClusterImplLoadBalancingPolicyConfig {
// LRS server to send load reports to.
// If not present, load reporting will be disabled.
// Supercedes lrs_load_reporting_server_name field.
XdsServer lrs_load_reporting_server = 7;
XdsServer lrs_load_reporting_server = 7 [deprecated = true];

// Maximum number of outstanding requests can be made to the upstream cluster.
// Default is 1024.
google.protobuf.UInt32Value max_concurrent_requests = 4;
google.protobuf.UInt32Value max_concurrent_requests = 4 [deprecated = true];

// Drop configuration.
message DropCategory {
string category = 1;
uint32 requests_per_million = 2;
}
repeated DropCategory drop_categories = 5;

// Child policy.
repeated LoadBalancingConfig child_policy = 6;
repeated DropCategory drop_categories = 5 [deprecated = true];

// Telemetry labels associated with this cluster
map<string, string> telemetry_labels = 8;
map<string, string> telemetry_labels = 8 [deprecated = true];
}

// Configuration for eds LB policy.
// Deprecated.
message EdsLoadBalancingPolicyConfig {
// Cluster name. Required.
string cluster = 1;
Expand Down Expand Up @@ -558,6 +565,7 @@ message RingHashLoadBalancingConfig {
}

// Configuration for lrs LB policy.
// Deprecated.
message LrsLoadBalancingPolicyConfig {
// Cluster name. Required.
string cluster_name = 1;
Expand Down Expand Up @@ -593,24 +601,24 @@ message LeastRequestLocalityLoadBalancingPolicyConfig {
uint64 choice_count = 1;
}


// Configuration for the override_host LB policy.
// Configuration for the xds_override_host LB policy.
message OverrideHostLoadBalancingPolicyConfig {
string cluster_name = 3;
repeated LoadBalancingConfig child_policy = 2;

enum HealthStatus {
UNKNOWN = 0;
HEALTHY = 1;
DRAINING = 3;
}

// valid health status for hosts that are considered when using
// xds_override_host_experimental policy.
// Default is [UNKNOWN, HEALTHY]
repeated HealthStatus override_host_status = 1;

repeated LoadBalancingConfig child_policy = 2;
repeated HealthStatus override_host_status = 1 [deprecated = true];
}

// Configuration for xds LB policy.
// Deprecated.
message XdsConfig {
// Name of balancer to connect to.
string balancer_name = 1 [deprecated = true];
Expand Down Expand Up @@ -689,9 +697,6 @@ message LoadBalancingConfig {
XdsClusterManagerLoadBalancingPolicyConfig xds_cluster_manager_experimental
= 14 [json_name = "xds_cluster_manager_experimental"];
CdsConfig cds_experimental = 6 [json_name = "cds_experimental"];
XdsClusterResolverLoadBalancingPolicyConfig
xds_cluster_resolver_experimental = 11
[json_name = "xds_cluster_resolver_experimental"];
XdsClusterImplLoadBalancingPolicyConfig xds_cluster_impl_experimental = 12
[json_name = "xds_cluster_impl_experimental"];
OverrideHostLoadBalancingPolicyConfig override_host_experimental = 18
Expand All @@ -704,6 +709,9 @@ message LoadBalancingConfig {
17 [json_name = "least_request_experimental"];

// Deprecated xDS-related policies.
XdsClusterResolverLoadBalancingPolicyConfig
xds_cluster_resolver_experimental = 11
[json_name = "xds_cluster_resolver_experimental", deprecated = true];
LrsLoadBalancingPolicyConfig lrs_experimental = 8
[json_name = "lrs_experimental", deprecated = true];
EdsLoadBalancingPolicyConfig eds_experimental = 7
Expand Down

0 comments on commit 16b395a

Please sign in to comment.