Serverless Applications: Why, When, and How?
Simon Eismann, Joel Scheuner, Erwin van Eyk, Maximilian Schwinger, Johannes Grohmann, Cristina L. Abad, Alexandru Iosup
cc (cid:13) IEEE Software , https://doi.org/10.1109/MS.2020.3023302
Serverless Applications:Why, When, and How?
Simon Eismann
Julius-Maximilian University
Joel Scheuner
Chalmers | University of Gothenburg
Erwin van Eyk
Vrije Universiteit
Maximilian Schwinger
German Aerospace Center
Johannes Grohmann
Julius-Maximilian University
Nikolas Herbst
Julius-Maximilian University
Cristina L. Abad
Escuela Superior Politecnica del Litoral
Alexandru Iosup
Vrije Universiteit
Abstract —Serverless computing shows good promise for efficiency and ease-of-use. Yet, thereare only a few, scattered and sometimes conflicting reports on questions such as
Why do so manycompanies adopt serverless? , When are serverless applications well suited? , and
How are serverless applicationscurrently implemented?
To address these questions, we analyze 89 serverless applications fromopen-source projects, industrial sources, academic literature, and scientific computing—themost extensive study to date. E ASE - OF - USE AND EFFICIENCY are twoof the most desirable properties of software ser-vices. Ease-of-use entices more people to try theservices and allows more to continue using them.Efficiency allows increased and longer operationof the service and, as the scale of softwareservices has already reached a significant frac-tion of the world’s energy consumption, keeps these services sustainable. But ease-of-use andefficiency have been historically at odds with eachother: The easier the software is to use, the fewerhints it can provide to the platform on whichit runs, leaving it to solve complex problemsof resource (in particular, of server) manage-ment. Although not a universal remedy, serverlesscomputing aims to provide both ease-of-use and
IEEE Software
Author’s version of the accepted manuscript c (cid:13) a r X i v : . [ c s . S E ] S e p obile Client API Gateway Lambda Simple Notification ServicePost StatusUpdate TriggerExecution P ub li s h M e ss age PushNotifications Mobile UsersDynamoDB Q u e r y F r i e n d s Figure 1. [SIDEBAR, page 3] Example serverless application: mobile backend for a social media app.
Inthis example application, a social media user wants to publish a status update, which should be seen by all theuser’s friends. In 2019, this happened over a billion times a day on social media platforms such as Facebook,Twitter, and Instagram. Technology-wise, this would happen through a four-step process: (1) the user wouldcompose the status update using the mobile clients of the social media platform, then (2) the user wouldsend the status update using the mobile client, (3) the platform would orchestrate the operations needed topropagate the update inside the social media platform and to the user’s friends, (4) each friend would receivethe update on their social media clients, for example, on their mobile phones. Step 3 is the “secret sauce” ofthe social media platform – although the users and their friends never see it, the software, and the resources(the servers ) on which the software run, ensure the technical sustainability of the social media platform.With conventional technology , for step 3 the platform operators would need not only to develop the logicof routing the status update to each of the user’s friends, but also to carefully manage the resources (theservers) on which the logic (the software ) can run and to make sure the logic runs correctly. Resourcemanagement, and in particular resource provisioning and allocation, is a long-lasting hard problem incomputing. Obstacles such as scaling the resources proportionally to the number of users (and their friends)are exacerbated by the fine-grained nature of each operation. Running the logic is also challenging, whensubject to strict performance requirements—after all, the user expects all their friends to see the status updateimmediately, and to reply to it in a matter of seconds.With serverless technology , the cloud provider abstracts away the server management, provisioning servers withfine granularity, on demand, and with a pay-per-use model. To benefit from this, the serverless software getstransformed. Simplified, the process of posting updates proceeds as follows. The users post status updatesusing their mobile clients as a HTTP request to the API Gateway (which operates as serverless request routing ,that is, a specialized function that only routes requests and runs very efficiently without further developerintervention). Step 3 proceeds: the API Gateway triggers a lambda function ( serverless compute ), which queriesthe user’s friends from a DynamoDB table ( serverless storage ) and publishes the status update to friends usingthe Simple Notification Service (SNS) ( serverless publish/subscribe ). Finally, SNS generates push notificationswith the status update for the user’s friends. Tens of other serverless functions get invoked, to authenticate theuser, to authorize posting messages, to copy data between various locations, etc. All of these are orchestratedon resources managed by the cloud operator. The serverless functions are fine grained, which leads to higherscalability than the coarser conventional approaches, but at the cost of more complex orchestration. For furtherexamples of serverless applications, we refer to our technical report [7]. efficiency for common software services that runon cloud resources. We investigate in this articlewhy?, when?, and how are serverless applicationsuseful?Serverless computing is any computing plat-form that hides server usage from developers and runs code on-demand automatically scaledand billed only for the time the code is run-ning [2]. Sidebar 1 exemplifies how server-less can be used to implement the mobilebackend for a social media app. More gener-ally, serverless applications combine managed IEEE Software tateless ephemeral compute solutions such asAWS Lambda, Azure Functions, or GoogleCloud Functions (Function-as-a-Service, FaaS),and fully provider-managed services for messag-ing, file storage, databases, streaming, or authen-tication (Backend-as-a-Service, BaaS). Serverlesscomputing is increasingly adopted by indus-try [1], [6] and studied by academics [12], [10].One crucial reason is that serverless operationsempower developers to focus on implementingbusiness logic and letting the cloud providers han-dle all operational concerns, such as deployment,resource allocation, and autoscaling [2].However, only a few, and sometimes conflict-ing, reports address important questions such as
Why are practitioners choosing to build serverlessapplications? , When are serverless applicationswell suited? , or
How are serverless applicationsimplemented in practice? . For example, there arereports of significant cost savings by switching toserverless applications [4], [3], but also articlessuggesting higher cost in some scenarios com-pared to traditional hosting [8]. Having concreteinformation on these topics would be valuablefor managers to guide decisions on whether aserverless application can be a suitable solutionfor a specific use case. The SPEC-RG Cloudgroup suggests that surveys of real-world server-less computing are needed to understand archi-tectural, implementation, and deployment patternsemerging in the “serverless soup” [12]. Leitneret al. also discuss that empirical studies aboutserverless use are required to guide softwaredevelopers with building serverless solutions [6].Addressing the need for a comprehensive em-pirical study of serverless applications, we collecta total of 89 descriptions of existing serverlessapplications. We focus on diverse sources, e.g.,GitHub projects, blog posts, scientific publica-tions, or talks at industry conferences. We analyzeevery serverless application regarding 24 charac-teristics (see Sidebar 2 for a description of ourmethodology). Based on this data, we investi-gate why are practitioners choosing to adopt theserverless paradigm, when are serverless appli-cations used, and how are they implemented inpractice. The percentage values for the character-istics presented in the remainder of this articleexclude any serverless application for which wecould not determine the respective characteristic.
Why are practitioners choosing to adoptserverless?
Pioneers and journalists seem to agree on sev-eral potential benefits of serverless applications:reduced operation effort, faster development dueto the heavy use of Backend-as-a-Service, andnear-infinite scalability of serverless applications.Many also discuss significant cost savings fromswitching to serverless. However, not all thesebenefits hold in general. For example, cost sav-ings have come under scrutiny [8]. To understandwhy practitioners choose to adopt serverless, weinvestigate the descriptions and documentation ofapplications in our dataset.For 27 of the applications in our dataset, wecannot discern the motivation for going server-less. Of the remaining 62 applications, 47%choose serverless to save costs. Serverless holdsthe promise to save costs due to its pay-per-usemodel for irregular or bursty workloads, whichwould have low resource utilization and thushigher cost with traditional hosting options. Thisconcurs with our observation that 84% of theserverless applications have bursty workloads.Another reason for serverless adoption, whichapplies for 34% of the applications in our dataset,is that developers no longer need to bother withoperational concerns, such as deployment, scal-ing, or monitoring, and instead can focus on de-veloping new features. This was reported not onlyfor utility functionality, such as a CI/CD pipelineor malware detection, where traditionally serversneed to be maintained for only few and irregularexecutions. Interestingly, it was also reported foruser-facing APIs serving large-scale traffic, whereone would expect other concerns such as perfor-mance or availability to take priority.A third reason (also 34%) is the scalabilityof serverless applications. Although traditionalapplications can also be scalable, serverless ap-plications offer near-infinite, out-of-the-box scal-ability with minimal engineering effort. This isbecause the FaaS implementation commonly usedfor serverless computing is fine-grained and thusconveniently parallel.Based on our dataset, the most commonlyreported reasons for the adoption of serverlessare to save costs for irregular or bursty work-loads, to avoid operational concerns, and for built-in scalability. Other reasons, such as improved
September 2020 cientificComputing 2 Researchers24 Characteristics83 ServerlessApplications Review 1Review 2 89 AnalyzedServerless Applications6 ServerlessApplications ReviewDomain ExpertOpen-sourceProjectsAcademicLiteratureIndustrialLiterature Discussion andConsolidation322328 Figure 2. [SIDEBAR] Methodology for serverless application collection and characterization.
Wecollected descriptions of serverless application from four sources: open-source projects, academic literature,industrial literature, and scientific computing. Next, we randomly assigned two out of the seven total reviewersto review each serverless application based on a set of fixed characteristics. In the following discussion andconsolidation phase, we discussed and resolved any differences between the two resulting characteristicsreviews. For the scientific applications, a different approach was necessary, as many of them were not publiclyavailable yet. Therefore, these applications are reviewed by a single domain expert, which is either involvedin the development of the applications or in direct contact with the development team. If the information todetermine a characteristic for a serverless application was not available, we labeled the characteristic as”Unknown” for this application. The percentage of ”Unknowns” ranges from 0â ˘A ¸S19% with two outliers at 25%and 30% for the characteristics presented in this article. These ”Unknowns” were excluded for the percentagevalues presented in this article. For a more detailed breakdown of our results and a more in-depth descriptionof our methodology, we refer to our technical report [7]. performance and faster time-to-market, are lesscommon (19% and 13%, respectively).These findings are mostly in accordance witha recent community survey where over 160 par-ticipants [3] report that the positive impacts ofadopting a serverless architecture are the adoptionof an event-driven architecture (51%), cost ofresources (44%), speed of development (36%),flexibility of scaling (31%) and application per-formance (19%).
When are serverless applicationsused?
When starting a project, managers need to decidewhich technology stack is best suited. Currently,managers are faced with the difficult questionif serverless is well suited for a specific appli-cation. A common assumption is that serverlessapplications are best suited for utility functional-ity and less applicable for latency-critical, high- volume core functionality. For example, Netflixuses AWS Lambda for utility functionality, suchas video encoding, file backup, security audits ofEC2 instances, and monitoring. However, the corefunctionality such as the website/app backend orvideo delivery, is still running on traditional IaaScloud services [9].Contrary to this popular belief, we foundthat serverless applications are not limited toutility functionality. Our data indicates that manyserverless applications implement utility func-tionality (39%), but also that many serverlessapplications implement core functionality (42%)and scientific workloads (16%). This is consis-tent with our finding that a substantial numberof serverless applications (39%) experience hightraffic intensity, a high proportion complementedby on-demand applications experiencing a lowtraffic intensity (47%), and by scheduled appli-cations (17%). IEEE Software common argument against serverless appli-cations is that cold starts make them unsuitablefor applications with latency requirements. Tothe contrary, we find that serverless applicationsare used for latency critical tasks, despite thecold starts affecting tail latencies. Concretely,38% of the surveyed serverless applications haveno latency requirements. However, 32% of theserverless applications have latency requirementsfor all functionality, 28% have partial latencyrequirements, and 2% even have real-time re-quirements.Another argument is that current serverlessplatforms can be unsuited for long-running tasksor tasks with large data volumes [10]. Our datasetsupports this hypothesis as 69% of the surveyedserverless applications have a data volume of lessthan 10 MB, and 75% have an execution time inthe range of seconds. To overcome this limitation,the area needs further innovation.To summarize, serverless applications aremost commonly used for short-running tasks withlow data volume and bursty workload. However,contrary to popular belief, serverless applicationsare also widely used for latency-critical, high-volume core functionality. Overall, there are ex-amples of serverless applications across all appli-cation types, requirements, and workloads.
How are serverless applicationsimplemented in practice?
When implementing a serverless application,engineers face several technology and archi-tecture decisions, such as selecting the cloudplatform, serverless platform, programming lan-guage, Backend-as-a-Service options, and appro-priate granularity level for serverless functions.Based on our collection of serverless applications,we identify the most popular approaches to im-plementing serverless applications.Among the surveyed applications, AWS is byfar the most popular deployment platform chosenby 80% of the applications. The other cloudvendors are less represented, with Azure at 10%,IBM at 7%, and Google Cloud at 3%. We seetwo potential reasons for this vast lead: (a) AWSintroduced their FaaS platform (AWS Lambda)two years before the other cloud vendors, sotheir platform is likely to be the most mature,and (b) AWS has the largest market share of
Motivators
Save Costs
Built-in scalability
No operations
Application Type
Core functionality
Utility functionality
Scientific workload
Deployment Platform
AWS
Microsoft Azure Private Cloud
Programming Languages
JavaScript
Python
Java
Integrated BaaS Solutions
Storage
Database
Messaging
Figure 3. Key findings.
The results limited to the top3 values and a single application can have multiplevalues for motivators, programming languages, andintegrated backend-as-a-service solutions. For moredetailed results, we refer to our technical report [7]. general cloud computing [11], which gives it alarger existing user base that can move appli-cations to serverless. About 8% of the surveyedserverless applications run in private clouds; how-ever, these are mostly applications from academiaand scientific computing. The low adoption ofprivate clouds is in stark contrast to the largenumber of existing open-source Function-as-a-
September 2020 ervice frameworks [12]. Part of the appeal ofthe serverless application model is the automa-tion of operational concerns. We hypothesize thatthe increase in such concerns that comes withmaintaining a fleet of servers and an open-sourceFunction-as-a-Service framework is deterring theadoption of these frameworks. Additionally, mostserverless applications make use of managedservices (storage, databases, messaging, logging,streaming, etc.), which are not available directlyin a private cloud environment.Serverless platforms support popular pro-gramming languages. In our study, we were ableto determine the programming language for 67of the 89 serverless application. JavaScript (42%)and Python (42%) were by far the most popu-lar programming languages. Some applicationsare also written in Java (12%), C/C++ (11%),or C B ased on our analysis of 89 serverlessapplications, we find that the most commonlyreported reasons for the adoption of serverless areto save costs for irregular or bursty workloads,to avoid operational concerns, and for the built-in scalability. Serverless applications are mostcommonly used for short-running tasks with lowdata volume and bursty workloads but are alsofrequently used for latency-critical, high-volumecore functionality. Serverless applications aremostly implemented on AWS, in either Python orJavaScript, and make heavy use of BaaS. We seethis study as a step towards a community-widepolicy of sharing and discussion of serverlessapplications. Such a catalog of serverless appli-cations could stimulate a new wave of serverlessdesigns, facilitate meaningful tuning and perfor-mance benchmarking, and overall prove useful forboth industry and academia. REFERENCES
1. Research and Markets, “$7.72 Billion Function-as-a-Service Market 2017,” https://bwnews.pr/2VBDBgC, Feb IEEE Software
Communications ofthe ACM , vol. 62, no. 12, pp. 44–54, Nov. 2019.3. E. Levinson. “Serverless Community Survey 2020”,https://bit.ly/SerComSurvey, Feb 2020.4. G. Adzic, R. Chatley. “Serverless computing: economicand architectural impact”
Proceedings of the 11th JointMeeting on Foundations of Software Engineering , pp.884-â ˘A ¸S889, Sep 2017.5. LEGO Engineering, “Accelerating with Serverless!”,https://bit.ly/35bcps3, Apr 2020.6. P. Leitner, E. Wittern, and J. Spillner, “A mixed-methodempirical study of Function-as-a-Service software devel-opment in industrial practice”,
Journal of Systems andSoftware ., vol. 149, pp. 340–359, 2019.7. S. Eismann, J. Scheuner, E. van Eyk, M. Schwinger, J.Grohmann, N. Herbst, C. Abad, A. Iosup. “A Review ofServerless Use Cases and their Characteristics”,
SPECRG TechReport , https://bit.ly/36Ntvgy, May 2020.8. A. Eivy. “Be Wary of the Economics of Serverless CloudComputing.”
IEEE Cloud Computing vol. 4, no. 2, pp. 6–12, Apr 2017.9. J. Demian. “Serverless Case Study - Netflix”, https://bit.ly/3d4iEAZ, Jul 2018.10. J .Hellerstein, J. Faleiro, J. Gonzalez, J. Schleier-Smith,V. Sreekanti, A. Tumanov, C. Wu. “Serverless computing:One step forward, two steps back.”
Proceedings of the9th Biennial Conference on Innovative Data SystemsResearch (CIDR) , Jan 2019.11. Gartner. “Worldwide IaaS Public Cloud Services MarketGrew 31.3% in 2018”, https://bwnews.pr/2ZcI7o4, Jul2019.12. E. Van Eyk, G. Johannes, S. Eismann, A. Bauer, L.Versluis, L. Toader, N. Schmitt, N. Herbst, C. Abad,and A. Iosup, “The SPEC-RG Reference Architecture forFaaS: From Microservices and Containers to ServerlessPlatforms.”,
IEEE Internet Computing , Nov 2019.13. Nathan Malishev. “AWS Lambda Cold StartLanguage Comparisons, 2019 edition”, https://bit.ly/ColdStartComp, Sep 2019.14. I. Baldini, P. Cheng, S. Fink, N. Mitchell, V. Muthusamy,R. Rabbah, P. Suter, O. Tardieu. “The serverlesstrilemma: Function composition for serverless comput-ing.”
Proceedings of the 2017 ACM SIGPLAN Interna-tional Symposium on New Ideas, New Paradigms, andReflections on Programming and Software , pp. 89–103.Oct 2017.15. J. Spillner, C. Mateos, D. Monge. “Faaster, better,cheaper: The prospect of serverless scientific computing and HPC.”,
Latin American High Performance ComputingConference , pp. 154-168. Dec, 2017.
Simon Eismann is currently a PhD student atthe chair of software engineering at the Univer-sity of WÃijrzburg. He received the M.S. degreefrom the University of WÃijrzburg in 2017. His re-search interests include cloud computing, serverlessand performance analysis/modeling. Contact him [email protected].
Joel Scheuner is a PhD student at the joint di-vision of software engineering at Chalmers Univer-sity of Technology and the University of Gothen-burg. He received an M.S. in Software Systems fromthe University of Zurich in 2017. His research in-terests include cloud computing, performance engi-neering, and software engineering. Contact him [email protected].
Erwin van Eyk is a PhD student at Vrije Univer-siteit Amsterdam, the Netherlands, and the chair ofthe SPEC-RG Cloud Serverless activity. In 2019, hereceived an M.Sc. degree from TU Delft, the Nether-lands, for work on cloud computing and serverlessworkflows.
Maximilian Schwinger is a PhD student at thechair for software engineering at the University ofWÃijrzburg and received his Diploma in ComputerScience from the TU Munich in 2006. Since then heis working for the German Aerospace Center (DLR)as a Software and Systems Engineer. His researchinterest includes high performance computing, cloudbased computing, and scientific computing in thedomain of satellite based earth observation. Contacthim at [email protected].
Johannes Grohmann is currently a PhD studentat the chair of software engineering at the Universityof WÃijrzburg. He received the M.S. degree fromthe University of WÃijrzburg in 2016. His researchinterests include serverless and cloud computing, andperformance model learning and analysis. Contacthim at [email protected].
Nikolas Herbst is a research group leader at thechair of software engineering at the University ofWürzburg. He received a PhD from the University ofWürzburg in 2018 and serves as elected vice-chair ofthe SPEC Research Cloud Group. His research top-ics include predictive data analysis, elasticity in cloudcomputing, auto-scaling and resource management,performance evaluation of virtualized environments,
September 2020 utonomic and self-aware computing. Contact him [email protected]. Cristina L. Abad is associate professor at EscuelaSuperior Politecnica del Litoral, ESPOL, in Ecuador,where she leads the Distributed Systems ResearchLab (DiSEL). She obtained MS and PhD in CSdegrees from the University of Illinois at Urbana-Champaign, funded in part through Fulbright andComputer Science Excellence Fellowships. At ES-POL, she has received two Google Faculty ResearchAwards. Her main research interests lie at the inter-section of distributed systems and performance engi-neering. Contact her at cabad@fiec.espol.edu.ec.
Alexandru Iosup is full professor and UniversityResearch Chair at Vrije Universiteit Amsterdam, andmember of the Young Royal Academy of Arts andSciences of the Netherlands. He is the chair of theMassivizing Computer Systems research group at theVU and of the SPEC-RG Cloud group. His work in dis-tributed systems and ecosystems has received pres-tigious recognition, including the 2016 NetherlandsICT Researcher of the Year, the 2015 NetherlandsHigher-Education Teacher of the Year, and severalSPEC community awards SPECtacular (last in 2017).He can be contacted at [email protected] or @AIosup.8