gRPC and Service-to-Service Communication Questions
Efficient inter-service communication using RPC-style contracts: gRPC, Protocol Buffers, streaming modes, and binary serialization trade-offs versus JSON/REST. Covers synchronous request/response between microservices, service discovery, deadlines/timeouts, and choosing a transport for internal versus public-facing traffic.
Given a REST endpoint that accepts large file uploads via multipart form, design a gRPC proto3 definition that supports client-side streaming of file bytes along with an initial metadata message. Show the core proto service and explain how a browser or REST client could interop with this gRPC service.
You're choosing internal service-to-service communication for latency-sensitive microservices inside a data center. Compare gRPC (with protobuf over HTTP/2) and REST (JSON over HTTP/1.1) across latency, throughput, streaming support, developer ergonomics, client diversity, observability, and deployment complexity. Which would you choose and why?
Explain protobuf schema evolution rules (proto3) that allow adding fields safely while preserving backward and forward compatibility. Provide examples of safe additions, unsafe renames or type changes, and an example migration plan for renaming a field while minimizing client breakage.
Design a migration plan to move internal services from JSON/REST to Protobuf/gRPC to reduce payload size and improve performance. Discuss phased migration steps (backend-only first), bridging layers or facades for polyglot clients, maintaining contract compatibility, observability changes, and how to measure actual performance gains and the cost of migration.
That is every published gRPC and Service-to-Service Communication question for Software Engineer so far. Browse the other topics in this category, or practice this one interactively.