mesh icon indicating copy to clipboard operation
mesh copied to clipboard

Add gRPC Web support

Open everflux opened this issue 4 years ago • 7 comments

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.

everflux avatar May 12 '20 19:05 everflux

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?

dtomcej avatar May 12 '20 19:05 dtomcej

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.

everflux avatar May 12 '20 20:05 everflux

Ah that makes sense. Thx for the explanation.

dtomcej avatar May 12 '20 22:05 dtomcej

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

einali avatar Aug 21 '20 13:08 einali

@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.

jspdown avatar Aug 24 '20 07:08 jspdown

@jspdown any update or related issue are welcome

zs-dima avatar Nov 14 '22 18:11 zs-dima

@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:

jspdown avatar Nov 15 '22 11:11 jspdown