Practice the vocabulary of efficient, strongly typed service-to-service communication.
0 / 5 completed
1 / 5
At standup, a dev mentions using a binary, high-performance protocol built on HTTP/2 for service-to-service communication instead of plain JSON over REST. What is this protocol called?
gRPC is a binary, high-performance remote procedure call protocol built on HTTP/2, commonly used for efficient service-to-service communication, especially within a microservices architecture. Its binary format and use of HTTP/2 features, like multiplexed streams, typically make it faster and more efficient than plain JSON over REST for internal, high-throughput communication. It requires a strictly defined schema, which also brings stronger type safety than a loosely structured JSON payload.
2 / 5
During a design review, the team wants a service call that returns a continuous stream of results over time rather than a single response after the call completes. Which capability supports this?
Server streaming RPC lets a single client request receive a continuous stream of multiple responses over time, rather than waiting for one single response after the entire call completes. This is well suited to a use case like sending live updates or a large result set incrementally rather than all at once. It's one of gRPC's several supported call patterns, alongside a simple unary call and bidirectional streaming.
3 / 5
In a code review, a dev notices the service's request and response messages are strictly defined in a schema file that both the client and server compile code from. What does this represent?
Protocol Buffers schema definition strictly defines a service's request and response message structure in a shared schema file, from which both client and server generate strongly typed code. This ensures the client and server agree precisely on the message format, catching a mismatch at compile time rather than as a runtime surprise. It's a key part of what makes gRPC both efficient, through compact binary serialization, and reliably type-safe across service boundaries.
4 / 5
An incident report shows a gRPC service call hung indefinitely because no deadline was set, tying up client resources waiting on a response that never came. What practice would prevent this?
Setting an explicit deadline on every gRPC call ensures it fails predictably with a timeout error instead of hanging indefinitely and tying up client resources waiting on a response that may never arrive. Assuming a call will always complete quickly without a deadline configured leaves the system vulnerable to a slow or unresponsive downstream service. This deadline discipline is a standard resilience practice for any service-to-service RPC call, not just gRPC specifically.
5 / 5
During a PR review, a teammate asks why the team uses gRPC instead of REST with JSON for this internal, high-throughput service-to-service communication. What is the reasoning?
JSON over REST is human-readable and broadly compatible but carries more overhead in serialization size and lacks the strict schema enforcement gRPC provides by default. gRPC's binary Protocol Buffers format and HTTP/2 foundation are typically more efficient for high-throughput internal traffic. The tradeoff is that gRPC is less naturally human-readable and less universally supported by simple tools like a browser making a direct request, which is why REST often remains preferred for a public-facing API.