traefik / mesh

Traefik Mesh - Simpler Service Mesh
https://traefik.io/traefik-mesh
Apache License 2.0
2.02k stars 141 forks source link

Add gRPC Web support #571

Open everflux opened 4 years ago

everflux commented 4 years ago

Feature Request

Proposal

Support gRPC Web to HTTP translation as part of maesh/traefik. Currently an additional envoy proxy instance is required. This is related to https://github.com/containous/traefik/issues/4210

Background

For web clients a translation between http-grpc and grpc is required. Since most frameworks do not support this as in-process an external proxy must provide the protocol translation. See https://github.com/grpc/grpc-web

Workarounds

Use envoy in addition to maesh.

dtomcej commented 4 years ago

I'm curious why you would choose to use gRPC-Web as a protocol for inter-service communication.

It seems like gRPC-Web is designed to solve some issues that browsers face, and provide external-facing features.

Wouldn't just using base gRPC requests be simpler in a clustered environment?

everflux commented 4 years ago

You are right that gRPC is for inter-service communication, but I don't want to manually expose a different protocol (http/json). That is what gRPC-Web solves, but there needs to be a translating proxy. This could be at the edge with traefik or as part of the mesh in maesh. (So I thought)

The reason for translating as part of the mesh is that for load balancing of the long lived http2-stream the protocol needs to be converted to discrete requests anyway.

dtomcej commented 4 years ago

Ah that makes sense. Thx for the explanation.

einali commented 4 years ago

Is there any update for this feature? What is time schedule for implementing it?

jspdown commented 4 years ago

@einali Thanks for you interest in Maesh.

As Maesh depends on Traefik we can't give you any ETA until this feature gets implemented on their side.

zs-dima commented 1 year ago

@jspdown any update or related issue are welcome

jspdown commented 1 year ago

@zs-dima the GrpcWeb middleware has been merged very recently on Traefik https://github.com/traefik/traefik/pull/9451. Once this get released we will be able to unblock this issue.

In the meantime, if anyone wants to start working on this, I would be happy to help :smiley: