Lesson 24 · Senior gRPC backend engineering
Mock senior gRPC interview pack
A retrieval-first practice pack for turning the senior gRPC lessons into interview-ready answers you can say out loud under pressure.
Your win: run a realistic senior gRPC backend mock interview on yourself, score the answers honestly, and turn weak spots into a precise revision list.
The format
This page works best if you treat it like a real interview, not like a worksheet. Answer first. Then check the points. Then try again more cleanly.
- Round 1 · Core protocol and contracts — 6 questions
- Round 2 · Production design and failure modes — 6 questions
- Round 3 · Repo-grounded architecture and debugging — 6 questions
- Time target — 60–90 seconds per answer
Round 1 · Core protocol and contracts
These questions test whether the foundation is really yours or whether you only recognise the vocabulary when you see it on the page.
- What is the real compatibility rule behind protobuf field numbers?
- Why is gRPC built on protobuf plus HTTP/2 rather than just JSON over HTTP/1.1?
- What is the practical difference between unary and streaming RPCs?
- How do you explain deadlines vs timeouts clearly?
- Why are metadata and payload different concepts?
- What does a generated stub buy you in practice?
- Field numbers. The field number is the wire identity. Safe evolution preserves existing number meaning, adds new fields additively, and reserves anything removed.
- protobuf + HTTP/2. Protobuf gives a strict compact contract; HTTP/2 gives efficient multiplexed transport and native streaming support.
- Unary vs streaming. Unary is one request/one response and stays simpler operationally; streaming is for real sequences or long-lived flows and adds lifecycle complexity.
- Deadline vs timeout. A deadline is an absolute point in time shared through the call tree; a timeout is just the duration you convert into that deadline.
- Metadata. Metadata carries header-like side information such as tokens, trace IDs, and request context; payload messages carry business data.
- Stub. The generated stub gives a typed local-looking client API so callers do not hand-build transport details by convention.
Round 2 · Production design and failure modes
This is where the interview starts feeling more senior. The mechanism matters, but the trade-off matters more.
- When are retries helpful, and when are they dangerous?
- Why can a deadline budget still fail even when every service "supports deadlines"?
- Why don’t mature teams expose every internal RPC directly as public gRPC?
- When is streaming worth the cost?
- What is a strong way to talk about idempotency in RPC design?
- What makes an error code mapping strong rather than vague?
- Retries. They help for transient transport failures, but become dangerous when repeating the RPC can repeat a side effect and no idempotency strategy exists.
- Deadline budget failure. Teams may propagate the deadline mechanically but still waste the budget through queueing, retries, blocking downstream calls, or handlers that ignore cancellation.
- Public exposure. External consumers often benefit from REST/JSON ergonomics, tooling, and compatibility expectations even while internal calls stay native gRPC.
- Streaming worth it. When the data truly is a sequence, feed, upload stream, or long-lived conversation; not merely because multiple items exist.
- Idempotency. Repeating the same logical request should not create an additional logical effect, which is what makes retries safe enough to consider.
- Status mapping. A strong mapping distinguishes bad input, missing permission, transient availability, and real server faults instead of collapsing everything into Internal.
Round 3 · Repo-grounded architecture and debugging
This round is what makes the mock feel specific to your actual backend work instead of generic gRPC trivia.
- What is the real codegen workflow in this repo?
- How does auth flow through the interceptor chain here?
- Why is unary still the normal shape in the three main services?
- What does grpc-gateway do in this repo?
- What is the senior debugging workflow for a slow or failing RPC?
- Why is reflection absent but health present here?
- Codegen workflow. The repo uses raw protoc via make gen-proto-go / proto/gen_go.sh for generated Go and gateway code, while buf is used for lint and breaking checks only.
- Auth flow. The auth interceptor reads token metadata, verifies JWT claims, injects claims into context, then authorizes the method against rbacDecider; internal calls can use fake internal JWT context for controlled service-to-service flows.
- Unary normal shape. Unary fits the dominant business interactions here and keeps service behavior simpler to reason about and operate; streaming is used only where the sequence really matters elsewhere in the repo.
- grpc-gateway. It exposes selected gRPC services as REST/JSON by transcoding HTTP requests into gRPC calls from the same proto contract and mapping auth metadata across the boundary.
- Debugging workflow. Identify the exact RPC and symptom, inspect traces/status/metadata/deadlines, locate the relevant interceptor or downstream hop, then fix from evidence instead of assumptions.
- Health vs reflection. Health supports operations and probes directly, while reflection is a separate discoverability choice that this repo deliberately does not enable.
Self-scoring rubric
| Score | Meaning |
|---|---|
| 0 | I could not explain it without notes. |
| 1 | I gave fragments, but the answer was incomplete or fuzzy. |
| 2 | I explained the main idea, but missed the trade-off or backend consequence. |
| 3 | I gave a strong, clear answer with model + trade-off + backend consequence. |
Q1. The main rule of this mock pack is…
Sources. This pack synthesizes the course lessons, especially Lessons 8–17 and 18–23, into retrieval practice.