Energy Efficiency of REST, GraphQL, and gRPC API Architectures: A Comparative Empirical Study

dc.contributor.authorManzoor, Humza
dc.contributor.departmentfi=Tietotekniikan laitos|en=Department of Computing|
dc.contributor.facultyfi=Teknillinen tiedekunta|en=Faculty of Technology|
dc.contributor.studysubjectfi=Tietotekniikka|en=Information and Communication Technology|
dc.date.accessioned2026-07-01T19:31:51Z
dc.date.issued2026-06-23
dc.description.abstractGrowing digital infrastructure energy demands have made energy-aware software design a key concern in sustainable software engineering. Application Programming Interfaces (APIs) serve as the communication backbone of modern distributed systems, yet their energy implications remain insufficiently studied. This thesis presents a controlled empirical study comparing the energy consumption of six .NET 8 API implementations across three architectural paradigms- REST, GraphQL, and gRPC- using hardware-based power measurement through the PowerGoblin framework. The study is structured around four research questions. The baseline comparison evaluates all six implementations under identical conditions, finding that architectural energy differences are small at small payload sizes, with backend CPU energy ranging from 5.995 J to 7.338 J per 100-request run across all implementations. Among the three implementations selected for further study, GraphQL.GraphQLNet is the most energy-efficient across all three measured metrics (frontend, backend, and network energy) at this baseline payload, while Rest.Controllers is the least efficient. The payload scaling experiment investigates how energy consumption changes across six payload levels from 10 to 320 posts and comments, finding that this baseline ordering inverts completely by a payload of 40 posts and comments: Grpc.AspNetCore becomes the most energy-efficient implementation across all three metrics, while GraphQL.GraphQLNet becomes the least efficient due to its resolver-based execution model. At the maximum payload level, GraphQL.GraphQLNet’s backend CPU energy is approximately 84% higher than Grpc.AspNetCore’s and approximately 53% higher than Rest.Controllers’. The concurrency experiment examines energy consumption across eleven concurrency levels from 5 to 4000 virtual users, finding that all three architectures perform comparably up to 30 concurrent users but that gRPC shows a clear energy advantage at extreme concurrency levels. An additional empirical experiment measures energy consumption across three multi-hop network topologies, finding that an additional wired switch hop adds approximately 0.75 J while an additional wireless bridge hop adds approximately 8 J, roughly ten times more, refining the additive per-hop energy model proposed in prior network-level energy research. These findings show that API architectural energy differences are workload dependent, becoming significant only under high payload or concurrency, and offer data-driven guidance for energy-aware API design.
dc.format.extent141
dc.identifier.urihttps://www.utupub.fi/handle/11111/62635
dc.identifier.urnURN:NBN:fi-fe20260701107990
dc.language.isoeng
dc.rightsfi=Julkaisu on tekijänoikeussäännösten alainen. Teosta voi lukea ja tulostaa henkilökohtaista käyttöä varten. Käyttö kaupallisiin tarkoituksiin on kielletty.|en=This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.|
dc.rights.accessrightsavoin
dc.subjectenergy efficiency
dc.subjectREST
dc.subjectGraphQL
dc.subjectgRPC
dc.subjectAPI architecture
dc.subjectsustainable
dc.subjectsoftware engineering
dc.subjectgreen ICT
dc.subjectempirical study
dc.titleEnergy Efficiency of REST, GraphQL, and gRPC API Architectures: A Comparative Empirical Study
dc.type.ontasotfi=Diplomityö|en=Master's thesis|

Tiedostot

Näytetään 1 - 1 / 1
Ladataan...
Name:
Manzoor_Humza_Thesis.pdf
Size:
2.4 MB
Format:
Adobe Portable Document Format