Use gRPC for internal service to service calls where you control both ends and want a strict contract, binary encoding, streaming and lower latency. Use REST over JSON for public APIs, browser clients and anything that benefits from being readable, cacheable and debuggable with curl. The trade is a generated, versioned schema and better performance against universal tooling and easy interoperability.
Why interviewers ask this
This tests whether you evaluate protocols on real properties rather than novelty. Interviewers want to hear about schema enforcement, code generation, streaming, and the browser limitation that pushes teams into a proxy layer. They are also listening for pragmatism, because most systems do not need the extra throughput and running a second protocol has a real cost in tooling, observability and onboarding.
How to structure your answer
- Split the answer by internal versus external consumers.
- Name the concrete gRPC wins: schema, codegen, streaming, binary framing.
- Name the costs: browser support, debuggability, infrastructure.
- Land on a recommendation for the system in question.
Example answer
I split it by who the consumer is. For anything a browser or a third party talks to, I stay on REST with JSON, because everyone can call it, you can cache at the edge, and when something breaks at two in the morning you can reproduce it with curl. For internal service to service traffic where I own both sides, gRPC earns its keep. You get a proto file as an enforced contract, generated clients in every language so nobody hand rolls a serializer, real bidirectional streaming, and far fewer bytes on the wire. The costs are real though. Browsers need a proxy layer, your load balancer has to handle HTTP/2 properly, and debugging a binary payload takes more setup. On a system I worked on we kept the public edge as REST and used gRPC between the gateway and the internal services, which gave us type safety internally without asking a single customer to change anything.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- How do you evolve a proto schema without breaking older clients?
- How would you handle retries and deadlines across gRPC calls?
- What does gRPC streaming give you that server sent events does not?
Related software engineer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions