Systems & Backend

RPC

also: Remote Procedure Call

A style where calling a remote service looks like calling a local function.

RPC (Remote Procedure Call) is an API style that makes a network call look like a normal function call: you invoke a named method with arguments, and a stub handles serializing the request, sending it, and deserializing the reply. Modern frameworks like gRPC use a schema (Protocol Buffers) to generate typed client and server code and run over HTTP/2.

Worked example: instead of building a URL and parsing JSON like REST, a service calls userService.GetUser(id) and the gRPC stub turns it into a binary request over HTTP/2, returning a typed User object. Gotcha: the "looks like a local call" abstraction is exactly the trap — remote calls fail, retry, and add latency in ways local ones never do, so treating an RPC like a free function call leads to chatty designs and brittle error handling.