Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

No: a remote function call can look like a local call in code, but it is still a communication operation. The client sends a request to another system and waits for a reply, so distance brings latency, transport and server failures, and uncertainty about whether an operation ran. The API can hide the distance. It cannot erase what the distance changes.

What changes when a call crosses a network?

A local call has a simple shape: the program calls a function, waits while it runs, then receives a result. With remote procedure call (RPC), the code can preserve that call-and-return shape, but the function call itself does not travel across the network. The client turns the call and its arguments into a request message; a remote service interprets that message, performs the operation, and sends a reply.

That distinction matters because the caller is no longer interacting directly with a function in its own process. It is communicating with another system, and the call-shaped syntax does not make the communication instantaneous or guaranteed to succeed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How an RPC call works

  1. The client prepares a request. Client-side code represents the requested operation and its input as data that can be sent.
  2. The request travels to a service. The server receives and interprets the message, then runs the requested operation if it can.
  3. The service sends a reply. The client receives a response message and presents its result in a way that resembles a function return.

Both sides need to agree on how the message is represented. ONC RPC, for example, defines its message protocol using External Data Representation (XDR). That is a property of ONC RPC, not a rule that every RPC system uses XDR. RFC 5531

How local calls and RPC differ

Question Local call RPC call
What moves? Control passes to a function within the local program. A request message crosses a communication path; the service returns a reply message.
What does the caller wait for? The local function to finish and return. A remote service to receive, process, and reply to the request, with network communication in between.
What can fail? The local operation can fail within the program’s execution. The server or network can fail, and the request or reply may not reach the other side.
What does a timeout establish? Not applicable to the ordinary local call-and-return model. Only that the caller did not receive a reply before the timeout; it does not establish whether the service executed the operation.

Why remote calls cost more time

An RPC call includes work beyond running the requested operation: preparing and interpreting messages, communicating with the service, and waiting for its response. The time can also vary with network and server conditions. The caller’s code may block while awaiting a reply, just as it waits for a local function, but the remote wait has additional sources of delay.

RFC 5531 says remote procedures “usually operate at one or more orders of magnitude slower than local procedure calls.” This is a qualified, general statement in a 2009 specification, not a measured performance guarantee for a particular modern RPC framework, network, or workload. RFC 5531

Why transport reliability does not settle whether to retry

ONC RPC itself does not implement reliability. When an application uses an unreliable transport, it may need policies for timeouts, retransmission, and detecting duplicate requests. Those policies depend on the transport and the service’s behavior; RPC syntax alone does not provide them. RFC 5531

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A reliable transport such as TCP does not eliminate the key uncertainty. If the client times out without a reply, the service might not have received the request, might still be processing it, or might have completed it while its reply failed to reach the client. The client knows only that no reply arrived in time.

Retries can repeat effects

If the client sends the request again, the service may execute it twice unless the application and server are designed to handle duplicate requests. That is important for operations with side effects, such as creating a record or initiating a payment. A timeout is not proof of non-execution, and a retry is not automatically safe. Do not assume “exactly once” execution without support from the specific protocol and application design.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What RPC abstraction should—and should not—hide

A useful RPC abstraction saves developers from repeatedly writing low-level message plumbing. It can present a convenient call-and-reply interface, but application code still needs to account for latency, errors, retry behavior, and possible duplicate effects. The right abstraction reduces repetitive mechanics without concealing consequences that affect correctness.

RFC 5531 captures the design responsibility: “The conclusion is that even though there are tools to automatically generate client and server libraries for a given service, protocols must still be designed carefully.” The RFC was authored by R. Thurlow and published in May 2009. RFC 9289 is listed by the RFC Editor as an update to RFC 5531, so the cited specification is useful for the ONC RPC principles discussed here, not a complete account of current deployment details. RFC 5531 RFC 9289

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.