All jobs / Backend developer / API Development
Backend developer interview question · 3–5 years
When would you pick gRPC over a JSON REST API, and what do you give up?
The strongest answer
Between your own services, where a generated versioned contract and lower overhead matter — protobuf over HTTP/2 gives typed clients and streaming; you give up browser support, readable payloads and plain curl debugging
Why it works
Exactly — and naming the costs is the part interviewers listen for: tooling, debuggability and the browser.
What a good answer covers
- Typed contract, HTTP/2, streaming.
- Best between services you own.
- Costs: browsers, tooling, readability.
- Keep REST at the public edge.
Answers that fall short
- Close, but not the strongest: For internal services that need performance, keeping REST at the edge for browsers
The right shape; say why, though — the generated contract and streaming, not only “performance”. - Weak: Whenever both ends are ours — for server-to-server calls gRPC is simply better than REST
“Simply better” ignores the cost: proxies, logs, debugging and every tool in your stack that speaks JSON. - Red flag: I would put gRPC everywhere, including the public API; integrators can install the generated SDK
Browsers cannot call gRPC without a translating proxy, and a public API that demands a generated SDK loses most integrators.
Who gets asked this
More API Development questions
- Your OpenAPI document lists every path and method and nothing else. A partner team says integrating still…
- The interviewer asks: “You're building an internal platform API other teams will live on. What changes?”…
- The interviewer asks: “When do you use GET versus POST?” Strongest answer?
- The interviewer asks: “What's the difference between HTTP 401 and 403?” Strongest answer?
- The interviewer asks: “When is 404 the right status, and when is 400?” Strongest answer?
- The interviewer sketches /getOrder and /doDeleteUser. Strongest design?
- The interviewer asks: “Which HTTP methods are safe to retry, and why?” Strongest answer?
- The interviewer asks: “How do you send and read JSON on an HTTP API?” Strongest answer?