GraphQL vs. REST: A Performance and Cost Investigation for Serverless Applications
Open Access
- 2 December 2024
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 37-42
Abstract
Serverless computing simplifies application deployment by removing the need for infrastructure management, with RESTful APIs being the common interface. However, REST can lead to inefficiencies such as data over-fetching and under-fetching, which impact performance and cost. This paper investigates GraphQL as an alternative to REST for serverless functions using a serverless image processing pipeline. We evaluate roundtrip time (RTT), scalability, and cost, while also examining managed (AWS AppSync) and unmanaged (Apollo Server) GraphQL hosting solutions. Our results show that GraphQL generally outperforms REST with respect to pipeline RTT, especially when there is high network latency, offering a potentially better fit for optimizing data transfer in serverless applications.Keywords
This publication has 9 references indexed in Scilit:
- X86 vs. ARM642023
- Evolutionary-based automated testing for GraphQL APIs2022
- Developing a GraphQL SOAP Conversational Micro Frontends for the Problem Oriented Medical Record (QL4POMR)2022
- Learning GraphQL Query Cost2021
- Can GraphQL Replace REST? A Study of Their Efficiency and Viability2021
- Automatic Property-based Testing of GraphQL APIs2021
- Defining Schemas for Property Graphs by using the GraphQL Schema Definition Language2019
- GraphQL for archival metadata: An overview of the EHRI GraphQL API2017
- Improving the OEEU's data-driven technological ecosystem's interoperability with GraphQL2017