Serverless Stacks in 2018

Serverless Stacks in 2018


Serverless architectures have exploded in popularity in recent years. The promise of simpler infrastructure, lower costs, and quicker development is very attractive to developers. AWS kicked off the party, but Microsoft and Google have joined in with their own serverless solutions. The New York Times’ CTO, Nick Rockwell, dug deep into serverless and what it means for NYT in a recent Stack Story Episode.

In this post, we take a look at the "Function as a Service" side of serverless and compare the current offerings of the Big 3 cloud providers.


AWS Lambda

Let's start by saying that AWS has by far the most mature serverless offering. Lambda was introduced almost 4 years ago and features a suite of integrations and supporting frameworks. If you're already using AWS for the rest of your infrastructure, it seems pretty unlikely that you'd need to look any further.

Languages

Lambda supports Node.js, Java, Go, C#, and Python natively. Additional support for Rust and Clojure is available using the third-party Apex framework.

Frameworks

When building your serverless stack on AWS, you have several frameworks to choose from. Serverless, Apex, and Architect all support deploying cloud functions to Lambda. The most robust and mature of this bunch is definitely Serverless. If you prefer a simpler option and don't see yourself moving away from AWS, the newer Architect might be a good choice. And if you want to write your functions in Rust or Clojure, Apex is the framework for you.

Triggers

AWS Lambda integrates with many different triggers, or event sources, to invoke your functions:

You can also invoke functions "on demand" using the AWS SDKs.

Who's using it?

Lambda has some big names on its customer list, like InVision, CircleCI, and 9GAG. It's also a popular tool with e-commerce, analytics, and fintech companies on StackShare.

What other tools do these companies use?

Most of Lambda's customers are heavily invested in the AWS ecosystem as a whole. 79% of companies using Lambda on StackShare are also using S3, 71% are using EC2, 51% are using CloudFront, and 46% are using RDS.


Azure Functions

Microsoft's FaaS solution is probably the second most "mature" of the Big 3. Launched in March of 2016, Azure Functions essentially offers serverless functions to those already using a Microsoft tool like C#, F#, or some other piece of the Azure cloud.

Languages

Currently, the only fully supported languages for use with Azure Functions are JavaScript, C#, and F#. Others, such as Java, Python, and PHP, are either in "experimental" or "preview" mode. The "experimental" languages have serious limitations that rule out their use in production. Python, for example, will run python.exe with each function invocation and be very slow.

Frameworks

If you're building a serverless application on Azure, the Serverless framework is the way to go. It is currently the only serious framework for building and deploying cloud functions on the Microsoft platform.

Triggers

The Azure list of event sources is certainly smaller than Lambda's:

You can also create functions that run on a timer inside the Azure Functions console. Serverless cron jobs?

Who's using it?

The customer list is also much smaller. Companies using Azure Functions tend to be larger enterprises like CarMax or Fujifilm.

What other tools do these companies use?

As with Lambda and AWS, if you're using Azure Functions, the rest of your infrastructure is likely inside the Microsoft world. 70% of companies deploying functions on Azure are also using C# and Azure Cloud. Many are also using tools like Azure Storage and Microsoft SQL Server.


Google Cloud Functions

Although Google Cloud Functions is still in beta, it's quickly rising in popularity amongst StackShare users. The capabilities and features are still very limited compared to the alternatives, though, and the rise of Google Cloud Platform as a whole likely contributes greatly to its adoption.

Languages

JavaScript. That's it. If you're writing cloud functions on GCP, you're doing in JavaScript. Nothing in the documentation suggests that support for other languages is in the works.

Frameworks

Once again, Serverless seems to be the only option here. Fortunately, it's a good one.

Triggers

The choices for function invocation are the slimmest with Google Cloud:

Who's using it?

Google's own site lists Meetup and HomeAway, an Airbnb competitor as customers. Some of the more prominent companies on StackShare with Google Cloud Functions in their stack include TrustPilot, an online review platform, and several Japanese startups.

What other tools do these companies use?

Firebase is by far the most commonly associated tool on StackShare, with 78% of Google Cloud Functions users also using it. Also, this shouldn't come as a surprise, but JavaScript is pretty popular at these companies, too.


Which FaaS tool makes sense for you?

AWS Lambda is certainly the most robust option available. The amount of integrations it offers eclipses Azure and Google Cloud; however, they are all AWS integrations. This might be one of the big downsides of serverless in general at this point. The vendor lock-in is serious, and your choice of cloud function service will probably be very dependent on the rest of your stack. If you're already writing in a language like C# or F#, Azure is the way to go. If you have an existing Firebase application and you need some serverless component, Google Cloud Functions is the obvious choice.

Those starting a completely new project and dead-set on building a serverless architecture should weigh the available triggers or event sources against their needs. For example, if you were building a serverless web API, Lambda would be your best option, since neither Azure or Google Cloud offer something comparable to API Gateway.