Close

21st August 2017

Serverless Architecture

What is Serverless Architecture

Serverless Architecture is a cloud computing model.  In this model, instead of utilising always on servers and infrastructure, business services are developed and deployed using Platform as a Service (PaaS), Functions as a Service (FaaS) and Messaging as a Service (MaaS) cloud offerings.  It doesn’t mean there are no servers, but it does mean that you don’t have to commission, scale or manage them.

Unlike Infrastructure as a Service (IaaS) models, Serverless Architectures built upon PaaS, FaaS and MaaS deliver business services without the requirement to deploy and manage always on server infrastructure.  Therefore, holding the potential to reduce environment complexity and operational cost.

For the purposes of this article we’ll assume the following definition;

“Serverless Architecture doesn’t utilise traditional IaaS to deliverbusiness services. Instead utilising PaaS, FaaS, MaaS and Microservices to provide business services.”

Serverless and Azure

Azure provides tools and managed services to help build and host Serverless Architectures. Azure Functions and LogicApps are the two that I’ll take a quick look at today.  However, you could also include the Azure App Service, Batch, Azure Service Bus and Azure Service Fabric (MicroServices) to that list.

Azure Functions

Azure Functions are a compute service that allow the end user to run code on-demand.  With Azure Functions, you can develop custom scripts and code to run in response to events or triggers.  Triggers can come in the form of timers, webhooks (with optional OAuth security protection), blob storage, storage queues or Service Bus queues or topics.

For example, a Function could be created to trigger when a file is uploaded into blob storage or when a specific message is submitted to the Azure storage queue or based on a schedule.

Azure functions currently support the following languages C#, F#, Node.js, Python, PHP, batch, bash or can call executables.  With added integration to Visual Studio Team Services (VSTS) and GitHub etc.

Delivered in a pay-per use model, meaning you only pay for the time spent executing your code.

In addition, as you would expect Azure Functions have excellent integration to other Azure services and can scale to the cloud to support complicated resource hungry workloads.  Providing an excellent service within which you can develop complex logic and cross Azure integration.

LogicApps

LogicApps provide a way to implement integrations and workflows within and beyond the Azure cloud.  Including a visual designer, that provides a simple tool to help model and automate processes into a workflow.  LogicApp workflows start with a trigger that when activated begin calling actions, conversions and or conditions. Ideal for potentially automating business processes.

Billed on a per action basis, with a cost that gradually reduces the more actions are generated.

Unlike Azure Functions, LogicApps doesn’t allow the creation of custom code or deviation from the already defined set of actions, triggers and conditions.  However, if you encounter something that requires custom code, there is no reason why you can’t hand that off to an Azure Function!

Summary

Whether through Azure services or AWS Lambda, serverless architecture and offerings continue to grow.  If you are considering moving business services and logic to the cloud using more traditional IaaS methods, perhaps it’s time to pause and consider if a serverless approach might provide a better option?

Simon