Abstract
Serverless functions introduce a new way of running cloud-native systems suggesting a reduction in operational costs and delegating scalability to the cloud providers. However, while several companies are adopting serverless functions, it is still unclear if they have a competitive advantage compared to services deployed on docker containers. To compare the performance and the costs of serverless functions and microservices, we introduce a case study comparing microservice-based and serverless-based applications. We compare their performance and cost when each of its services is deployed in a docker container running on AWS EC2 or as a serverless function in AWS Lambda. Our study shows that the serverless functions performed better over time compared to the microservice version after initially having a slower response time. The microservice performance got worse over time, implying that the serverless functions are better suited for larger volumes of internet traffic. Results also indicated that the serverless functions are cheaper to operate than the microservices when the number of monthly requests is limited.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Adzic, G., Chatley, R.: Serverless computing: economic and architectural impact. In: Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, pp. 884–889 (2017)
Al-Debagy, O., Martinek, P.: A comparative review of microservices and monolithic architectures. In: 2018 IEEE 18th International Symposium on Computational Intelligence and Informatics (CINTI), pp. 000149–000154. IEEE (2018)
Aslanpour, M.S., et al.: Serverless edge computing: vision and challenges. In: 2021 Australasian Computer Science Week Multiconference, pp. 1–10 (2021)
Auer, F., Lenarduzzi, V., Felderer, M., Taibi, D.: From monolithic systems to microservices: an assessment framework. Inf. Softw. Technol. 137, 106600 (2021)
Bermbach, D., Karakaya, A.S., Buchholz, S.: Using application knowledge to reduce cold starts in faas services. In: Proceedings of the 35th Annual ACM Symposium on Applied Computing, pp. 134–143 (2020)
Blinowski, G., Ojdowska, A., Przybyłek, A.: Monolithic vs. microservice architecture: a performance and scalability evaluation. IEEE Access 10, 20357–20374 (2022)
Bushong, V., Das, D., Cernỳ, T.: Reconstructing the holistic architecture of microservice systems using static analysis. In: CLOSER, pp. 149–157 (2022)
Cerny, T., Abdelfattah, A.S., Bushong, V., Al Maruf, A., Taibi, D.: Microservice architecture reconstruction and visualization techniques: a review. In: 2022 IEEE International Conference on Service-Oriented System Engineering (SOSE), pp. 39–48. IEEE (2022)
Cerny, T., Abdelfattah, A.S., Bushong, V., Al Maruf, A., Taibi, D.: Microvision: static analysis-based approach to visualizing microservices in augmented reality. In: 2022 IEEE International Conference on Service-Oriented System Engineering (SOSE), pp. 49–58. IEEE (2022)
De Camargo, A., Salvadori, I., Mello, R.D.S., Siqueira, F.: An architecture to automate performance tests on microservices. In: Proceedings of the 18th International Conference on Information Integration and Web-based Applications and Services, pp. 422–429 (2016)
Eismann, S., et al.: A case study on the stability of performance tests for serverless applications. J. Syst. Softw. 189, 111294 (2022)
Eismann, S., Grohmann, J., Van Eyk, E., Herbst, N., Kounev, S.: Predicting the costs of serverless workflows. In: Proceedings of the ACM/SPEC International Conference on Performance Engineering, pp. 265–276 (2020)
El Ioini, N., Hästbacka, D., Pahl, C., Taibi, D.: Platforms for serverless at the edge: a review. In: Zirpins, C., et al. (eds.) ESOCC 2020. CCIS, vol. 1360, pp. 29–40. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-71906-7_3
Fan, C.F., Jindal, A., Gerndt, M.: Microservices vs serverless: a performance comparison on a cloud-native web application. In: CLOSER, pp. 204–215 (2020)
Gos, K., Zabierowski, W.: The comparison of microservice and monolithic architecture. In: 2020 IEEE XVIth International Conference on the Perspective Technologies and Methods in MEMS Design (MEMSTECH), pp. 150–153. IEEE (2020)
Heinrich, R., et al.: Performance engineering for microservices: research challenges and directions. In: Proceedings of the 8th ACM/SPEC on International Conference on Performance Engineering Companion, pp. 223–226 (2017)
Jindal, A., Podolskiy, V., Gerndt, M.: Performance modeling for cloud microservice applications. In: Proceedings of the 2019 ACM/SPEC International Conference on Performance Engineering, pp. 25–32 (2019)
Lee, H., Satyam, K., Fox, G.: Evaluation of production serverless computing environments. In: 2018 IEEE 11th International Conference on Cloud Computing (CLOUD), pp. 442–450. IEEE (2018)
Lenarduzzi, V., Daly, J., Martini, A., Panichella, S., Tamburri, D.A.: Toward a technical debt conceptualization for serverless computing. IEEE Softw. 38(1), 40–47 (2021). https://doi.org/10.1109/MS.2020.3030786
Lenarduzzi, V., Lomio, F., Saarimäki, N., Taibi, D.: Does migrating a monolithic system to microservices decrease the technical debt? J. Syst. Softw. 169, 110710 (2020)
Lenarduzzi, V., Panichella, A.: Serverless testing: tool vendors’ and experts’ points of view. IEEE Softw. 38(1), 54–60 (2021). https://doi.org/10.1109/MS.2020.3030803
Lloyd, W., Ramesh, S., Chinthalapati, S., Ly, L., Pallickara, S.: Serverless computing: an investigation of factors influencing microservice performance. In: 2018 IEEE international conference on cloud engineering (IC2E), pp. 159–169. IEEE (2018)
Mahmoudi, N., Khazaei, H.: Performance modeling of serverless computing platforms. IEEE Trans. Cloud Comput. 10(4), 2834–2847 (2020)
McGrath, G., Brenner, P.R.: Serverless computing: design, implementation, and performance. In: 2017 IEEE 37th International Conference on Distributed Computing Systems Workshops (ICDCSW), pp. 405–410. IEEE (2017)
Nupponen, J., Taibi, D.: Serverless: what it is, what to do and what not to do. In: 2020 IEEE International Conference on Software Architecture Companion (ICSA-C), pp. 49–50. IEEE (2020)
Taibi, D., El Ioini, N., Pahl, C., Niederkofler, J.R.S.: Patterns for serverless functions (function-as-a-service): a multivocal literature review (2020)
Taibi, D., Lenarduzzi, V., Pahl, C.: Architectural patterns for microservices: a systematic mapping study. In: CLOSER 2018: Proceedings of the 8th International Conference on Cloud Computing and Services Science; Funchal, Madeira, Portugal, 19–21 March 2018. SciTePress (2018)
Taibi, D., Lenarduzzi, V., Pahl, C.: Microservices anti-patterns: a taxonomy. Microserv. Sci. Eng. 111–128 (2020)
Taibi, D., Spillner, J., Wawruch, K.: Serverless computing-where are we now, and where are we heading? IEEE Softw. 38(1), 25–31 (2020)
Taibi, D., Systä, K.: From monolithic systems to microservices: a decomposition framework based on process mining (2019)
Vahidinia, P., Farahani, B., Aliee, F.S.: Cold start in serverless computing: current trends and mitigation strategies. In: 2020 International Conference on Omni-layer Intelligent Systems (COINS), pp. 1–7. IEEE (2020)
Wohlin, C., Runeson, P., Hst, M., Ohlsson, M.C., Regnell, B., Wessln, A.: Experimentation in Software Engineering. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-29044-2
Yu, T., et al.: Characterizing serverless platforms with serverlessbench. In: Proceedings of the 11th ACM Symposium on Cloud Computing, pp. 30–44 (2020)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Allen, C., Li, X., Abdelfattah, A.S., Cerny, T., Taibi, D. (2024). Comparing Cost and Performance of Microservices and Serverless in AWS: EC2 vs Lambda. In: Han, H., Baker, E. (eds) Next Generation Data Science. SDSC 2023. Communications in Computer and Information Science, vol 2113. Springer, Cham. https://doi.org/10.1007/978-3-031-61816-1_5
Download citation
DOI: https://doi.org/10.1007/978-3-031-61816-1_5
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-61815-4
Online ISBN: 978-3-031-61816-1
eBook Packages: Computer ScienceComputer Science (R0)