Top 3 Grpc Interview Questions
Browse 3 real-world technical and behavioral interview questions about Grpc. Review scenarios, edge cases, and architectural best practices.
A gRPC call three services deep hangs, and so does everything waiting on it. What was missing?
A gRPC deadline. gRPC sets none by default, so a client waits as long as the server takes, and every caller up the chain holds a thread or stream with it. Set a deadline at the edge, propagate the remaining budget on every hop, stop work on cancellation, and retry only inside what is left.
The same domain has to be exposed to a mobile app, a partner integration and internal service-to-service traffic. Where does GraphQL fit, where does gRPC, and where does neither?
Choose per consumer: GraphQL where many client shapes make over-fetching the problem, gRPC for internal traffic wanting typed generated stubs and streaming, plain JSON over HTTP for partners who want curl and a CDN. Then batch your resolvers, because the N+1 is structural.
You move an internal service to gRPC behind the same load balancer your REST services use, and one pod ends up serving most of the traffic. What is happening, and what do you change?
gRPC multiplexes many calls over one long-lived HTTP/2 connection, so a balancer that distributes connections pins each client to one backend for its lifetime. Balance per request with an HTTP/2-aware proxy or client-side subchannels, and bound connection age so scaling out actually moves traffic.