-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Implement the EGDS protocol #10023
Implement the EGDS protocol #10023
Changes from 1 commit
077afdc
b309be2
2d9446c
dfdfa1c
71d337d
f22ade3
8e64ac9
2b838de
1e0b06b
51180a1
d37fd08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
syntax = "proto3"; | ||
|
||
package envoy.api.v2; | ||
|
||
import "envoy/api/v2/core/config_source.proto"; | ||
import "envoy/api/v2/discovery.proto"; | ||
import "envoy/api/v2/endpoint/endpoint_components.proto"; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/protobuf/duration.proto"; | ||
import "google/protobuf/wrappers.proto"; | ||
|
||
import "envoy/annotations/resource.proto"; | ||
import "udpa/annotations/migrate.proto"; | ||
import "validate/validate.proto"; | ||
|
||
option java_package = "io.envoyproxy.envoy.api.v2"; | ||
option java_outer_classname = "EgdsProto"; | ||
option java_multiple_files = true; | ||
option java_generic_services = true; | ||
option (udpa.annotations.file_migrate).move_to_package = "envoy.service.endpoint.v3"; | ||
|
||
// [#protodoc-title: EGDS] | ||
// Endpoint discovery :ref:`architecture overview <arch_overview_service_discovery_types_egds>` | ||
|
||
service EndpointGroupDiscoveryService { | ||
option (envoy.annotations.resource).type = "envoy.api.v2.EndpointGroup"; | ||
|
||
// The resource_names field in DiscoveryRequest specifies a list of clusters | ||
// to subscribe to updates for. | ||
rpc StreamEndpointGroups(stream DiscoveryRequest) returns (stream DiscoveryResponse) { | ||
} | ||
|
||
rpc DeltaEndpointGroups(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { | ||
} | ||
|
||
rpc FetchEndpointGroups(DiscoveryRequest) returns (DiscoveryResponse) { | ||
option (google.api.http).post = "/v2/discovery:endpoint_groups"; | ||
option (google.api.http).body = "*"; | ||
} | ||
} | ||
|
||
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing | ||
// services: https://github.com/google/protobuf/issues/4221 and protoxform to upgrade the file. | ||
message EgdsDummy { | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ syntax = "proto3"; | |
|
||
package envoy.api.v2; | ||
|
||
import "envoy/api/v2/core/config_source.proto"; | ||
import "envoy/api/v2/endpoint/endpoint_components.proto"; | ||
import "envoy/type/percent.proto"; | ||
|
||
|
@@ -114,4 +115,30 @@ message ClusterLoadAssignment { | |
|
||
// Load balancing policy settings. | ||
Policy policy = 4; | ||
|
||
// References endpoint groups by name. | ||
// Both endpoints and EGDS references will be used when present | ||
repeated Egds endpoint_groups = 6; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it does impact cluster warming and Envoy init. For EDS type of cluster, a cluster is considered warmed, if it gets at least one Endpoint Response. With this change, we should consider a cluster is fully warmed, only after receiving responses to all endpoint groups? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A ClusterLoadAssignment does not recommend sending Endpoints and EndpointGroups together, and while the code implementation can be done, it can cause confusion when applied. If EGDS is used, I think it is necessary to initialize the cluster after receiving the response from all the endpoint groups. Otherwise, how should the envoy handle the initialization state of the cluster ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since |
||
} | ||
|
||
// New xDS payload. The size of endpoints is fully arbitrary. | ||
// Also the EGDS requests to Pilot can be merged into one to boost efficiency | ||
message EndpointGroup { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: Can you correct the comment above and explain what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry, it's been modified. |
||
string name = 1 [(validate.rules).string = {min_bytes: 1}]; | ||
|
||
// List of endpoints to load balance to. | ||
repeated endpoint.LocalityLbEndpoints endpoints = 2; | ||
|
||
// Map of named endpoints that can be referenced in LocalityLbEndpoints. | ||
// [#not-implemented-hide:] | ||
map<string, endpoint.Endpoint> named_endpoints = 3; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This field is not currently in use, but I think it should be retained because the endpoint group just groups the endpoints and the original definition should not be changed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO it's a great chance to declare
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you mean https://developers.google.com/protocol-buffers/docs/proto3#oneof |
||
} | ||
|
||
// The EGDS request configuration. | ||
message Egds { | ||
// Configuration for the source of EGDS updates for this Cluster. | ||
core.ConfigSource config_source = 1; | ||
|
||
// the endpoint group resource name. | ||
string endpoint_group_name = 2; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: /s/clusters/endpoint groups
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done