A performance comparison on REST-APIs in Express.js, Flask and ASP.NET Core

Detta är en Kandidat-uppsats från Mälardalens universitet/Akademin för innovation, design och teknik

Sammanfattning: APIs can have different architectures and standards, one of which is REST. REST stands for representational state transfer and is a commonly used architecture when implementing and creating APIs for the web. Choosing a web framework for a REST API implementation is not as trivial as one might think; there are many metrics to consider, one of which is performance. In this study, we compared the most used back-end web frameworks in 2021, ASP.NET Core, Express.js, and Flask, to see which performs best in throughput, response time, and computer resource usage. Finding the best-performing framework will help future developers choose which framework to use in terms of performance. Selecting a good framework from the beginning is essential to prevent the need to change framework in the future. To benchmark the different APIs, we did an experiment where we used JMeter, an open-source software for testing the performance of websites and APIs. By varying the number of virtual users and throughput, we were able to find the limit of each framework and their respective resource usage during different loads. We have concluded that ASP.NET Core had the best performance when it comes to response time and throughput. Furthermore, ASP.NET Core had the most efficient memory utilization throughout the entire experiment, and during loads higher than 4500 throughputs per second, it was also the most CPU efficient. Below 4500 throughput per second, Express.js was the most CPU-efficient framework but still had more memory usage than ASP.NET Core. According to our metrics, the performance of Flask was far behind Express.js and ASP.NET Core and should therefore not be considered a high-performance framework.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)