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

docs: Improve xDS API documentation. #9029

Merged
merged 14 commits into from
Dec 4, 2019

Conversation

markdroth
Copy link
Contributor

Description: Improve xDS API documentation.
Risk Level: Low
Testing: N/A
Docs Changes: Included in PR.
Release Notes: N/A

@htuch and @mattklein123, please scrutinize this carefully to make sure I'm not inadvertantly getting anything wrong here. Thanks!

Signed-off-by: Mark D. Roth <roth@google.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #9029 was opened by markdroth.

see: more, trace.

api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
@htuch htuch self-assigned this Nov 14, 2019
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks this is great. A few comments..
/wait

api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
Signed-off-by: Mark D. Roth <roth@google.com>
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

This reads really well, a few more comments/asks and we can ship I reckon.
/wait

api/xds_protocol.rst Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Show resolved Hide resolved
api/xds_protocol.rst Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
htuch
htuch previously approved these changes Nov 21, 2019
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

Thanks, this is an awesome clarification. Needs to pass CI and have other @envoyproxy/api-shepherds sign-off on the new bits.

api/xds_protocol.rst Outdated Show resolved Hide resolved
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
@mattklein123 mattklein123 self-assigned this Nov 24, 2019
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved

In the SotW protocol variants, all resource types except for :ref:`Listener <envoy_api_msg_Listener>` and :ref:`Cluster
<envoy_api_msg_Cluster>` are grouped into responses in the same way as in the incremental protocol variants. However,
:ref:`Listener <envoy_api_msg_Listener>` and :ref:`Cluster <envoy_api_msg_Cluster>` resource types are handled differently:
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a bit misleading, since for SoTW EDS, all hosts have to be sent even if one is being added/removed, right? Can you rephrase?

Copy link
Member

Choose a reason for hiding this comment

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

All hosts need to be sent, but not all ClusterLoadAssignments, in an EDS update. I.e. if we have 4 clusters, {A, B, C, D}, we can send one EDS update with two ClusterLoadAssignments for {A, B}, with all the hosts for A and B in the respective messages. Then we can do the same for {C, D}.

Copy link
Member

Choose a reason for hiding this comment

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

Right, I would just clarify the text a bit if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you suggest what wording you'd like to see here? This document is talking about the set of resource types defined at the top, and individual hosts are not one of those types, so it's not clear to me how this could be misread to assume that individual hosts could be sent separately. Why would a reader think that hosts are any different from any other repeated field in the API?

Copy link
Member

Choose a reason for hiding this comment

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

I think my confusion here was basically related to the discussion starting around here: #8400 (comment). I had forgotten that we have a nested CLA message and that we are still in a situation in which all hosts have to be sent either in incremental or SoTW. I think this is such a common thing and a confusion point that if you are willing to explicitly call it out that would be really great.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, okay. I've added a note about this.

api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
api/xds_protocol.rst Outdated Show resolved Hide resolved
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks this is super awesome. Flushing out some comment sand will take another pass when updated. Thank you!

/wait

Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to api/.

🐱

Caused by: #9029 was synchronize by markdroth.

see: more, trace.

Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
Signed-off-by: Mark D. Roth <roth@google.com>
@markdroth markdroth mentioned this pull request Dec 3, 2019
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks this LGTM with a small nit. This is really awesome work and a great improvement. I think we should ship and iterate as needed. @htuch any further comments?

/wait

`Cluster` resources. In effect, every `Listener` or `Cluster` resource is a root to part of Envoy's
configuration tree.

A non-proxy client such as gRPC will start by fetching only the specific `Listener` resources
Copy link
Member

Choose a reason for hiding this comment

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

nit: s/will start/might start (to account for the multiple listener Envoy Mobile, etc. case)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

htuch
htuch previously approved these changes Dec 4, 2019
Copy link
Member

@htuch htuch left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@repokitteh-read-only repokitteh-read-only bot removed the api label Dec 4, 2019
Signed-off-by: Mark D. Roth <roth@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Epic, thanks!

@repokitteh-read-only repokitteh-read-only bot removed the api label Dec 4, 2019
@mattklein123 mattklein123 merged commit 6fa6035 into envoyproxy:master Dec 4, 2019
@markdroth markdroth deleted the xds_spec_cleanup branch December 4, 2019 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants