lnu.sePublications
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
A Comparative Performance Study of REST and GraphQL APIs: Latency and Throughput under Varying Query Complexity
Linnaeus University, Faculty of Technology, Department of computer science and media technology.
2026 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

Modern web and distributed systems rely heavily on Application Programming Interfaces (APIs), with Representational State Transfer (REST) and GraphQL serving as the primary architectural styles. While performance metrics such as latency and throughput are crucial for user experience and system efficiency, existing research often lacks a detailed analysis of how these APIs perform under varying levels of query complexity. This thesis investigates the performance differences between REST and GraphQL APIs by examining their behavior under comparable workloads and evaluating the impact of increasing query complexity on scalability. Using a design science methodology, a controlled experimental environment was developed with Python, Flask, and SQLite, while performance was evaluated using the Locust load testing tool. Measurements were conducted across three levels of query complexity, ranging from simple lookups to deeply nested relational data, under workloads of 50, 200, and 500 concurrent users. The results indicate that REST consistently delivers lower latency and higher throughput across all test scenarios, demonstrating superior scalability under high concurrency. While both architectures perform similarly for simple queries, GraphQL performance degrades more substantially as query complexity increases due to the additional server-side overhead associated with query parsing and resolver execution. However, GraphQL offers advantages when retrieving deeply nested relational data, where equivalent functionality in REST may require multiple client requests.  The findings suggest that REST is better suited for high-volume, performance-critical systems, whereas GraphQL is more appropriate for applications requiring flexible and efficient retrieval of complex, interconnected data.

Place, publisher, year, edition, pages
2026. , p. 45
Keywords [en]
REST APIs, GraphQL, API Performance, Latency, Throughput, Query Complexity
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:lnu:diva-149324OAI: oai:DiVA.org:lnu-149324DiVA, id: diva2:2096450
Subject / course
Computer Science
Educational program
Web Development Programme, 180 credits
Supervisors
Examiners
Available from: 2026-08-29 Created: 2026-08-28 Last updated: 2026-08-29Bibliographically approved

Open Access in DiVA

fulltext(2350 kB)12 downloads
File information
File name FULLTEXT01.pdfFile size 2350 kBChecksum SHA-512
903ab3087347446196b1c746b8069b791d2276dacd43575385152b892c819c0d720bb7b2b89dd058f516d4a113b72ed5aefbe3c45db62c4d04870db6f2fe8a58
Type fulltextMimetype application/pdf

By organisation
Department of computer science and media technology
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 63 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf