REST API performance comparison of web applications based on JavaScript programming frameworks


The aim of the work was to compare two technologies for creating server applications based on the JavaScript programming language. For the purposes of the research, two test applications were created. The first one was built on the basis of the Express programming framework and the second one on the basis of the Hapi framework. The client part of both applications was prepared using the React library. The client and server parts communicated with each other by means of REST API – the universal HTTP interface. The client application sent requests to the server application which then performed basic operations on the MongoDB basis and returned the result. As part of the work, an experiment consisting of four scenarios was developed. In each scenario, a different type of data was taken into consideration: a string of characters, an array, an object and an array of objects. The research focused on the efficiency aspect – measuring the response time of requests during GET, POST, PUT and DELETE operations. The tests were performed on two computers and the measurements were made in two ways: using a single code embedded in test applications and using the Postman tool. The obtained results, after averaging and analyzing them allowed for the conclusion that the Express framework proved to be more efficient than Hapi due to the shorter response time of requests. Only in the scenario where operations with large datasets were performed was the response time of requests at a similar level.


Express; Hapi; performance analysis; response time of requests

M. Pilar Salas-Zarate, G. Alor-Hernandez, R. Valencia-Garcia, L. Rodriguez-Mazahua, A. Rodriguez-Gonzalez, J. L. Lopez Cuadro, Analyzing best practices on Web development frameworks: The lift approach, Science of Computer Programming, Science of Computer Programming, 102, 1-19, 2015,, [16.03.2021].

Mozilla Developer Network, Wprowadzenie do Express/Node,, [16.03.2021].

Offshore Web Developer, Hapi vs Express: Which NodeJS Frameworks is the Better?,, [16.03.2021].,, [27.03.2021].,, [27.03.2021].

Stateofjs,, [27.03.2021].

RapidAPI Blog, The Best NodeJS Frameworks for 2021,, [25.03.2021].

Frameworks built on Express,,, [25.03.2021].

S. Martin, Top 10 Node.js Frameworks For Web App Development in 2021,, [25.03.2021].

Npm trends,, [27.03.2021].

D. Swerski, Hapi vs. Express in 2019: Node.js framework comparison,, [26.10.2020].

Raygun, Node.js performance vs Hapi, Express, Restify, Koa & More,, [26.10.2020].

B. Miłosierny, M. Dzieńkowski, The comparative analysis of web application frameworks in the Node.js ecosystem, Journal of Computer Science Institute, 18, 42-48, 2021,, [30.03.2021].

J. Brett, Getting Started with hapi.js, Packt Publishing, 2016.

E. M. Hahn, Express in action. Writing, building, and testing Node.js applications, Manning Publications Co., 2016.

M. Massé, REST API Design Rulebook, O’Reilly, 2012.

Postman,, [27.03.2021].


Published : 2021-06-30

Grudniak, M., & Dzieńkowski, M. (2021). REST API performance comparison of web applications based on JavaScript programming frameworks. Journal of Computer Sciences Institute, 19, 121-125.

Marcin Grudniak
Lublin University of Technlogy  Poland
Mariusz Dzieńkowski 
Lublin University of Technology