Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • jQuery
  • AngularJS
  • ReactJS
  • Next.js
  • React Native
  • NodeJS
  • Express.js
  • MongoDB
  • MERN Stack
  • PHP
  • WordPress
  • Bootstrap
  • Tailwind
  • CSS Frameworks
  • JS Frameworks
  • Web Development
Open In App
Next Article:
Difference between REST API and SOAP API
Next article icon

Difference Between REST API and RPC API

Last Updated : 21 Jun, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

REST and RPC are design architectures widely used in web development to build APIs (Application Programming Interface). It is a set of instructions that permits two systems to share resources and services. The client creates a request to the server that responds to it with data in JSON or XML format.

REST APIs

It stands for Representational State Transfer (REST) is an architectural style that defines a set of constraints and protocols to be used for creating web services. REST API is a method of accessing web services in a very simple and flexible manner without having any processing. A REST API endpoint is a URL that utilizes HTTP verbs to execute CRUD (Create Read Update Delete) operations over the resources. These HTTP verbs are GET, POST, PATCH, PUT and DELETE. It focuses on providing resources from the server to the clients.  

Advantages of REST APIs

  • They are very scalable as the client and server are decoupled easing to scale in the future.
  • Simple, standardized, and easy to use.
  • Uses already existing HTTP features.
  • They have high performance because of their cache capabilities.
  • Allows Standard-based protection with the use of OAuth protocols to verify REST requests.
  • Brings flexibility by serializing data in XML or JSON format.

Disadvantages of REST APIs

  • REST API’s payload is quite big hence the entire files get back while you needed one field.
  • It loses the ability to maintain state in REST.

RPC APIs

Remote Procedure Call (RPC) is a methodology used for constructing distributed, client-server-based applications. It is also called a subroutine call or a function call. It is based on conventional local procedure calling so that the called procedure need not exist in the very same address space as the calling procedure executes. RPC is very well suited for a client-server interaction in which the flow of control lingers between the two. The client and server do not both execute at the same time instead the thread of execution jumps from one to another.

Advantages of RPC APIs

  • They provide usage op applications in both local and distributed environments.
  • It provides ABSTRACTION.
  • They have lightweight payloads, therefore, provides high performance.
  • They are easy to understand and work as the action is part of the URL.

Disadvantages of RPC APIs

  • It can be implemented in many ways as it is not well standardized.
  • It has no flexibility for hardware architecture.

Following is a table of differences between REST and RPC

S.No.

REST API

RPC API

1

REST is resource-oriented. RPC is action-oriented.

2

Supports HTTP methods GET, POST, PUT, PATCH, and DELETE. RPC only supports GET and POST requests.

3

It provides flexibility for hardware architecture no flexibility in RPC for hardware architecture

4

It supports hypermedia and hyperlinks  It does not supports hypermedia and hyperlinks

5

REST allows to specify Content-types or accept headers Require payloads of a few data types as XML for XML-RPC.


Next Article
Difference between REST API and SOAP API

H

hemantrathore2705
Improve
Article Tags :
  • Difference Between
  • Web Technologies
  • Web Technologies - Difference Between

Similar Reads

  • Difference between REST API and SOAP API
    REST (Representational State Transfer) and SOAP (Simple Object Access Protocol) are the most common methods for communications. These services enable the web to communicate with the servers with HTTP protocol. REST is an architectural style that works over HTTP for communication, while SOAP is a pro
    2 min read
  • Difference Between REST API and RESTful API
    Both REST API and RESTful API are often used interchangeably in the software development community, but there are subtle differences between the two. Understanding these differences is important for building modern web applications, as both have significant roles in enabling communication between cl
    7 min read
  • Difference between Rest API and Web Socket API
    In IoT, there are 2 communication APIs - REST Based Communication APIsWeb Socket Based Communication APIs Web service can either be implemented using REST principles or using Web Socket Protocol - 1. REST Based Communication API : REpresentational State Transfer (REST) is a set of architectural prin
    4 min read
  • Difference between ARP and RARP
    In Address Resolution Protocol (ARP), Receiver's MAC address is fetched. Through ARP, 32-bit IP address mapped into 48-bit MAC address. Whereas, In Reverse Address Resolution Protocol (RARP), IP address is fetched through server. Through RARP, 48-bit MAC address of 48 bits mapped into 32-bit IP addr
    4 min read
  • Difference between RPC and RMI
    RPC stands for Remote Procedure Call which supports procedural programming. It's almost like an IPC mechanism wherever the software permits the processes to manage shared information Associated with an environment wherever completely different processes area unit death penalty on separate systems an
    2 min read
  • Difference between JIRA API and JIRA Align API
    Project management is a crucial task and to perform it efficiently, software tools like JIRA are used. JIRA is a software that was developed by Atlassian (An Australian company) in the year 2002 to ease the process of project management and bug tracking. In this article, we will explore the differen
    4 min read
  • Difference between Microservice and API
    1. Microservices : Microservices Architecture is an architectural style that structures an application as a collection of small autonomous services modeled around a business domain. In a Microservice Architecture, each service is self-contained and implements a single business capability. It is a po
    2 min read
  • Difference Between AJAX And Fetch API
    AJAX (Asynchronous JavaScript and XML) and Fetch API are both powerful tools used in modern web development for making asynchronous HTTP requests. Each has its strengths and specific use cases that developers should consider when deciding which to use. In this article, we will see the main differenc
    5 min read
  • Differences between Web API and MVC
    In this article, we will see what is Web API & MVC, their features & components, along with knowing their advantages & disadvantages, finally, will see the difference between them. The Model View Controller (MVC) is part of an architecture pattern that separates the application into 3 ma
    5 min read
  • Difference between API and GUI
    1. Application Programming Interface (API) : API stands for Application Programming Interface which is a collection of communication protocols and subroutines used by various programs to communicate between technology products such as applications and websites. Features of API: Programmable: An API
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences