0
votes

Need to convert HTTP request into gRPC using Envoy. Backend micro service is working fine and it will support gRPC, but doesn't handle Http, so I need to convert request to grpc using envoy.

So the benefit is, both http and gRPC can handle together. Is it possible with Envoy, if yes, how can I do the configuration in Envoy.

1
Why do you think you need to use envoy to convert HTTP to gRPC? I don't think to add Envoy complexity to you app is the best option. Is Envoy already part of your stack? You can always create a simple HTTP endpoint which will get the HTTP request and call a gRPC method. It is pretty simple. Here an example in Golang github.com/apssouza22/protobuf-api-management/blob/master/… Also, consider looking at the github.com/grpc-ecosystem/grpc-gatewayAlexsandro Souza
@AlexsandroSouza Application is running with micro framwork with 20 modules , as per your concern we need to call direclty to all module , also micro api have the ability to accept http requests and forward it to our services.. same only envoy/nginx does, but envoy/nginx have better ability to handle the request performance. I have tried both nginx and envoy as a gateway , but betting CORS issueshufilkhan

1 Answers

0
votes

You can see how to work with gRPC over HTTP using Envoy here: https://github.com/grpc/grpc-web. If you just need Envoy config, see one example here: https://github.com/grpc/grpc-web/blob/master/net/grpc/gateway/examples/echo/envoy.yaml