# Remote Procedure Call (RPC)

> You call a function in your code, but it runs on a far machine.

**Field:** Software Development  
**Category:** APIs  
**Also known as:** RPC, Remote Call

## Think of it like

Think of it like calling a friend and asking them to do a sum for you. It feels like doing it yourself.

## Definition

A remote procedure call runs a function on another computer, as if it were local. You call something like getUser(42), and the network trip happens out of sight. The other computer runs the function and sends the result back. Where REST is built around things, RPC is built around actions. gRPC and JSON-RPC are well-known kinds.

## Example

Emma's checkout calls chargeCard on the payment service. It looks like a normal call, but it goes over the network.

## Why it matters

Many systems split into services that talk by RPC. It is the main idea behind gRPC.

## Common mistake

Forgetting that the call crosses a network. It can be slow, time out or fail halfway, unlike a local call.

## Three principles

- **Looks like a function.** getUser(42).
- **Runs somewhere else.** Across the network.
- **Built on actions.** Not on things, like REST.

## Related terms

- [gRPC](https://learn.benibix.com/term/development/grpc)
- [REST API](https://learn.benibix.com/term/development/rest-api)
- [Application Programming Interface (API)](https://learn.benibix.com/term/development/api)
- [Function Call](https://learn.benibix.com/term/development/function-call)
- [JSON-RPC](https://learn.benibix.com/term/development/json-rpc)
- [tRPC](https://learn.benibix.com/term/development/trpc)

---

Source: https://learn.benibix.com/term/development/remote-procedure-call
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
