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.