NEW
Also known as: Remote Procedure Call, Distributed Call
A communication paradigm where a program invokes procedures on a remote system as if local.
DESCRIPTION
RPC enables code in one process to call procedures in another process, often across a network, abstracting transport and serialization. It relies on interfaces (IDLs), stubs, and marshalling for type-safe calls. Modern frameworks like gRPC use HTTP/2 and Protocol Buffers for efficient, bi-directional streaming. RPC is popular for low-latency microservice communication and strongly-typed contracts. It contrasts with REST’s resource orientation and with event-driven asynchronous messaging.
ALTERNATIVE DEFINITIONS
Wikipedia
In distributed computing, a remote procedure call (RPC) is a protocol that one program can use to request a service from a program located in another computer in a network without having to understand network details.
Emphasizes abstraction from underlying networking details.
Cloudflare
A remote procedure call (RPC) is a communication method used by programs to request a service from a program located on another computer on a network.
Highlights RPC as a communication method and its distributed nature.
gRPC
gRPC is a modern open source high performance Remote Procedure Call (RPC) framework that can run in any environment.
Positions RPC in the context of a high-performance, language-agnostic framework.
RELATED TERMS
gRPC Apache Thrift Interface Definition Language Protocol Buffers HTTP-2 Serialization Microservices Service Discovery Load Balancing
COMPETING TERMS
RELATIONS
- Narrower: Apache Thrift Arrow Flight
KNOWLEDGE AREAS
Software Engineering Data Integration & Interoperability Real-time & Streaming Data
TARGET AUDIENCE
Software Developer Data Engineer DevOps Engineer Cloud Architect AI Engineer
EXTERNAL SOURCES
- Wikipedia - Remote procedure call
- gRPC - gRPC overview and RPC fundamentals
- Apache Thrift - Cross-language RPC framework and IDL
TOP QUESTIONS
When should I use RPC (Remote Procedure Call) over REST?
Use RPC for low-latency, strongly typed interactions and streaming. It fits internal microservice calls needing high performance and contract-first development.
Category: Alternatives
What are common mistakes with RPC in microservices?
Tight coupling via brittle interfaces and insufficient backward compatibility are common. Neglecting timeouts, retries, and circuit breakers causes cascading failures.
Category: Mistakes
What serialization formats are typical in modern RPC?
Protocol Buffers and Avro are common for compact, schema-driven serialization. JSON is used for simplicity but is less efficient.
Category: Implementation
How does RPC affect service versioning?
RPC IDLs require explicit versioning and compatibility policies. Evolving schemas carefully prevents breaking changes in clients and servers.
Category: Management
What risks come with RPC-based architectures?
Increased coupling, chatty communication, and harder observability can emerge. Network failures must be first-class considerations.
Category: Risks
Is gRPC the same as RPC?
gRPC is a specific modern RPC framework using HTTP/2 and Protobuf. RPC is the broader paradigm.
Category: Misunderstanding
Can RPC support streaming?
Yes. Frameworks like gRPC support client, server, and bidirectional streaming for efficient real-time pipelines.
Category: Example
How do I monitor RPC calls effectively?
Instrument with tracing (OpenTelemetry), metrics (latency, error rate), and structured logs. Propagate context across service boundaries.
Category: BestPractice
What is a hot topic around RPC today?
Service meshes and HTTP/3/QUIC transport are extending RPC performance and reliability with advanced traffic policies.
Category: Topic