Simon Sugob
May 21 · 6 min read
Serverless Architecture — Complete Reference Guide [2019]

Serverless architecture (also known as serverless computing or function as a service, FaaS), gets us a step closer to independence from humans and brings us much closer to the machine dependency. For many people, serverless is their first exposure to the public cloud.

What Is Serverless Architecture?

Despite the name, serverless architecture doesn’t mean that it runs its code without servers. In this solution there is no need for a company to buy, rent or provision servers/virtual machines for the back-end code to run on. This is a way of building and running applications and services without infrastructure management.

Since the term ‘serverless’ is confusing and there’s no one clear view of what serverless is, I encourage you to read the article by Mike Roberts where he gives a deep insight into this term.

Evolution Of Serverless Architecture

‘Serverless is the evolution of cloud platforms in the direction of pure cloud-native code’.

It is the culmination of several iterations of cloud platforms. The evolution began with physical machine in the data center and progressed through Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Container as a Service (CaaS) to Function as a Service (FaaS). Best explanation you will find in this short, 4-minute video by Jason McGee (IBM’s CTO).

Why Choose Serverless Architecture?

Serverless architecture significantly helps developers focus more on their core product, not the infrastructure. Otherwise, developers would still be worrying about implementing, maintaining, debugging, and monitoring the infrastructure, whether managing them in the cloud or on-site. Using serverless services like AWS Lambda, Google Cloud Functions, Firebase or Microsoft Azure Functions they will take care of the physical hardware, virtual machine operating system as well as the web server, while you — as a developer — would only need to worry about one thing — your code.

source: https://www.gocd.org/2017/06/26/serverless-architecture-continuous-delivery/

Is It Cheaper To Go Serverless?

It depends. If you have a small number of functions to be hosted, you should consider switching to serverless. Having a more complex application, a serverless architecture can still be profitable, but you will need to architect your application differently. This may turn out to be impracticable if you have an existing application. The best solution, in this case, would be migrating smaller pieces of the application into serverless functions over time. I’ve encountered a clever car analogy by Luciano Mammino explaining whether to go serverless or no.

Cars are parked 95% of the time (Fortune). How much do you use the car?

Is It Cheaper To Go Serverless? Car analogy

What Is Function as a Service (FaaS)?

FaaS is an implementation of serverless architectures where engineers can deploy an individual function or a piece of business logic. It allows developers write and update a piece of code ‘on the fly’, which can then be executed in reply to an event, such as a user clicking on an element in a web application. This facilitates scaling code and is a cost-efficient way to implement microservices.

In other words, instead of scaling a monolithic REST server to handle the potential load, a developer can now split the server into a bunch of functions which can be scaled automatically and independently. If you’re familiar with microservices, this image might be helpful:

What Is Function as a Service (FaaS)?

Some people argue that serverless should be referred to as function as a service (FaaS), and while it’s not a bad name, serverless is a much broader concept than just an ephemeral function running in the cloud. Learn why?:

The key properties of FaaS are:

  • Independent, server-side, logical functions
  • Ephemeral (may only last for one invocation)
  • Stateless
  • Event-triggered
  • Scalable by default
  • Fully managed by a Cloud vendor (a third party)

What Is The Difference Between FaaS And PaaS?

PaaS makes it easy to deploy an entire application. PaaS providers handle provisioning servers and deploying your application to the servers.

Function as a Service (FaaS) gives you the ability to deploy what is essentially a single function, or part of an application. Instead of the monolith app that you’d run on a PaaS, you break down your app into small self-contained programs, or functions.

Serverless Infrastructure Providers & How-To Guides’ Links

After you have installed the serverless framework on your machine next thing is to choose where you’d like your serverless service to run. Choose your compute provider from below list and follow awesome guides by Serverless Inc. at https://serverless.com/framework/docs/getting-started/.

Serverless Infrastructure Providers

Top 5 Principles Of Serverless Design

Below principles apply if you decide to create an entire system (back-end & front-end) using a serverless approach. If you are building other types of systems (a pipeline for transforming a file), the principle relevant to the front-end will not apply.

  1. Use a compute service to execute code on demand
  2. Write single-purpose, stateless functions
  3. Design push-based, event-driven pipelines
  4. Create thicker, more powerful front ends
  5. Embrace third-party services

Learn more at https://techbeacon.com/enterprise-it/essential-guide-serverless-technologies-architectures.

The Best Use Cases For Serverless

According to the survey by Serverless, Inc. here is a list of cases when serverless is a good fit:

source: https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/

But When Not To Use Serverless?

When Not To Use Serverless

Advantages And Disadvantages Of Serverless Architecture

https://www.dropbox.com/s/0wumyqm3oadlww6/Serverless-architecture-PROS-and-CONS.pdf?dl=0

Summary

Serverless is growing fast. Several key adoption metrics are 2x what they were last year. And not just with smaller companies — the enterprise is adopting serverless technologies for critical workloads just as rapidly. And there is clear evidence in the mentioned survey by Serverless, Inc.:

source: https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/

Best Cloud Computing Conferences In 2019

In comparison to previous years, more people are using multiple cloud providers. This fact increases the importance of projects such as CloudEvents and other initiatives that enable vendor choice. As for the best cloud computing conferences happening in 2019, a curated list you will find here.

What Is The Biggest Obstacle To Wider Serverless Adoption Right Now?

Operationalizing serverless (debugging, monitoring, and testing) is the biggest issue at the moment and clearly, indicate a lack of tooling.

source: https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/

Recommended Reading

  1. https://martinfowler.com/articles/serverless.html
  2. http://lukeangel.co/cross-platform/docker-servless-faas-functions-as-a-service/
  3. https://hackernoon.com/what-is-serverless-architecture-what-are-its-pros-and-cons-cc4b804022e9
  4. https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/
  5. https://serverless.com/framework/docs/providers/
  6. https://epsagon.com/blog/the-5-best-use-cases-for-the-serverless-beginner/
  7. https://github.com/serverless/cloud-computing-conferences

originally posted: https://www.hiredevops.org/serverless-architecture-complete-reference-guide-2019/

The Startup

Medium's largest active publication, followed by +500K people. Follow to join our community.

Simon Sugob

Written by

Senior DevOps @HireDevOps. Interested in #Kubernetes #AWS #IaC #Terraform #CDPipelines #DevSecOps #FaaS #CloudNative | hiredevops.org

The Startup

Medium's largest active publication, followed by +500K people. Follow to join our community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade