Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

A Comparative Evaluation of Java HTTP Clients for Efficient Backend Service Communication

Stjärnquist, Erik LU and Ljungerud, Liam LU (2026) EITL05 20261
Department of Electrical and Information Technology
Abstract
HTTP clients are used to gather data from servers over a network. Several different usage scenarios for HTTP clients exist. This thesis focused on and investigated the usage of three different HTTP clients in a Spring Boot system from the perspective of implementation and performance. This system was a mock-up made by IKEA to mimic their real live Spring Boot system. The research focused on comparing the existing HTTP clients used within the backend-focused IKEA team where the study was conducted, based on Java’s built-in client and RestTemplate, with Spring’s reactive and asynchronous WebClient. The areas compared were implementation differences and performance consisting of different metrics. For the performance testing two methods were... (More)
HTTP clients are used to gather data from servers over a network. Several different usage scenarios for HTTP clients exist. This thesis focused on and investigated the usage of three different HTTP clients in a Spring Boot system from the perspective of implementation and performance. This system was a mock-up made by IKEA to mimic their real live Spring Boot system. The research focused on comparing the existing HTTP clients used within the backend-focused IKEA team where the study was conducted, based on Java’s built-in client and RestTemplate, with Spring’s reactive and asynchronous WebClient. The areas compared were implementation differences and performance consisting of different metrics. For the performance testing two methods were used, local tests with a mock API server and K6 tests. These tests were constructed to mimic real world scenarios and gather the relevant metrics. Further, the local tests were based on SpringBootTest with threads representing users and internal loops to mimic concurrency. Moreover, the K6 tests are configured to use the Spring Boots system’s controller to imitate a more real scenario. Following testing results showed implementation could be made shorter and easier since several manually coded methods were integrated in WebClient. However, this could be done easily only if reactive programming was understood prior. Performance was shown to be significantly better for the reactive WebClient in several regards such as response time and throughput if the entire chain for the HTTP responses were changed to be reactive. Otherwise, the Spring Boots systems blocking parts hindered performance. (Less)
Abstract (Swedish)
HTTP-klienter används för att hämta data från servrar över ett nätverk. Det existerar flera olika användningsscenarier för dessa klienter. Detta examensarbete fokuserar på och undersöker användningen av tre olika HTTP-klienter i ett Spring Boot-system ur ett implementerings- och prestandaperspektiv. Systemet som användes var en mock-up skapad av IKEA för att efterlikna deras faktiska produktionssystem i Spring Boot. Studien fokuserade på att jämföra IKEAs befintliga HTTP-klienter baserade på Javas inbyggda klient och RestTemplate med den reaktiva och asynkrona WebClient från Spring. De områden som jämfördes var implementeringsskillnader samt prestanda baserat på olika mätvärden. För prestandatesterna användes två metoder: lokala tester med... (More)
HTTP-klienter används för att hämta data från servrar över ett nätverk. Det existerar flera olika användningsscenarier för dessa klienter. Detta examensarbete fokuserar på och undersöker användningen av tre olika HTTP-klienter i ett Spring Boot-system ur ett implementerings- och prestandaperspektiv. Systemet som användes var en mock-up skapad av IKEA för att efterlikna deras faktiska produktionssystem i Spring Boot. Studien fokuserade på att jämföra IKEAs befintliga HTTP-klienter baserade på Javas inbyggda klient och RestTemplate med den reaktiva och asynkrona WebClient från Spring. De områden som jämfördes var implementeringsskillnader samt prestanda baserat på olika mätvärden. För prestandatesterna användes två metoder: lokala tester med en mockad API-server och K6-tester. Dessa tester utformades för att efterlikna verkliga scenarier och samla in relevanta mätvärden. Vidare baserades de lokala testerna på SpringBootTest, där trådar representerade användare och interna loopar användes för att simulera samtidighet (concurrency). K6-testerna konfigurerades för att använda Spring Boot-systemets controller för att imitera ett mer realistiskt scenario. Resultaten från testerna visade att implementeringen kunde göras kortare och enklare, då flera manuellt kodade metoder finns integrerade i WebClient. Detta var dock endast enkelt under förutsättning att det fanns en tidigare förståelse för reaktiv programmering. Prestandan visade sig vara avsevärt bättre för den reaktiva WebClient i flera avseenden, såsom svarstid och genomströmning (throughput), förutsatt att hela kedjan för HTTP-svar gjordes reaktiv. I annat fall utgjorde de blockerande delarna i Spring Boot-systemet ett hinder för prestandan. (Less)
Please use this url to cite or link to this publication:
author
Stjärnquist, Erik LU and Ljungerud, Liam LU
supervisor
organization
alternative title
En jämförande utvärdering av Java HTTP-klienter för effektiv kommunikation mellan backend-tjänster
course
EITL05 20261
year
type
M2 - Bachelor Degree
subject
keywords
HTTP, HTTP client, Spring, Spring Boot, RestTemplate, WebClient, Reactive
report number
LU/LTH-EIT 2026-1139
language
English
id
9234313
date added to LUP
2026-06-11 11:24:31
date last changed
2026-06-11 11:24:31
@misc{9234313,
  abstract     = {{HTTP clients are used to gather data from servers over a network. Several different usage scenarios for HTTP clients exist. This thesis focused on and investigated the usage of three different HTTP clients in a Spring Boot system from the perspective of implementation and performance. This system was a mock-up made by IKEA to mimic their real live Spring Boot system. The research focused on comparing the existing HTTP clients used within the backend-focused IKEA team where the study was conducted, based on Java’s built-in client and RestTemplate, with Spring’s reactive and asynchronous WebClient. The areas compared were implementation differences and performance consisting of different metrics. For the performance testing two methods were used, local tests with a mock API server and K6 tests. These tests were constructed to mimic real world scenarios and gather the relevant metrics. Further, the local tests were based on SpringBootTest with threads representing users and internal loops to mimic concurrency. Moreover, the K6 tests are configured to use the Spring Boots system’s controller to imitate a more real scenario. Following testing results showed implementation could be made shorter and easier since several manually coded methods were integrated in WebClient. However, this could be done easily only if reactive programming was understood prior. Performance was shown to be significantly better for the reactive WebClient in several regards such as response time and throughput if the entire chain for the HTTP responses were changed to be reactive. Otherwise, the Spring Boots systems blocking parts hindered performance.}},
  author       = {{Stjärnquist, Erik and Ljungerud, Liam}},
  language     = {{eng}},
  note         = {{Student Paper}},
  title        = {{A Comparative Evaluation of Java HTTP Clients for Efficient Backend Service Communication}},
  year         = {{2026}},
}