skip to content

gRPC

A contract-first framework where a schema generates both ends of a call and every request rides one long-lived HTTP/2 connection. Interviewers use it as the internal-service counterpart to REST.

part ofAPI stylesoverview, primer and where to startread it →
on this pageshow

questions

page 2 of 2

Why is a blocking credential lookup inside a gRPC client-side interceptor worse than the same lookup in the calling code?

level: seniorimportance: should knowfreq 40%

basics

~20 s

Two reasons. The wrapper usually runs on the thread driving the connection, and one connection carries many concurrent calls, so it stalls unrelated ones. And it runs inside the call, so its latency is spent out of the deadline the caller already set.

open as a page

A gRPC server-side interceptor catches every handler exception so its audit write always happens; why do callers now see OK (0)?

level: seniorimportance: should knowfreq 48%

basics

~20 s

Because the wrapper sits between the handler and the machinery that writes the call's status. Catching the failure and then completing the call normally means OK (0) goes on the wire, and the failure exists only in the server's own log.

open as a page

A gRPC server starts closing a caller's connections with the debug data too_many_pings — what did the caller's keepalive settings do wrong?

level: seniorimportance: should knowfreq 46%

basics

~20 s

Keepalive pings were sent more often than the server tolerates, typically on connections with no active calls. The server counted strikes and, past its limit, sent a GOAWAY carrying ENHANCE_YOUR_CALM and the debug data too_many_pings.

open as a page

In a gRPC service config, how do retryPolicy and hedgingPolicy differ, and what keeps either from amplifying a backend outage?

level: seniorimportance: should knowfreq 34%

basics

~20 s

A gRPC method config holds either a retryPolicy, which replays a call after a retryable status with backoff, or a hedgingPolicy, which sends staggered copies without waiting. retryThrottling, a per-server-name token budget, halts both when failures pile up.

open as a page

A browser console's gRPC-Web server-streaming feed stops silently. Why is a cut response hard to detect, and what must the client check?

level: seniorimportance: should knowfreq 46%

basics

~20 s

gRPC-Web uses no HTTP/2 framing, so no stream-reset frame, connection-closing frame or transport ping tells the client anything. The response ends when its body ends, so a cut response looks complete - except the final trailer frame never arrived.

open as a page

Across an organisation, would you put gRPC balancing in every client library or terminate every connection in a sidecar data plane?

level: principalimportance: should knowfreq 42%

basics

~20 s

Client-side balancing costs no extra hop but duplicates the policy in every language and ships only when callers redeploy. A sidecar centralises the policy at the price of a hop, a process per workload, and a new failure domain.

open as a page

Where should the .proto defining a gRPC service live, who owns it, and what does the generated-code step cost consumers?

level: principalimportance: should knowfreq 38%

basics

~20 s

The implementing team owns the file, but it should be published from one place every consumer builds against rather than copied per repository. The cost is a build-time dependency for every consumer: a caller built from generated code reaches a new method only after rebuilding.

open as a page

In a gRPC bidirectional streaming call, must the server wait for the client's last message before replying?

level: middleimportance: nice to knowfreq 32%

basics

~20 s

No. The two directions of a bidirectional gRPC call are independent: the server may answer after the first message, interleave replies with incoming messages, or wait for the whole sequence. The application protocol decides, not gRPC.

open as a page

In gRPC, how do grpc-encoding, grpc-accept-encoding and the Compressed-Flag byte negotiate message compression, and what happens when a receiver cannot decode the encoding?

level: middleimportance: nice to knowfreq 24%

basics

~20 s

grpc-encoding names the algorithm a sender uses, grpc-accept-encoding lists what it can decode, and each message's Compressed-Flag says whether that message is compressed. A server given an unsupported algorithm fails with UNIMPLEMENTED; a client fails with INTERNAL.

open as a page

In gRPC, how is a service's fully qualified name derived from its .proto file, and what breaks when the package line changes?

level: middleimportance: nice to knowfreq 30%

basics

~20 s

A service's fully qualified name is the proto package, a dot, then the name in the service stanza, and it is case-sensitive. Changing the package line renames the service, so callers built against the old name no longer reach it.

open as a page

What does gRPC-Web's text variant change about a response body, and what trips decoders up?

level: middleimportance: nice to knowfreq 26%

basics

~20 s

The text variant, application/grpc-web-text, base64-encodes the whole body - frames, payloads and trailer block alike. A client asks for it with Accept: application/grpc-web-text. Its trap is that base64 padding does not line up with frame boundaries.

open as a page

A team adds several large gRPC metadata keys to every call, and some calls now fail before the handler runs. Why?

level: seniorimportance: nice to knowfreq 30%

basics

~20 s

Metadata rides in a size-bounded field block. The gRPC specification suggests a default limit of 8 KiB on request metadata and trailers, and the HTTP/2 peer advertises its own limit, so an oversized block is rejected by the transport before any handler sees the call.

open as a page

A gRPC call ends with an HTTP/2 stream reset and no grpc-status — how does the client decide what to report?

level: seniorimportance: nice to knowfreq 32%

basics

~20 s

The client maps the reset's HTTP/2 error code onto a gRPC status. REFUSED_STREAM means the server never processed the call and becomes UNAVAILABLE; CANCEL becomes CANCELLED; most others become INTERNAL, since the call ended abnormally.

open as a page

Curators debug a gRPC catalogue fleet through a reverse proxy mid-rollout and reflection hands them two definitions of one message. What happened?

level: seniorimportance: nice to knowfreq 30%

basics

~20 s

A reflection answer describes the instance that produced it. During a rollout the pool holds two builds with different descriptors, and separate calls through a reverse proxy can reach different instances, so two lookups return two versions of the same message.

open as a page

A gRPC caller's channel was created hours ago, so a freshly doubled worker pool receives nothing from it — what moves those calls?

level: seniorimportance: nice to knowfreq 32%

basics

~20 s

Nothing in gRPC rebalances an established connection on its own. New workers are picked up only when the caller re-resolves, which happens after a subchannel fails or after the server bounds connection lifetime and closes gracefully.

open as a page

showing 31–45 of 45