Spring / Spring gRPC Interview Questions
What is gRPC and why would you use it in a Spring application?
gRPC is an open-source, high-performance remote procedure call (RPC) framework built on HTTP/2, originally developed by Google. It uses Protocol Buffers as its interface definition language and wire format.
In a Spring application, gRPC is chosen when a service needs low-latency, strongly-typed communication with other services - typically internal microservice-to-microservice calls rather than public-facing APIs. Because the contract lives in a .proto file, both client and server stubs are generated from the same source, eliminating drift between what a client expects and what a server returns.
Compared to JSON-over-REST, gRPC payloads are smaller and faster to (de)serialize, and the framework has native support for streaming, which makes it a natural fit for Spring services that need to push continuous updates or handle large data transfers efficiently.
More Related questions...