QA
Intermediate LevelREST APIs & Web Services

How does gRPC-Web and Envoy gRPC Transcoding bridge browser clients to gRPC backends?

❓ Interview Prompt: Explain gRPC browser limitations (lack of HTTP/2 frame control access), gRPC-Web spec, and Envoy proxy JSON-to-gRPC transcoding.

Browsers cannot issue native gRPC calls directly because JavaScript APIs do not expose fine-grained HTTP/2 frame control:

2 Bridge Solutions:

1
gRPC-Web Protocol: Client uses 'grpc-web' JS library, sending gRPC-Web encoded HTTP/1.1 or HTTP/2 POST requests. An Envoy proxy translates gRPC-Web frames to native gRPC.
2
Envoy gRPC-JSON Transcoding: Translates standard REST JSON HTTP requests ('POST /v1/users') into binary gRPC calls automatically using OpenAPI annotations in '.proto' files!

Code Implementation Example

yaml
# Envoy gRPC-JSON Transcoder Filter Config
name: envoy.filters.http.grpc_json_transcoder
typed_config:
  "@type": type.googleapis.com/envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder
  proto_descriptor: "/etc/envoy/proto.pb"
  services: ["UserService"]
💡Envoy proxy gRPC-JSON transcoding filter configuration.
🎯 Interview Key Takeaway

Envoy gRPC transcoding translates external REST JSON HTTP requests into internal binary gRPC calls seamlessly.

#gRPC-Web#Envoy#Transcoding#Intermediate
Back to all REST APIs & Web Services Questions→

More REST APIs & Web Services Interview Questions

Beginner LevelREST APIs & Web Services

What is HTTP Method Idempotency and how do you implement Idempotency Keys for REST APIs?

Beginner LevelREST APIs & Web Services

What are standard HTTP Status Codes (200, 201, 204, 400, 401, 403, 404, 409, 429, 500, 503)?

Beginner LevelREST APIs & Web Services

What are HTTP Verbs (GET, POST, PUT, PATCH, DELETE) and when to use PUT vs PATCH?