The Lambda side: serverless computing

Pro
(Image: Stockfresh)

12 June 2017

Serverless computing, also known as function as a service, takes the ‘pay for what you use’ model of computing to what some people are calling its logical conclusion. Now you can upload code to the cloud and have it execute in a way that is scalable and cost effective, without needing to have any idea of how or what it is running on.

But where does this capability fit in the enterprise stack and what does it mean for developers and service providers?

Catching on
“Serverless computing is something that’s caught on quite recently, it’s been six months to a year or so and it’s quickly become a concept that companies are seeing value in,” said Sachin Sony, senior manager, field development and vertical marketing for Equinix.

Serverless computing is all about removing the heavy lifting around infrastructure as a service that you’d have to deal with in enterprise and let someone else take care of that for you, Sachin Sony, Cloud Strategy, Equinix

“It sits somewhere between infrastructure as a service (IaaS) and platform as a service (PaaS) as an offering. So, if I were to take an example, say you’re talking about infrastructure as a service; if you want to use Amazon Web Services or Microsoft Azure you need to log in, purchase computing power and storage and then you need to set them up.”

The user needs to set up a load balancer, apply security policies and do a whole bunch of other things before they can actually start using the platform. In contrast, with serverless computing many of those steps are taken away.

Instead, companies can just start using back-end infrastructure without having to concern themselves about what load balance to use or how to autoscale. It happens invisibly in the background.

Provision worry
“If you start developing bigger applications or multiple applications, you don’t have to worry about provisioning the back-end resources to support that activity. If I were to summarise it, I’d say serverless computing is all about removing the heavy lifting around infrastructure as a service that you’d have to deal with in enterprise and let someone else take care of that for you,” said Sony.

“All you have to do is just go in there and start writing code, building your applications and rolling them out.”

While there is a lot of cross over in terms of what can be done with serverless computing and platform as a service, the main differences is the ability to scale functionality.

More scalable
“Serverless or function as a service is more scalable compared to platform as a service, and the reason for that is down to the way it functions. Typically, in platform as a service, what happens is you request a server process, the server process begins to run and then as you build more applications or want to call out more server processes, it keeps adding or removing server processes,” said Sony.

It’s evolved from the days where in the data centre, as professionals, we had full production teams that were taking applications written by application developers and then standing up the infrastructure to support them. They had to worry about doing all the operations required to make that highly redundant, serviceable and to eliminate outages and make sure that application serviced the needs of its intended user base, Bill Hippenmeyer, Google

“The process is quite transparent. You can see the fact that you have one server process running and more server processes being added or removed. But from a customer’s perspective, someone working on the application development, they still need to actually monitor and ensure that they’re setting up new server processes.”

 

Serverless allows that step in the process to be eliminated. There is no need to start up a new server process every time it is needed. Instead, the user can start using the functionality and the server process starts up and shuts down when they stop using it automatically.

“So if you’re building code, instead of letting the server process run for X amount of time, here the server process automatically gets discontinued after a certain amount of time of non-usage.  So, that ensures that your costs are kept in check versus using something like platform as a service which is more cost-prohibitive,” said Sony.

Code focus
According to William Hippenmeyer, EMEA director of sales engineering for Google Cloud, stripped to its most essential basis, serverless computing is a means of allowing application developers to focus their attention on code and forget about the infrastructure upon which it runs.

“It enables them to continuously deploy code systems on top of infrastructure that automatically scales. It allows for security replication, disaster recovery and high availability, and the traditional operations that you encounter in trying to build a production environment are done through a platform as a service offering,” he said.

“It’s evolved from the days where in the data centre, as professionals, we had full production teams that were taking applications written by application developers and then standing up the infrastructure to support them. They had to worry about doing all the operations required to make that highly redundant, serviceable and to eliminate outages and make sure that application serviced the needs of its intended user base.”

Hippenmeyer said that there are a number of technologies that underpin serverless computing, including some very new ones, such as new capabilities around Docker and Kubernetes.

Base technologies
“For this, you can containerise applications and then deploy them and then the infrastructure that you deploy them in sits on top of a workload management infrastructure system like Kubernetes where you can dynamically upscale applications,” he said.

“Using things like Docker and Kubernetes to deploy applications is great. It means you can use the infrastructure to autoscale and automatically be able to leverage the power of those systems to not have to worry about their own capacity and performance requirements.”

Lambda allows application developers to build very sophisticated applications that require custom logic without having to provision or manage any server infrastructure. Obviously, there are compute resources under the covers but they’re completely abstracted and hidden away from the developers. They don’t have to think or know about the underlying infrastructure that is used to run their code, Ian Massingham, Amazon

 

advertisement



 

Put simply, serverless computing is about being able to focus on dynamically and continuously releasing code in a production environment where all the traditional operational aspects are taken care of for you. This can fit into the enterprise stack with surprising ease.

“If I think about a traditional enterprise organisation, typically it is fielding a set of packaged applications and probably a set of software as a service applications. If you take an example of a collaboration platform, more and more companies are moving away from running on-premises instances of their mail, collaboration and communication mechanisms opting instead to move to Office 365 and to Google apps, Google’s G-suite technologies and so on,” said Hippenmeyer.

“You can think of some aspects of software as a service as serverless. And then there’s a set of applications like SAP or other packaged applications that don’t have an equivalent software as a service offering or are now being re-hosted on top of cloud infrastructure. Those enterprises that are more progressive are starting to use things like Google’s app engine or other serverless computing concepts like maybe even Google Functions to do this.”

This enables them to move three or four components that drive SAP interaction into their cloud. However according to Hippenmeyer, there is a third class of application that is being used with serverless computing.

“These are the apps that companies build themselves, whether they be customer-facing apps within retail for consumer loyalty or risk management apps within the banking community. Those are applications that have some specific differentiated intellectual properties where there isn’t a packaged app available and they’re looking for a new way to be able to release those products to market at scale,” he said.

Lambda
Amazon Web Services is the most established in the market with a serverless computing offering and while it now has several others, the original and best known is Lambda.

“Lambda gives people the ability to upload code they’ve written, deploy that code within the service and then configure it to trigger events. When an event is triggered, the code that you’ve previously uploaded gets executed, and it gets information about the event that triggered it,” said Ian Massingham, chief evangelist in EMEA for Amazon Web Services.

“There is a very broad range of event types that can be used to trigger these executions. You can execute or invoke Lambda functions when you upload data to Amazon S3, or you can publish an API with different resources within it and when one of those is modified or accessed, I can trigger a piece of code. You can also trigger a piece of code in response to messages that flow through our IoT service, in other words in response to things that happen in the physical world. It’s extremely broad.”

“This allows application developers to build very sophisticated applications that require custom logic without having to provision or manage any server infrastructure. Obviously, there are compute resources under the covers but they’re completely abstracted and hidden away from the developers. They don’t have to think or know about the underlying infrastructure that is used to run their code.”

While it is certainly convenient for developers to not need to deal with infrastructure, the major commercial appeal of moving workloads to a serverless environment is speed, according to Massingham.

Speed benefit
“Convenience is part of it, but speed is important, in terms of deployment and agility in terms of being able to scale up and down the amount of capacity that might be required by the users of an application or service. It’s also about cost. We only charge for the execution of code in hundred millisecond increments,” he said.

Users pay on the basis of their code execution footprint, but as it is in tenth of a second increments, it is very simple to work out the real cost of provisioning. In addition, there is no charge when the code is not running.

It’s a very unconstrained way of creating applications and allowing developers to really focus on working out the logic they need to use to solve the problem they’re trying to address, Art Coughlan, Microsoft

“It’s a very cost efficient way to make use of these resources and as a result, it’s being used for all sorts of different ends. To take one example, it’s very popular to use it for API endpoints, for building web applications that might run in a browser, or applications that might run on mobile devices where you want to express resources and actions as part of an API namespace,” said Massingham.

He offers by way of an example a hypothetical photo sharing application.

Serverless scenarios
“You might have an android app, an iOS app and a http app that runs in a browser and you might want to have a common back end for these different applications so you could create an API for photo uploads and connect to it from any one of those three different endpoint types. You could store and unpack metadata to allow your users to search or index photos as well,” he said.

“Serverless computing would allow you to share the same backend across those three different access mechanisms and if the backend was implemented using AWS Lambda it wouldn’t have any fixed costs and would scale elastically according to the level of usage that you’ve got.”

Any changes to the API can be deployed in seconds and the new version of that API will be running the next time a request comes in to it.

According to Art Coughlan, cloud and enterprise lead for Microsoft Ireland, there are a number of function-based benefits to working with serverless computing. Microsoft’s brand in this area is Azure Functions, and it’s aimed at developers.

No worries
“In reality, it allows developers to just care about the business problem they’re trying to solve. The whole idea is that they don’t need to spend any time thinking about managing, creating or building any of the infrastructure that they previously would have been challenged to do,” he said.

“They don’t have to worry about how they’re going to scale the application or make it highly available, because that’s all looked after in the back end by Azure. There are financial benefits, in the form of sub-second billing, so if you don’t use a function you don’t pay for it. You can work with functions at a very high level without having to think about how it’s provided.”

“It’s a very unconstrained way of creating applications and allowing developers to really focus on working out the logic they need to use to solve the problem they’re trying to address.”

Microsoft is seeing companies getting started with its serverless computing offering in two different ways.

“If they are starting from a blank slate, they tend to start small and look at replacing background processing items that they understand well using Azure Functions. We’re also seeing a lot of companies doing integration work in situations where there has been some mergers and acquisitions happening and two companies need to merge, there’s a role there as well,” said Coughlan.

“They can effectively create a new layer across two existing business apps and make that easier and faster.”

 

 

Read More:


Back to Top ↑

TechCentral.ie