Explain the RPC paradigm in gRPC — calling a remote method as if it were local.
Last updated
In gRPC you call a generated stub method with a request object and get a response object back, exactly like a local method call: the abstraction hides serialization, connection management, and the HTTP/2 round trip.
The illusion of local calls: Your code calls
stub.GetUser(request)and receives a typed reply; the wire details are invisible.What happens underneath:
The stub serializes the request to Protobuf.
It sends it over an HTTP/2 stream on a shared channel.
The server deserializes, runs your handler, and returns a response the stub deserializes.
Where the abstraction leaks: Unlike local calls, remote calls can time out or fail mid-flight, so you handle status codes, deadlines, and retries.
[lang:python]
# Feels local; is actually a network call
with grpc.insecure_channel("localhost:50051") as channel:
stub = user_pb2_grpc.UserServiceStub(channel)
response = stub.GetUser(user_pb2.GetUserRequest(id=42))
print(response.name)
- https://www.youtube.com/watch?v=5YqAXWz6Fpc
- https://techwasti.com/25-grpc-interview-questions-and-answers-for-developers
- https://kreya.app/blog/rest-vs-grpc-which-should-you-choose/
- https://www.vskills.in/interview-questions/grpc-interview-questions
- https://interviewprep.org/grpc-interview-questions/
- https://articles.shadecoder.com/grpc-vs-rest-interview-comparison-for-2026
- https://www.geeksforgeeks.org/blogs/grpc-vs-rest/
- https://www.secondtalent.com/interview-guide/grpc-developers/
- https://www.youtube.com/watch?v=2w7aBrtoqAg
- https://medium.com/coding-odyssey/grpc-with-spring-boot-deep-dive-with-interview-questions-48aa83be0ec6
- https://www.reddit.com/r/golang/comments/1hlwzaj/question_about_grpc/
- https://oneuptime.com/blog/post/2026-01-08-grpc-vs-rest-api-comparison/view
- https://interviewprep.org/protocol-buffers-interview-questions/
- https://www.remoterocketship.com/advice/10-grpc-interview-questions-and-answers-in-2023/
- https://medium.com/@bhagyarana80/10-grpc-interceptor-ideas-that-cut-latency-bff058bb5a5c
- https://grpc.io/docs/guides/deadlines/
- https://www.reddit.com/r/kubernetes/comments/1gkemcc/grpc_name_resolution_and_load_balancing_on/