System Design AI

GRPC: The Follow-Up Questions Interviewers Ask, With Answers

Interviewers ask follow-up questions after you mention gRPC because the protocol touches many system-level concerns: latency, connection management, observability, and evolution of APIs. They want to know whether you understand the hidden costs and can reason about them at scale.

A good answer shows not just the definition of gRPC but also concrete numbers, real-world patterns, and the ability to compare alternatives. Below are the typical probes, ordered from the easiest to the most challenging, with sample candidate responses.

Core gRPC Concepts

1. How does gRPC differ from traditional REST over HTTP?

I would say gRPC uses HTTP/2 as its transport, which gives us multiplexed streams, header compression, and flow control. Unlike REST’s text-based JSON payloads, gRPC serializes messages with Protocol Buffers, which reduces the wire size by roughly 70 % for the same data. This means lower latency—on the order of a few hundred microseconds per request compared to a few milliseconds for a comparable REST call when the payload is 1 KB.

2. What are the main types of RPC calls gRPC supports?

gRPC defines four call patterns: unary, client-streaming, server-streaming, and bidirectional streaming. A unary call is a single request-response pair, similar to a classic HTTP GET/POST. In client-streaming, the client sends a sequence of messages and then receives one response; this is useful for uploading a large file in chunks. Server-streaming lets the server push a series of responses, which we use for real-time updates like a stock ticker. Bidirectional streaming combines both, enabling low-latency chat-style interactions where each side can send messages independently.

3. How does gRPC handle service discovery and load balancing?

By default, gRPC relies on the client to resolve the target address, often via DNS. For dynamic environments, we integrate with a service mesh such as Envoy or use the gRPC-LB policy, which can query a name-resolution service like Consul. The client then maintains a pool of connections to the resolved endpoints and uses round-robin or least-request load balancing. This matters because one long-lived HTTP/2 connection would otherwise pin all of a client’s calls to a single backend instance.

4. What is the impact of HTTP/2 flow control on gRPC performance?

HTTP/2 flow control limits the amount of data that can be in flight per stream and per connection. gRPC respects these windows, so if a client sends a burst of large messages, the server may pause until the window opens. For large messages, raising the initial window from the default of about 64 KB toward 1 MB lets the sender keep streaming instead of stalling on window updates. However, larger windows increase memory pressure on the server, so we tune them based on typical payload sizes.

5. How do you secure a gRPC connection?

We use TLS for encryption, typically terminating TLS at the edge proxy (e.g., Envoy) and then using mutual TLS (mTLS) between services for zero-trust intra-cluster communication. The client presents a certificate signed by the same CA, and the server validates it. Because gRPC connections are long-lived, handshakes are rare, so the CPU cost of mTLS is usually small next to the security benefit.

6. How do you handle versioning and backward compatibility?

Because gRPC contracts are defined in.proto files, we can add new fields with the optional keyword or use oneof to introduce new message types. Older clients simply ignore unknown fields, preserving compatibility. In one of our services we added a new address field to a User message; the change rolled out without any client errors, and we observed zero regressions in our integration tests.

7. What are the observability challenges with gRPC and how do you address them?

gRPC exposes per-call metrics and traces through its OpenTelemetry integration and interceptors; the separate health-checking protocol only reports whether a service is serving. However, the binary payload makes tracing payload size harder. We instrument both client and server interceptors to log request and response sizes, latency, and error codes. With these interceptors feeding per-method dashboards and alerts, a latency spike can be caught by an alert instead of being reported by users.

8. How does gRPC behave under high concurrency and what scaling patterns do you use?

Since gRPC reuses a single HTTP/2 connection for many streams, a single server thread can handle thousands of concurrent calls. In a microservice handling 5 M requests per day (about 58 RPS), we kept the connection pool at 10 sockets per client and saw CPU utilization stay under 40 %. For larger loads, we shard the service horizontally and use a client-side load balancer to spread streams across instances, which scales linearly with the number of shards.

9. When would you choose NOT to use gRPC?

If the client ecosystem is predominantly browsers, REST with JSON is more interoperable because browsers lack native HTTP/2 stream APIs. Also, when you need human-readable payloads for debugging or when you have very small payloads where the overhead of protobuf serialization outweighs the bandwidth savings, plain HTTP/1.1 may be simpler. In a low-traffic internal admin UI we kept a REST endpoint for ad-hoc queries because the engineering effort to generate a protobuf client in the browser outweighed the performance benefit.

Senior vs. Staff Answers

A senior-level answer typically covers the core mechanics, provides a concrete example, and mentions trade-offs. A staff-level answer goes further: it quantifies impact at scale, references operational tooling (service mesh, observability pipelines), and discusses design evolution (e.g., how you would migrate a legacy REST service to gRPC across multiple teams). Staff candidates also anticipate future constraints, such as multi-region latency budgets and cross-cloud compatibility, and they back their choices with rough capacity calculations.

How to practice this

  1. Pick a recent interview question that mentions gRPC. Draw a high-level architecture on a whiteboard or a digital canvas, labeling each gRPC component.
  2. Write out the nine follow-up questions and rehearse answering them in the first person, inserting concrete numbers from your own projects.
  3. Use System Design AI’s practice canvas to sketch the request flow and get AI feedback on the completeness of your answer.

Questions people ask

What is the typical latency advantage of gRPC over REST?

Because gRPC uses binary protobuf payloads and HTTP/2 multiplexing, you often see latency reduced by a few hundred microseconds to a couple of milliseconds per request compared to a comparable JSON/REST call.

Can gRPC work with browsers?

Directly, no. Browsers do not expose HTTP/2 stream APIs needed for gRPC. You would need a proxy that translates gRPC to REST or use gRPC-Web, which adds an extra hop.

How does gRPC handle large file uploads?

You would use client-streaming RPCs, sending the file in chunks over a single HTTP/2 stream. This avoids opening many separate connections and keeps overhead low.

Is gRPC compatible with existing monitoring tools?

Yes. gRPC integrates with OpenTelemetry, Prometheus, and Jaeger via interceptors, allowing you to export metrics, logs, and traces alongside your existing observability stack.