async-grpc-xds 0.0.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/lib/async/grpc/xds/ads_stream.rb +4 -0
  4. data/lib/async/grpc/xds/client_side_weighted_round_robin.rb +53 -0
  5. data/lib/async/grpc/xds/cluster.rb +71 -0
  6. data/lib/async/grpc/xds/control_plane.rb +47 -6
  7. data/lib/async/grpc/xds/discovery_client.rb +12 -2
  8. data/lib/async/grpc/xds/endpoint.rb +102 -0
  9. data/lib/async/grpc/xds/resource_cache.rb +1 -0
  10. data/lib/async/grpc/xds/resources.rb +9 -0
  11. data/lib/async/grpc/xds/server.rb +7 -0
  12. data/lib/async/grpc/xds/service.rb +24 -0
  13. data/lib/async/grpc/xds/version.rb +4 -1
  14. data/lib/async/grpc/xds.rb +3 -1
  15. data/lib/envoy/config/common/mutation_rules/v3/mutation_rules_pb.rb +33 -0
  16. data/lib/envoy/config/route/v3/route_components_pb.rb +108 -0
  17. data/lib/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin_pb.rb +30 -0
  18. data/lib/envoy/extensions/load_balancing_policies/common/v3/common_pb.rb +41 -0
  19. data/lib/envoy/type/tracing/v3/custom_tag_pb.rb +31 -0
  20. data/lib/xds/data/orca/v3/orca_load_report_pb.rb +24 -0
  21. data/lib/xds/service/orca/v3/open_rca_service.rb +23 -0
  22. data/lib/xds/service/orca/v3/orca_pb.rb +25 -0
  23. data/proto/envoy/config/common/mutation_rules/v3/mutation_rules.proto +113 -0
  24. data/proto/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto +96 -0
  25. data/proto/envoy/extensions/load_balancing_policies/common/v3/common.proto +188 -0
  26. data/proto/envoy/type/tracing/v3/custom_tag.proto +109 -0
  27. data/proto/readme.md +3 -0
  28. data/proto/xds/data/orca/v3/orca_load_report.proto +58 -0
  29. data/proto/xds/service/orca/v3/orca.proto +36 -0
  30. data/readme.md +16 -2
  31. data/releases.md +12 -0
  32. data/xds/readme.md +2 -29
  33. data/xds/test/async/grpc/xds/control_plane.rb +5 -6
  34. data.tar.gz.sig +0 -0
  35. metadata +18 -2
  36. metadata.gz.sig +0 -0
  37. data/lib/async/grpc/xds/resource_builder.rb +0 -138
@@ -0,0 +1,188 @@
1
+ syntax = "proto3";
2
+
3
+ package envoy.extensions.load_balancing_policies.common.v3;
4
+
5
+ import "envoy/config/core/v3/base.proto";
6
+ import "envoy/config/route/v3/route_components.proto";
7
+ import "envoy/type/v3/percent.proto";
8
+
9
+ import "google/protobuf/duration.proto";
10
+ import "google/protobuf/struct.proto";
11
+ import "google/protobuf/wrappers.proto";
12
+
13
+ import "envoy/annotations/deprecation.proto";
14
+ import "udpa/annotations/status.proto";
15
+ import "validate/validate.proto";
16
+
17
+ option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.common.v3";
18
+ option java_outer_classname = "CommonProto";
19
+ option java_multiple_files = true;
20
+ option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3;commonv3";
21
+ option (udpa.annotations.file_status).package_version_status = ACTIVE;
22
+
23
+ // [#protodoc-title: Common configuration for two or more load balancing policy extensions]
24
+
25
+ message LocalityLbConfig {
26
+ // Configuration for :ref:`zone aware routing
27
+ // <arch_overview_load_balancing_zone_aware_routing>`.
28
+ // [#next-free-field: 7]
29
+ message ZoneAwareLbConfig {
30
+ // Basis for computing per-locality percentages in zone-aware routing.
31
+ enum LocalityBasis {
32
+ // Use the number of healthy hosts in each locality.
33
+ HEALTHY_HOSTS_NUM = 0;
34
+
35
+ // Use the weights of healthy hosts in each locality.
36
+ HEALTHY_HOSTS_WEIGHT = 1;
37
+ }
38
+
39
+ // Configures Envoy to always route requests to the local zone regardless of the
40
+ // upstream zone structure. In Envoy's default configuration, traffic is distributed proportionally
41
+ // across all upstream hosts while trying to maximize local routing when possible. The approach
42
+ // with force_local_zone aims to be more predictable and if there are upstream hosts in the local
43
+ // zone, they will receive all traffic.
44
+ // * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
45
+ // * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
46
+ message ForceLocalZone {
47
+ // Configures the minimum number of upstream hosts in the local zone required when force_local_zone
48
+ // is enabled. If the number of upstream hosts in the local zone is less than the specified value,
49
+ // Envoy will fall back to the default proportional-based distribution across localities.
50
+ // If not specified, the default is 1.
51
+ // * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
52
+ // * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
53
+ google.protobuf.UInt32Value min_size = 1;
54
+ }
55
+
56
+ // Configures percentage of requests that will be considered for zone aware routing
57
+ // if zone aware routing is configured. If not specified, the default is 100%.
58
+ // * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
59
+ // * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
60
+ type.v3.Percent routing_enabled = 1;
61
+
62
+ // Configures minimum upstream cluster size required for zone aware routing
63
+ // If upstream cluster size is less than specified, zone aware routing is not performed
64
+ // even if zone aware routing is configured. If not specified, the default is 6.
65
+ // * :ref:`runtime values <config_cluster_manager_cluster_runtime_zone_routing>`.
66
+ // * :ref:`Zone aware routing support <arch_overview_load_balancing_zone_aware_routing>`.
67
+ google.protobuf.UInt64Value min_cluster_size = 2;
68
+
69
+ // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic
70
+ // mode<arch_overview_load_balancing_panic_threshold>`. Instead, the cluster will fail all
71
+ // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a
72
+ // failing service.
73
+ bool fail_traffic_on_panic = 3;
74
+
75
+ // If set to true, Envoy will force LocalityDirect routing if a local locality exists.
76
+ bool force_locality_direct_routing = 4
77
+ [deprecated = true, (envoy.annotations.deprecated_at_minor_version) = "3.0"];
78
+
79
+ ForceLocalZone force_local_zone = 5;
80
+
81
+ // Determines how locality percentages are computed:
82
+ // - HEALTHY_HOSTS_NUM: proportional to the count of healthy hosts.
83
+ // - HEALTHY_HOSTS_WEIGHT: proportional to the weights of healthy hosts.
84
+ // Default value is HEALTHY_HOSTS_NUM if unset.
85
+ LocalityBasis locality_basis = 6;
86
+ }
87
+
88
+ // Configuration for :ref:`locality weighted load balancing
89
+ // <arch_overview_load_balancing_locality_weighted_lb>`
90
+ message LocalityWeightedLbConfig {
91
+ }
92
+
93
+ oneof locality_config_specifier {
94
+ option (validate.required) = true;
95
+
96
+ // Configuration for local zone aware load balancing.
97
+ ZoneAwareLbConfig zone_aware_lb_config = 1;
98
+
99
+ // Enable locality weighted load balancing.
100
+ LocalityWeightedLbConfig locality_weighted_lb_config = 2;
101
+ }
102
+ }
103
+
104
+ // Configuration for :ref:`slow start mode <arch_overview_load_balancing_slow_start>`.
105
+ message SlowStartConfig {
106
+ // Represents the size of slow start window.
107
+ // If set, the newly created host remains in slow start mode starting from its creation time
108
+ // for the duration of slow start window.
109
+ google.protobuf.Duration slow_start_window = 1;
110
+
111
+ // This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0,
112
+ // so that endpoint would get linearly increasing amount of traffic.
113
+ // When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly.
114
+ // The value of aggression parameter should be greater than 0.0.
115
+ // By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve.
116
+ //
117
+ // During slow start window, effective weight of an endpoint would be scaled with time factor and aggression:
118
+ // ``new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))``,
119
+ // where ``time_factor=(time_since_start_seconds / slow_start_time_seconds)``.
120
+ //
121
+ // As time progresses, more and more traffic would be sent to endpoint, which is in slow start window.
122
+ // Once host exits slow start, time_factor and aggression no longer affect its weight.
123
+ config.core.v3.RuntimeDouble aggression = 2;
124
+
125
+ // Configures the minimum percentage of origin weight that avoids too small new weight,
126
+ // which may cause endpoints in slow start mode receive no traffic in slow start window.
127
+ // If not specified, the default is 10%.
128
+ type.v3.Percent min_weight_percent = 3;
129
+ }
130
+
131
+ // Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.)
132
+ message ConsistentHashingLbConfig {
133
+ // If set to ``true``, the cluster will use hostname instead of the resolved
134
+ // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address.
135
+ bool use_hostname_for_hashing = 1;
136
+
137
+ // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150
138
+ // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster.
139
+ // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200.
140
+ // Minimum is 100.
141
+ //
142
+ // Applies to both Ring Hash and Maglev load balancers.
143
+ //
144
+ // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified
145
+ // ``hash_balance_factor``, requests to any upstream host are capped at ``hash_balance_factor/100`` times the average number of requests
146
+ // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing
147
+ // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify
148
+ // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the
149
+ // cascading overflow effect when choosing the next host in the ring/table).
150
+ //
151
+ // If weights are specified on the hosts, they are respected.
152
+ //
153
+ // This is an O(N) algorithm, unlike other load balancers. Using a lower ``hash_balance_factor`` results in more hosts
154
+ // being probed, so use a higher value if you require better performance.
155
+ google.protobuf.UInt32Value hash_balance_factor = 2 [(validate.rules).uint32 = {gte: 100}];
156
+
157
+ // Specifies a list of hash policies to use for ring hash load balancing. If ``hash_policy`` is
158
+ // set, then
159
+ // :ref:`route level hash policy <envoy_v3_api_field_config.route.v3.RouteAction.hash_policy>`
160
+ // will be ignored.
161
+ repeated config.route.v3.RouteAction.HashPolicy hash_policy = 3;
162
+ }
163
+
164
+ // Connection overrides for the ORCA out-of-band (OOB) reporting stream, used by
165
+ // load balancing policies that consume ORCA load reports (e.g.
166
+ // :ref:`client_side_weighted_round_robin
167
+ // <envoy_v3_api_msg_extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin>`).
168
+ // Whether and when OOB reporting runs is controlled by the embedding policy.
169
+ message OrcaOobReportingConfig {
170
+ // Optional alternative port for the OOB reporting connection, for example an
171
+ // ORCA reporting sidecar listening on a dedicated port. If 0 or unset, the
172
+ // port of the host's ORCA reporting address is used. Ignored for non-IP
173
+ // (pipe/UDS) host addresses.
174
+ uint32 port_value = 1 [(validate.rules).uint32 = {lte: 65535}];
175
+
176
+ // Value of the ``:authority`` header on the OOB gRPC stream. If empty, the
177
+ // endpoint hostname is used, then the dialed address, then the cluster name.
178
+ string authority = 2
179
+ [(validate.rules).string = {well_known_regex: HTTP_HEADER_VALUE strict: false}];
180
+
181
+ // Optional key/value pairs used to select a transport socket from the
182
+ // cluster's :ref:`transport_socket_matches
183
+ // <envoy_v3_api_field_config.cluster.v3.Cluster.transport_socket_matches>`
184
+ // for the OOB connection. If unset, or if no match is found, the cluster's
185
+ // default transport socket is used. ALPN ``h2`` is always forced on the OOB
186
+ // connection regardless of this setting.
187
+ google.protobuf.Struct transport_socket_match_criteria = 3;
188
+ }
@@ -0,0 +1,109 @@
1
+ syntax = "proto3";
2
+
3
+ package envoy.type.tracing.v3;
4
+
5
+ import "envoy/type/metadata/v3/metadata.proto";
6
+
7
+ import "udpa/annotations/status.proto";
8
+ import "udpa/annotations/versioning.proto";
9
+ import "validate/validate.proto";
10
+
11
+ option java_package = "io.envoyproxy.envoy.type.tracing.v3";
12
+ option java_outer_classname = "CustomTagProto";
13
+ option java_multiple_files = true;
14
+ option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3;tracingv3";
15
+ option (udpa.annotations.file_status).package_version_status = ACTIVE;
16
+
17
+ // [#protodoc-title: Custom Tag]
18
+
19
+ // Describes custom tags for the active span.
20
+ // [#next-free-field: 7]
21
+ message CustomTag {
22
+ option (udpa.annotations.versioning).previous_message_type = "envoy.type.tracing.v2.CustomTag";
23
+
24
+ // Literal type custom tag with static value for the tag value.
25
+ message Literal {
26
+ option (udpa.annotations.versioning).previous_message_type =
27
+ "envoy.type.tracing.v2.CustomTag.Literal";
28
+
29
+ // Static literal value to populate the tag value.
30
+ string value = 1 [(validate.rules).string = {min_len: 1}];
31
+ }
32
+
33
+ // Environment type custom tag with environment name and default value.
34
+ message Environment {
35
+ option (udpa.annotations.versioning).previous_message_type =
36
+ "envoy.type.tracing.v2.CustomTag.Environment";
37
+
38
+ // Environment variable name to obtain the value to populate the tag value.
39
+ string name = 1 [(validate.rules).string = {min_len: 1}];
40
+
41
+ // When the environment variable is not found,
42
+ // the tag value will be populated with this default value if specified,
43
+ // otherwise no tag will be populated.
44
+ string default_value = 2;
45
+ }
46
+
47
+ // Header type custom tag with header name and default value.
48
+ message Header {
49
+ option (udpa.annotations.versioning).previous_message_type =
50
+ "envoy.type.tracing.v2.CustomTag.Header";
51
+
52
+ // Header name to obtain the value to populate the tag value.
53
+ string name = 1
54
+ [(validate.rules).string = {min_len: 1 well_known_regex: HTTP_HEADER_NAME strict: false}];
55
+
56
+ // When the header does not exist,
57
+ // the tag value will be populated with this default value if specified,
58
+ // otherwise no tag will be populated.
59
+ string default_value = 2;
60
+ }
61
+
62
+ // Metadata type custom tag using
63
+ // :ref:`MetadataKey <envoy_v3_api_msg_type.metadata.v3.MetadataKey>` to retrieve the protobuf value
64
+ // from :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>`, and populate the tag value with
65
+ // `the canonical JSON <https://developers.google.com/protocol-buffers/docs/proto3#json>`_
66
+ // representation of it.
67
+ message Metadata {
68
+ option (udpa.annotations.versioning).previous_message_type =
69
+ "envoy.type.tracing.v2.CustomTag.Metadata";
70
+
71
+ // Specify what kind of metadata to obtain tag value from.
72
+ metadata.v3.MetadataKind kind = 1;
73
+
74
+ // Metadata key to define the path to retrieve the tag value.
75
+ metadata.v3.MetadataKey metadata_key = 2;
76
+
77
+ // When no valid metadata is found,
78
+ // the tag value would be populated with this default value if specified,
79
+ // otherwise no tag would be populated.
80
+ string default_value = 3;
81
+ }
82
+
83
+ // Used to populate the tag name.
84
+ string tag = 1 [(validate.rules).string = {min_len: 1}];
85
+
86
+ // Used to specify what kind of custom tag.
87
+ oneof type {
88
+ option (validate.required) = true;
89
+
90
+ // A literal custom tag.
91
+ Literal literal = 2;
92
+
93
+ // An environment custom tag.
94
+ Environment environment = 3;
95
+
96
+ // A request header custom tag.
97
+ Header request_header = 4;
98
+
99
+ // A custom tag to obtain tag value from the metadata.
100
+ Metadata metadata = 5;
101
+
102
+ // Custom tag value.
103
+ //
104
+ // The same :ref:`format specifier <config_access_log_format>` as used for
105
+ // :ref:`HTTP access logging <config_access_log>` applies here, however
106
+ // unknown specifier values are replaced with the empty string instead of ``-``.
107
+ string value = 6;
108
+ }
109
+ }
data/proto/readme.md CHANGED
@@ -15,6 +15,9 @@ These files come from [envoyproxy/data-plane-api](https://github.com/envoyproxy/
15
15
  - `envoy/config/route/v3/` - Route definitions (RDS)
16
16
  - `envoy/config/core/v3/` - Core types (Node, Address, etc.)
17
17
  - `envoy/extensions/transport_sockets/tls/v3/` - TLS/Secret definitions (SDS)
18
+ - `envoy/extensions/load_balancing_policies/` - Typed load-balancing policy definitions
19
+ - `xds/data/orca/v3/` - ORCA load reports
20
+ - `xds/service/orca/v3/` - Out-of-band ORCA reporting service
18
21
  - `google/protobuf/` - Google protobuf well-known types
19
22
 
20
23
  ## Updating
@@ -0,0 +1,58 @@
1
+ syntax = "proto3";
2
+
3
+ package xds.data.orca.v3;
4
+
5
+ option java_outer_classname = "OrcaLoadReportProto";
6
+ option java_multiple_files = true;
7
+ option java_package = "com.github.xds.data.orca.v3";
8
+ option go_package = "github.com/cncf/xds/go/xds/data/orca/v3";
9
+
10
+ import "validate/validate.proto";
11
+
12
+ // See section `ORCA load report format` of the design document in
13
+ // https://github.com/envoyproxy/envoy/issues/6614.
14
+
15
+ message OrcaLoadReport {
16
+ // CPU utilization expressed as a fraction of available CPU resources. This
17
+ // should be derived from the latest sample or measurement. The value may be
18
+ // larger than 1.0 when the usage exceeds the reporter dependent notion of
19
+ // soft limits.
20
+ double cpu_utilization = 1 [(validate.rules).double.gte = 0];
21
+
22
+ // Memory utilization expressed as a fraction of available memory
23
+ // resources. This should be derived from the latest sample or measurement.
24
+ double mem_utilization = 2 [(validate.rules).double.gte = 0, (validate.rules).double.lte = 1];
25
+
26
+ // Total RPS being served by an endpoint. This should cover all services that an endpoint is
27
+ // responsible for.
28
+ // Deprecated -- use ``rps_fractional`` field instead.
29
+ uint64 rps = 3 [deprecated = true];
30
+
31
+ // Application specific requests costs. Each value is an absolute cost (e.g. 3487 bytes of
32
+ // storage) associated with the request.
33
+ map<string, double> request_cost = 4;
34
+
35
+ // Resource utilization values. Each value is expressed as a fraction of total resources
36
+ // available, derived from the latest sample or measurement.
37
+ map<string, double> utilization = 5
38
+ [(validate.rules).map.values.double.gte = 0, (validate.rules).map.values.double.lte = 1];
39
+
40
+ // Total RPS being served by an endpoint. This should cover all services that an endpoint is
41
+ // responsible for.
42
+ double rps_fractional = 6 [(validate.rules).double.gte = 0];
43
+
44
+ // Total EPS (errors/second) being served by an endpoint. This should cover
45
+ // all services that an endpoint is responsible for.
46
+ double eps = 7 [(validate.rules).double.gte = 0];
47
+
48
+ // Application specific opaque metrics.
49
+ map<string, double> named_metrics = 8;
50
+
51
+ // Application specific utilization expressed as a fraction of available
52
+ // resources. For example, an application may report the max of CPU and memory
53
+ // utilization for better load balancing if it is both CPU and memory bound.
54
+ // This should be derived from the latest sample or measurement.
55
+ // The value may be larger than 1.0 when the usage exceeds the reporter
56
+ // dependent notion of soft limits.
57
+ double application_utilization = 9 [(validate.rules).double.gte = 0];
58
+ }
@@ -0,0 +1,36 @@
1
+ syntax = "proto3";
2
+
3
+ package xds.service.orca.v3;
4
+
5
+ option java_outer_classname = "OrcaProto";
6
+ option java_multiple_files = true;
7
+ option java_package = "com.github.xds.service.orca.v3";
8
+ option go_package = "github.com/cncf/xds/go/xds/service/orca/v3";
9
+
10
+ import "xds/data/orca/v3/orca_load_report.proto";
11
+
12
+ import "google/protobuf/duration.proto";
13
+
14
+ // See section `Out-of-band (OOB) reporting` of the design document in
15
+ // :ref:`https://github.com/envoyproxy/envoy/issues/6614`.
16
+
17
+ // Out-of-band (OOB) load reporting service for the additional load reporting
18
+ // agent that does not sit in the request path. Reports are periodically sampled
19
+ // with sufficient frequency to provide temporal association with requests.
20
+ // OOB reporting compensates the limitation of in-band reporting in revealing
21
+ // costs for backends that do not provide a steady stream of telemetry such as
22
+ // long running stream operations and zero QPS services. This is a server
23
+ // streaming service, client needs to terminate current RPC and initiate
24
+ // a new call to change backend reporting frequency.
25
+ service OpenRcaService {
26
+ rpc StreamCoreMetrics(OrcaLoadReportRequest) returns (stream xds.data.orca.v3.OrcaLoadReport);
27
+ }
28
+
29
+ message OrcaLoadReportRequest {
30
+ // Interval for generating Open RCA core metric responses.
31
+ google.protobuf.Duration report_interval = 1;
32
+ // Request costs to collect. If this is empty, all known requests costs tracked by
33
+ // the load reporting agent will be returned. This provides an opportunity for
34
+ // the client to selectively obtain a subset of tracked costs.
35
+ repeated string request_cost_names = 2;
36
+ }
data/readme.md CHANGED
@@ -19,16 +19,30 @@ This is an early implementation focused on ADS with CDS and EDS. LDS/RDS, full r
19
19
  The `xds/` directory contains a Docker Compose integration environment with a Go xDS control plane and Ruby gRPC backends.
20
20
 
21
21
  ``` bash
22
- docker-compose -f xds/docker-compose.yaml up --exit-code-from tests
22
+ docker compose -f xds/docker-compose.yaml up --build --exit-code-from tests
23
23
  ```
24
24
 
25
25
  ## Releases
26
26
 
27
27
  Please see the [project releases](https://socketry.github.io/async-grpc-xds/releases/index) for all releases.
28
28
 
29
+ ### v0.2.0
30
+
31
+ - Add ORCA load reporting messages, service interface, and client-side weighted-round-robin resources.
32
+ - Support endpoint hostnames in generated EDS resources.
33
+ - Replace the general resource builder with focused cluster and endpoint builders.
34
+
35
+ ### v0.1.0
36
+
37
+ - Add complete documentation coverage for the public xDS API.
38
+ - Support grouped IP and Unix-domain-socket addresses in EDS endpoints.
39
+ - Support selecting HTTP/1 or HTTP/2 for generated clusters.
40
+
29
41
  ### v0.1.0
30
42
 
31
- - Initial extraction from `async-grpc`.
43
+ - Add complete documentation coverage for the public xDS API.
44
+ - Support grouped IP and Unix-domain-socket addresses in EDS endpoints.
45
+ - Support selecting HTTP/1 or HTTP/2 for generated clusters.
32
46
 
33
47
  ## See Also
34
48
 
data/releases.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Releases
2
2
 
3
+ ## v0.2.0
4
+
5
+ - Add ORCA load reporting messages, service interface, and client-side weighted-round-robin resources.
6
+ - Support endpoint hostnames in generated EDS resources.
7
+ - Replace the general resource builder with focused cluster and endpoint builders.
8
+
9
+ ## v0.1.0
10
+
11
+ - Add complete documentation coverage for the public xDS API.
12
+ - Support grouped IP and Unix-domain-socket addresses in EDS endpoints.
13
+ - Support selecting HTTP/1 or HTTP/2 for generated clusters.
14
+
3
15
  ## v0.1.0
4
16
 
5
17
  - Initial extraction from `async-grpc`.
data/xds/readme.md CHANGED
@@ -11,38 +11,11 @@ The Docker Compose setup includes:
11
11
 
12
12
  ## Running Tests
13
13
 
14
- ### Start the environment
14
+ From this directory:
15
15
 
16
16
  ```bash
17
17
  cd xds
18
- bundle install # generates gems.locked for Docker build
19
- docker compose up -d
20
- ```
21
-
22
- ### Wait for services to be ready
23
-
24
- ```bash
25
- docker compose ps
26
- ```
27
-
28
- All services should show as "healthy" or "running".
29
-
30
- ### Run tests
31
-
32
- ```bash
33
- # Run tests in docker compose
34
- docker compose run --rm tests
35
-
36
- # Or run tests locally (if services are accessible)
37
- # Set XDS_SERVER_URI environment variable
38
- export XDS_SERVER_URI=xds-control-plane:18000
39
- bundle exec sus xds/test
40
- ```
41
-
42
- ### Cleanup
43
-
44
- ```bash
45
- docker compose down
18
+ docker compose up --build --exit-code-from tests
46
19
  ```
47
20
 
48
21
  ## Test Structure
@@ -5,7 +5,6 @@
5
5
 
6
6
  require "async/grpc/xds/control_plane"
7
7
  require "async/grpc/xds/client"
8
- require "async/grpc/xds/resource_builder"
9
8
  require "async/grpc/xds/server"
10
9
  require "async/http/endpoint"
11
10
  require "sus/fixtures/async"
@@ -33,8 +32,8 @@ describe Async::GRPC::XDS::ControlPlane do
33
32
  control_plane.update_endpoints(
34
33
  "myservice",
35
34
  [
36
- {address: "127.0.0.1", port: 50051},
37
- {address: "127.0.0.2", port: 50052, healthy: false}
35
+ {addresses: [{address: "127.0.0.1", port: 50051}], healthy: true},
36
+ {addresses: [{address: "127.0.0.2", port: 50052}], healthy: false}
38
37
  ]
39
38
  )
40
39
 
@@ -49,15 +48,15 @@ describe Async::GRPC::XDS::ControlPlane do
49
48
  end
50
49
 
51
50
  it "increments resource versions" do
52
- control_plane.update_endpoints("myservice", [{address: "127.0.0.1", port: 50051}])
53
- control_plane.update_endpoints("myservice", [{address: "127.0.0.2", port: 50052}])
51
+ control_plane.update_endpoints("myservice", [{addresses: [{address: "127.0.0.1", port: 50051}], healthy: true}])
52
+ control_plane.update_endpoints("myservice", [{addresses: [{address: "127.0.0.2", port: 50052}], healthy: true}])
54
53
 
55
54
  expect(control_plane.version(Async::GRPC::XDS::ControlPlane::ENDPOINT_TYPE)).to be == "2"
56
55
  end
57
56
 
58
57
  it "serves resources over ADS" do
59
58
  control_plane.update_cluster("myservice")
60
- control_plane.update_endpoints("myservice", [{address: "127.0.0.1", port: 50051}])
59
+ control_plane.update_endpoints("myservice", [{addresses: [{address: "127.0.0.1", port: 50051}], healthy: true}])
61
60
 
62
61
  port = available_port
63
62
  endpoint = Async::HTTP::Endpoint.parse(
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-grpc-xds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -131,12 +131,14 @@ files:
131
131
  - lib/async/grpc/xds.rb
132
132
  - lib/async/grpc/xds/ads_stream.rb
133
133
  - lib/async/grpc/xds/client.rb
134
+ - lib/async/grpc/xds/client_side_weighted_round_robin.rb
135
+ - lib/async/grpc/xds/cluster.rb
134
136
  - lib/async/grpc/xds/context.rb
135
137
  - lib/async/grpc/xds/control_plane.rb
136
138
  - lib/async/grpc/xds/discovery_client.rb
139
+ - lib/async/grpc/xds/endpoint.rb
137
140
  - lib/async/grpc/xds/health_checker.rb
138
141
  - lib/async/grpc/xds/load_balancer.rb
139
- - lib/async/grpc/xds/resource_builder.rb
140
142
  - lib/async/grpc/xds/resource_cache.rb
141
143
  - lib/async/grpc/xds/resources.rb
142
144
  - lib/async/grpc/xds/server.rb
@@ -148,6 +150,7 @@ files:
148
150
  - lib/envoy/config/cluster/v3/cluster_pb.rb
149
151
  - lib/envoy/config/cluster/v3/filter_pb.rb
150
152
  - lib/envoy/config/cluster/v3/outlier_detection_pb.rb
153
+ - lib/envoy/config/common/mutation_rules/v3/mutation_rules_pb.rb
151
154
  - lib/envoy/config/core/v3/address_pb.rb
152
155
  - lib/envoy/config/core/v3/backoff_pb.rb
153
156
  - lib/envoy/config/core/v3/base_pb.rb
@@ -170,6 +173,9 @@ files:
170
173
  - lib/envoy/config/endpoint/v3/endpoint_components_pb.rb
171
174
  - lib/envoy/config/endpoint/v3/endpoint_pb.rb
172
175
  - lib/envoy/config/endpoint/v3/load_report_pb.rb
176
+ - lib/envoy/config/route/v3/route_components_pb.rb
177
+ - lib/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin_pb.rb
178
+ - lib/envoy/extensions/load_balancing_policies/common/v3/common_pb.rb
173
179
  - lib/envoy/service/discovery/v3/ads_pb.rb
174
180
  - lib/envoy/service/discovery/v3/aggregated_discovery_service.rb
175
181
  - lib/envoy/service/discovery/v3/discovery_pb.rb
@@ -186,6 +192,7 @@ files:
186
192
  - lib/envoy/type/matcher/v3/struct_pb.rb
187
193
  - lib/envoy/type/matcher/v3/value_pb.rb
188
194
  - lib/envoy/type/metadata/v3/metadata_pb.rb
195
+ - lib/envoy/type/tracing/v3/custom_tag_pb.rb
189
196
  - lib/envoy/type/v3/hash_policy_pb.rb
190
197
  - lib/envoy/type/v3/http_pb.rb
191
198
  - lib/envoy/type/v3/http_status_pb.rb
@@ -217,6 +224,9 @@ files:
217
224
  - lib/xds/core/v3/resource_locator_pb.rb
218
225
  - lib/xds/core/v3/resource_name_pb.rb
219
226
  - lib/xds/core/v3/resource_pb.rb
227
+ - lib/xds/data/orca/v3/orca_load_report_pb.rb
228
+ - lib/xds/service/orca/v3/open_rca_service.rb
229
+ - lib/xds/service/orca/v3/orca_pb.rb
220
230
  - lib/xds/type/matcher/v3/domain_pb.rb
221
231
  - lib/xds/type/matcher/v3/http_inputs_pb.rb
222
232
  - lib/xds/type/matcher/v3/ip_pb.rb
@@ -234,6 +244,7 @@ files:
234
244
  - proto/envoy/config/cluster/v3/cluster.proto
235
245
  - proto/envoy/config/cluster/v3/filter.proto
236
246
  - proto/envoy/config/cluster/v3/outlier_detection.proto
247
+ - proto/envoy/config/common/mutation_rules/v3/mutation_rules.proto
237
248
  - proto/envoy/config/core/v3/BUILD
238
249
  - proto/envoy/config/core/v3/address.proto
239
250
  - proto/envoy/config/core/v3/backoff.proto
@@ -268,6 +279,8 @@ files:
268
279
  - proto/envoy/config/route/v3/route.proto
269
280
  - proto/envoy/config/route/v3/route_components.proto
270
281
  - proto/envoy/config/route/v3/scoped_route.proto
282
+ - proto/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto
283
+ - proto/envoy/extensions/load_balancing_policies/common/v3/common.proto
271
284
  - proto/envoy/extensions/transport_sockets/tls/v3/BUILD
272
285
  - proto/envoy/extensions/transport_sockets/tls/v3/cert.proto
273
286
  - proto/envoy/extensions/transport_sockets/tls/v3/common.proto
@@ -299,6 +312,7 @@ files:
299
312
  - proto/envoy/type/range.proto
300
313
  - proto/envoy/type/semantic_version.proto
301
314
  - proto/envoy/type/token_bucket.proto
315
+ - proto/envoy/type/tracing/v3/custom_tag.proto
302
316
  - proto/envoy/type/v3/BUILD
303
317
  - proto/envoy/type/v3/hash_policy.proto
304
318
  - proto/envoy/type/v3/http.proto
@@ -336,6 +350,8 @@ files:
336
350
  - proto/xds/core/v3/resource.proto
337
351
  - proto/xds/core/v3/resource_locator.proto
338
352
  - proto/xds/core/v3/resource_name.proto
353
+ - proto/xds/data/orca/v3/orca_load_report.proto
354
+ - proto/xds/service/orca/v3/orca.proto
339
355
  - proto/xds/type/matcher/v3/cel.proto
340
356
  - proto/xds/type/matcher/v3/domain.proto
341
357
  - proto/xds/type/matcher/v3/http_inputs.proto
metadata.gz.sig CHANGED
Binary file