WavebreakmediaMicro - Fotolia

Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Evaluate if serverless cost benefits are worth the upfront price

Before an IT shop adopts serverless, it must fully grasp how the technology operates, and prepare for the upfront -- and potentially costly -- app refactoring efforts it requires.

With any emerging technology comes misconceptions and market hype -- and serverless computing is no exception.

While serverless adoption will rise in 2020, enterprises need to first understand how the technology actually works, as well as set realistic expectations about its benefits and drawbacks, particularly around serverless costs.

What is serverless?

Serverless computing is a technology that abstracts code from hardware. It enables an organization to run application code without having to maintain any underlying hardware or software stacks. Serverless platforms eliminate the need for IT admins to allocate resources, such as RAM or CPU, to applications; the infrastructure takes care of it transparently. Most serverless deployments today occur in the cloud, using a service such as AWS Lambda, Google Cloud Functions or Azure Functions.

The relatively hands-off approach associated with serverless computing means IT and development teams no longer need to worry about infrastructure management tasks -- instead, they can focus on code composition. For example, serverless platforms eliminate the need to scale resources manually, based on workload demand. This can be particularly helpful for web applications that experience unpredictable traffic spikes; traditionally, admins might overprovision resources, and incur additional costs as a result, to prepare for those peaks in demand. With serverless, this isn't necessary, as the platform will automatically scale resources up and down, as required.

Serverless platform use cases

A certain event triggers serverless code to run, at which point it performs its necessary work and then stops. Serverless computing revolves around the fact that most companies' servers are only active for a small percentage of time. Consequently, to increase efficiency, those servers could be replaced with resources that run only when required to complete a certain task.

To support a serverless system, an organization does require some infrastructure to maintain data that needs to persist beyond the life of a serverless code run. This could include a database server to commit the results of a code run into a database before it dies, or a file system that holds digital assets such as website images.

Serverless cost benefits -- and drawbacks

The cost of serverless computing is one area, in particular, where there is a lot of hype, but little clarity. And while serverless platforms in the cloud can be cost-effective in the long run, for many companies they sometimes require code refactoring -- a considerable and potentially costly upfront effort.

Serverless costs, unlike those associated with traditional cloud VMs, are dynamic in nature. They accrue on a sub-second basis for the duration of code execution. Serverless computing requires a type of micro-container that spins up in milliseconds to containerize the runtime code. These containers spin up and then shut down once the required task is complete, and the serverless provider bills users for the exact duration of that period.

In contrast, cloud providers charge for traditional cloud VMs on either a per-second, per-minute or per-hour basis -- depending on the VM type -- and users pay for those VMs even when they sit idle. This can lead to higher monthly bills than a serverless platform.

That said, developers often have to refactor application code to take advantage of serverless computing. Serverless apps, for example, are typically sets of smaller, independent components, or functions, rather than monoliths. In addition, serverless platforms support specific programming languages, which can, again, require refactoring existing and mature application code. Serverless application code must also be designed in such a way that developers can publish and consume it through API calls. Application rewrites are neither quick nor cheap; retooling can be costly, and organizations can incur technical debt as they strive to ensure loosely coupled code routines work flawlessly.

Startup companies have a noticeable advantage in using serverless computing, as there is no need to refactor an existing code base. Instead, they can build code from the ground up to work on serverless platforms.

The outlook for serverless

There has been an initial delay in understanding the benefits of serverless computing and in learning how to adapt to the required code dynamic. In 2020, more companies will evaluate serverless platforms and begin the migration process -- though, large enterprises, especially, will remain cautious and reserved about the uptake of new technologies in a wholesale way.

Serverless won't be for everyone. It is designed for massive agility and dynamic scaling. Effective use of serverless computing requires a true understanding of how the technology works, along with a willingness to take on some financial technical debt in early adoption.

Dig Deeper on Application Infrastructure Planning and Management

Join the conversation

2 comments

Send me notifications when other members comment.

Please create a username to comment.

How do you manage serverless costs?
Cancel
Scaling is good, but my concern with serverless is performance too, if you think about function execution time in micro- ms!, why, If we imagine what happens in background when event source triggers events (1) accepting the event, (2) finding available compute resource( micro container), (3) spinning up that compute resource & allocate resources to it  & (4) then handle the event. 
What do you think above 4 task, how much time it may take (5-10 ms), You know AWS lambda with python/node 'Hello World' take total execution time of 19 ms, of which I am not convinced. Ideally it should be take just 1-5 ms for Hello world.

Do you agree, Architects should also think about performance factor as well if that matters for them. 
Regards Matloob
Cancel

-ADS BY GOOGLE

SearchSoftwareQuality

SearchAppArchitecture

SearchCloudComputing

SearchAWS

TheServerSide.com

SearchDataCenter

SearchServerVirtualization

Close