Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to main content

Comparing Cost and Performance of Microservices and Serverless in AWS: EC2 vs Lambda

  • Conference paper
  • First Online:
Next Generation Data Science (SDSC 2023)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/happy-bhesdadiya/microservices-demo.

  2. 2.

    https://aws.amazon.com/savingsplans/compute-pricing.

  3. 3.

    https://aws.amazon.com/blogs/compute/operating-lambda-performance-optimization-part-1.

References

  1. 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)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. Aslanpour, M.S., et al.: Serverless edge computing: vision and challenges. In: 2021 Australasian Computer Science Week Multiconference, pp. 1–10 (2021)

    Google Scholar 

  4. Auer, F., Lenarduzzi, V., Felderer, M., Taibi, D.: From monolithic systems to microservices: an assessment framework. Inf. Softw. Technol. 137, 106600 (2021)

    Article  Google Scholar 

  5. 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)

    Google Scholar 

  6. Blinowski, G., Ojdowska, A., Przybyłek, A.: Monolithic vs. microservice architecture: a performance and scalability evaluation. IEEE Access 10, 20357–20374 (2022)

    Article  Google Scholar 

  7. Bushong, V., Das, D., Cernỳ, T.: Reconstructing the holistic architecture of microservice systems using static analysis. In: CLOSER, pp. 149–157 (2022)

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. Eismann, S., et al.: A case study on the stability of performance tests for serverless applications. J. Syst. Softw. 189, 111294 (2022)

    Article  Google Scholar 

  12. 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)

    Google Scholar 

  13. 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

    Chapter  Google Scholar 

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. 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)

    Google Scholar 

  17. 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)

    Google Scholar 

  18. 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)

    Google Scholar 

  19. 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

    Article  Google Scholar 

  20. 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)

    Article  Google Scholar 

  21. 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

    Article  Google Scholar 

  22. 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)

    Google Scholar 

  23. Mahmoudi, N., Khazaei, H.: Performance modeling of serverless computing platforms. IEEE Trans. Cloud Comput. 10(4), 2834–2847 (2020)

    Article  Google Scholar 

  24. 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)

    Google Scholar 

  25. 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)

    Google Scholar 

  26. Taibi, D., El Ioini, N., Pahl, C., Niederkofler, J.R.S.: Patterns for serverless functions (function-as-a-service): a multivocal literature review (2020)

    Google Scholar 

  27. 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)

    Google Scholar 

  28. Taibi, D., Lenarduzzi, V., Pahl, C.: Microservices anti-patterns: a taxonomy. Microserv. Sci. Eng. 111–128 (2020)

    Google Scholar 

  29. Taibi, D., Spillner, J., Wawruch, K.: Serverless computing-where are we now, and where are we heading? IEEE Softw. 38(1), 25–31 (2020)

    Article  Google Scholar 

  30. Taibi, D., Systä, K.: From monolithic systems to microservices: a decomposition framework based on process mining (2019)

    Google Scholar 

  31. 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)

    Google Scholar 

  32. 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

    Book  Google Scholar 

  33. Yu, T., et al.: Characterizing serverless platforms with serverlessbench. In: Proceedings of the 11th ACM Symposium on Cloud Computing, pp. 30–44 (2020)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tomas Cerny .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics