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

Incremental XDS proposal. #3470

Merged
merged 11 commits into from
Jul 2, 2018
Merged
Show file tree
Hide file tree
Changes from 8 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
46 changes: 46 additions & 0 deletions api/XDS_PROTOCOL.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,52 @@ admin:

```

### Incremental xDS

Incremental xDS is separate xDS endpoint available for ADS that allows:

* Incremental updates of the list of tracked resources by the xDS client.
This supports Envoy on-demand / lazily requesting additional resources. For
example, this may occur when a request corresponding to an unknown cluster
arrives.
* The xDS server can incremetally update the resources on the client.
This support the goal of scalability of xDS resources. Rather than deliver
all 100k clusters when a single cluster is modified, the management server
only needs to deliver the single cluster that changed.

An xDS incremental session is always in the context of a gRPC bidirectional
stream. This allows the xDS server to keep track of the state of xDS clients
connected to it. There is no REST version of Incremental xDS.

In incremental xDS the nonce field is required and used to pair a
[`IncrementalDiscoveryResponse`](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/discovery.proto#discoveryrequest)
to a [`IncrementalDiscoveryRequest`](https://www.envoyproxy.io/docs/envoy/latest/api-v2/api/v2/discovery.proto#discoveryrequest)
ACK or NACK.
Optionally, a response message level system_version_info is present for
debugging purposes only.

`IncrementalDiscoveryRequest` can be sent in 3 situations:
1. Initial message in a xDS bidirectional gRPC stream.
2. As an ACK or NACK response to a previous `IncrementalDiscoveryResponse`.
In this case the `response_nonce` is set to the nonce value in the Response.
ACK or NACK is determined by the absence or presence of `error_detail`.
3. Spontaneous `IncrementalDiscoveryRequest` from the client.
This can be done to dynamically add or remove elements from the tracked
`resource_names` set. In this case `response_nonce` must be omitted.

In this first example the client connects and receive a first update that it
ACKs. The second update fails and the client NACKs the update. Later the xDS
client spontaneously requests the "wc" resource.

![Incremental session example](diagrams/incremental.svg)

On reconnect the xDS Incremental client may tell the server of its known resources
to avoid resending them over the network.

![Incremental reconnect example](diagrams/incremental-reconnect.svg)

The incremental xDS method may be added to CDS and RDS in the future.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why wouldn't this just be supported out of the box? It's not clear to me how any of this is ADS specific?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought adding it on a need-for basis made more sense to keep complexity down. We can add them now if you prefer. Let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO I would just add it now. Unless I'm misunderstanding the implementation, I think it will basically "just work." @htuch thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it will Just Work (tm).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


## REST-JSON polling subscriptions

Synchronous (long) polling via REST endpoints is also available for the xDS
Expand Down
1 change: 1 addition & 0 deletions api/diagrams/incremental-reconnect.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading