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

Should grpc-web be served on the HTTP port or on a separate port? #8254

Closed
4 tasks
amaury1093 opened this issue Jan 5, 2021 · 0 comments · Fixed by #14652
Closed
4 tasks

Should grpc-web be served on the HTTP port or on a separate port? #8254

amaury1093 opened this issue Jan 5, 2021 · 0 comments · Fixed by #14652
Assignees
Labels
C: gRPC Issues and PRs related to the gRPC service and HTTP gateway.

Comments

@amaury1093
Copy link
Contributor

amaury1093 commented Jan 5, 2021

Summary

Bind grpc-web to the existing HTTP.

Problem Definition

Right now, grpc-web is serving on a different port than the HTTP server: #8077 (comment). But is it useful to expose an additional port?

Proposal

1. Keep grpc-web on a separate port (status quo)

Advantages:

  • clarity: one endpoint for gRPC, another endpoint for grpc-gateway (HTTP), and another one for grpc-web

2. Serve grpc-web under the same port as HTTP

grpc-web has a `` function to filter grpc-web requests. Our HTTP server can check if an incoming request is grpc-web, if yes, handle it, if not, fallback to what it used to do. Any example is given in this code snippet.

Advantages:

  • grpc-web is really HTTP under the hood, so we don't have 2 HTTP servers.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@amaury1093 amaury1093 added the C: gRPC Issues and PRs related to the gRPC service and HTTP gateway. label Jan 5, 2021
@amaury1093 amaury1093 added this to the v0.40.1 milestone Jan 5, 2021
@amaury1093 amaury1093 mentioned this issue Jan 5, 2021
9 tasks
@aaronc aaronc modified the milestones: v0.40.1, v0.42 Jan 6, 2021
@julienrbrt julienrbrt self-assigned this Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: gRPC Issues and PRs related to the gRPC service and HTTP gateway.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants