VOOZH about

URL: https://www.geeksforgeeks.org/computer-networks/communication-protocols-for-rpcs/

⇱ Communication Protocols For RPCs - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Communication Protocols For RPCs

Last Updated : 26 Mar, 2026

Remote Procedure Call (RPC) communication protocols provide a high-level interprocess communication mechanism. The following are core RPC communication protocols that are used:

  • Request Protocol
  • Request/Reply Protocol
  • The Request/Reply/Acknowledgement-Reply Protocol

Request Protocol

This protocol is also known as the R protocol and it is used when a request is made from the calling procedure to the called procedure.

  • After the execution of the request, the called procedure has nothing to return and no confirmation is required for its execution.
  • Only one message is sent from the client to the server.
  • Reply is not required so after sending the request message, the client can further proceed with the next request.
  • Call semantics are provided, which eliminates the requirement for retransmission of request packets.
  • Asynchronous RPCs employ the R protocol for enhancing the combined performance of the client and server.
  • By using this protocol, the client need not wait for a reply from the server and the server does not need to send that.
  • In asynchronous RPCs, if communication fails, the RPC Runtime does not retry the request.
  • TCP is a better option than UDP since it does not require retransmission and is connection-oriented.
👁 geeksforgeeks
R Protocol

Request/Reply Protocol

This protocol is also known as RR protocol and it works well on systems that involve simple RPCs. In this parameters and result values are enclosed in single packet buffer.

  • This protocol uses implicit acknowledgements instead of explicit acknowledgements.
  • Reply from the server is treated as the acknowledgement (ACK) for the client's request message, and a client's following call is considered as an acknowledgement (ACK) of the server's reply message to the previous call made by the client.
  • To deal with failure handling e.g. lost messages, the timeout transmission technique is used with RR protocol.
  • If a client does not get a response message within the predetermined timeout period, it retransmits the request message.
  • Exactly-once semantics is provided by servers as responses get held in reply cache that helps in filtering the duplicated request messages and reply messages are retransmitted without processing the request again.
  • If there is no mechanism for filtering duplicate messages then at least-call semantics is used by RR protocol in combination with timeout transmission.
👁 geeksforgeeks2
RR Protocol

Request/Reply/Acknowledgement-Reply Protocol

THis protocol is also known as RRA protocol ans exactly one semantic is provided by RR protocol which refers to the responses getting held in reply cache of servers resulting in loss of replies that have not been delivered.

  • It is used to get rid of the drawbacks of the RR (Request/Reply) Protocol.
  • The client acknowledges the receiving of reply messages and when the server gets back the acknowledgement from the client then only deletes the information from its cache.
  • The reply acknowledgement message may be lost at times, the RRA protocol requires unique ordered message identities.
  • This keeps track of the acknowledgement series that has been sent.
👁 geeksforgeeks3
RRA Protocol

Complicated RPCs

This refers to RPCs where communication become difficult due to long-duration calls or large gaps between calls that cannot be transmitted in a single network packet.

1. RPCs with Long-Duration Calls or Long Gaps Between Messages

In some cases, the server takes a long time to process a request. To ensure the connection is still valid, special monitoring mechanisms are used.

  • After sending a request, the client periodically sends probe packets to check whether the server is still active. Each probe contains the message identifier of the original request, and the server must acknowledge it.
  • If the server takes longer than the expected retransmission interval to produce a response, it sends acknowledgement packets to inform the client that processing is still in progress.
  • If the client does not receive a response or acknowledgement within the specified time interval, it assumes that the server crashed or a communication failure occurred, and the user is notified about the exception.

2. RPCs with Parameters or Results Too Large for One Datagram

Sometimes the arguments or returned values are too large to fit into a single datagram packet. Two techniques are used to handle such cases.

RPCs with Long Messages

  • A single logical RPC is divided into multiple physical RPC calls.
  • Each physical RPC carries data limited to the size of one datagram packet.

Multidatagram Messages

  • Large parameters or results are split into multiple packets.
  • These packets are transmitted sequentially as part of the same RPC message.
Comment

Explore