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

Suggestion: Clarify that, in practice, user-configurable values for gRPC endpoint URLs do not support a path component, and why #1345

Open
ghannington-Rocket opened this issue Aug 14, 2024 · 1 comment

Comments

@ghannington-Rocket
Copy link

Problem

Googling for:

grpc url path

reveals some confusion about whether gRPC supports endpoint URLs with a path component.

One has to delve to find the answer, in "gRPC over HTTP2":

Path → ":path" "/" Service-Name "/" {method name} ; But see note below.
...
Some gRPC implementations may allow the Path format shown above to be overridden, but this functionality is strongly discouraged. gRPC does not go out of its way to break users that are using this kind of override, but we do not actively support it, and some functionality (e.g., service config support) will not work when the path is not of the form shown above.

Suggestion

Somewhere in an introductory, language-implementation-independent topic in the gRPC documentation, highlight the fact that, in practice, user-configurable values for gRPC endpoint URLs do not support a path component, and why.

And/or elaborate on and/or reword that note about the path in "gRPC over HTTP2", for clarity. While I understand that the existing wording deliberately allows for the possibility of implementations that "allow the Path format shown above to be overridden", I think a concise statement to the effect that, in practice, user-configurable values for endpoint URLs are limited to, say, host:port, would help to avoid confusion.

Reference

@ghannington-Rocket
Copy link
Author

ghannington-Rocket commented Aug 14, 2024

I acknowledge that, to the designers and developers of gRPC—who might also be the writers of the gRPC docs that I've cited, or might have provided draft content to the writers—this point will be obvious: the path format is intrinsic to the design of gRPC over HTTP/2; so, of course specifying a non-root path is going to be problematic, and hence, strongly discouraged; not supported by implementations in practice.

However, new users of gRPC might bring expectations based on experience with API endpoint URLs that involve, or allow, path components. Hence, to those users, this point might not be so obvious; worth clarifying.

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

No branches or pull requests

1 participant