How Serverless Computing is Changing the Cloud
Technology never stands still, both in invention and execution. One of the newest trends is also one of the most misleading because of the term: Serverless computing. The term suggests that no back-end servers are used – when that is not at all the case. It just means servers are no longer your concern.
The first wave of the move away from servers is well underway with the move from on-premises hardware in company data centers toward renting compute capacity from Platform-as-a-Service (PaaS) vendors like Amazon Web Services (AWS) and Microsoft Azure.
The promise was straightforward and simple: developers can rent capacity as needed and shut it down when they are done. They can “spin up” a virtual server on AWS or Azure in just a few minutes, with the defined amount of CPU cores, memory, storage, and necessary software, as opposed to waiting weeks to order a server and install it in the company data center.
This has helped speed up development, reduce headaches, and save some money. This took a lot of the load off the IT department, but developers still had the task of setting up the virtual server on AWS/Azure/whatever provider, and they may not always know the best way to configure the server.
Enter serverless computing, the next step in the move to IaaS. With serverless computing, rather than allocating virtual machines and deploying code to them, the development team just uploads its code, called functions because they perform a single function, and lets the PaaS vendor figure out how to best deploy and run those functions.
The benefits are huge, says Torsten Volk, managing research Director with Enterprise Management Associates, an IT consultancy. “Coders don’t have to worry about scalability and high availability, you only pay for the time your code runs, instead of reserving EC2 resources for an ongoing time period, and setup is almost instant. Create code and give it a try,” he said.
Jim Sherhart, product marketing manager for AWS at Amazon, says there are four major benefits to going serverless: 1) There are no servers to provision or manage. You just bring your code. 2) Automatic scaling. Amazon’s Lambda serverless service scales your application by running code in response to each trigger 3) Availability is taken care of by Lambda. 4) You only pay for what you use. You don’t pay when your code isn’t executing.
Peter Horadan, CTO and executive vice president of engineering at tax software firm Avalara, said the cost savings are a big deal. “People overprovision for machinery on AWS. In serverless, that’s 100% gone. You don’t preallocate any resources to run your function. You upload it and say when this event happens, run my function. If it happens once a day, it runs it once a day and that’s all you pay for,” he said
Getting completely out of the business of preallocating resources has yielded ten-fold to 100-fold savings in costs, he said. “And you get out of the hard work of thinking about what resources do you need. They have auto scaling systems. You just don’t think about it you just upload your code and don’t have to think about how to scale it,” said Horadan.
“In many ways, serverless is a natural evolution of PaaS. Serverless offers a fully managed platform that frees developers from the need to worry about servers and allow developers to focus on the application and not the machines running it. Serverless enables developers to build applications quicker and easier as well as takes care of a lot of the operational and management work,” said Yochay Kiriaty, principle program manager for Azure Functions at Microsoft.
Downsides to Serverless?
But there are a few downsides. It’s a different way of coding and not all runtimes are available on AWS. There is not yet a well-integrated means for easy debugging, and security needs to be evaluated, said Volk.
Horadan said serverless is great for a simple task like processing a Web page or an image. That’s a simple function. The whole idea behind serverless is it’s a discrete piece of software functionality that does something fairly small in response to an event.
That means it can’t handle anything complex. “For today, it’s for simple tasks only. It really works well with small tasks. A large program with lots of functions linked together is more difficult to use, but those are problems people are figuring out with tooling,” he said.
Craig Lowery, research director at Gartner, said in a research paper that function Platform-as-a-Service (fPaaS), which is where serverless computing fits, is still nascent and lacking in complete tooling and best practices for streamlined, repeatable and successful software development activities.
“Although current fPaaS implementations are lacking, the value of the model has been clearly demonstrated, maps naturally to microservice software architecture, and is on a trajectory of growth and increased adoption,” he added. Gartner projects that by 2020, organizations making the most effective use of public cloud infrastructure as a service (IaaS) will use a combination of VMs, containers and fPaaS.
With that in mind, Microsoft’s Kiriaty said the beauty of serverless is that it really is for any developer. “We created Azure Functions with that in mind, supporting popular developer languages including F#, PowerShell, PHP, Python, CMD, BAT and Bash. It’s not about who shouldn’t use serverless but instead considering the right use cases for the task at hand,” he said.
His competitor at Amazon agrees. “Serverless architectures are suitable for a range of applications. There is no single use case or industry where customers would not see the benefits it offers,” said Sherhart.
In the near future, Horadan thinks improved tooling will be the next big step forward for serverless. “Today you can only upload small pieces of functionality. If one calls another you have to wire them together. In a traditional program, the compiler would do it. And there’s also the issue of which versions of the function are being called. So it’s really tooling, and it’s a solvable problem. I expect to see a lot of these problems get solved over time,” he said.