Serverless Architecture – Complete Reference Guide 2019
Tags: faas, cloudcomputing, serverless
Published: 2019-05-22 20:12:21

---
title: Serverless Architecture – Complete Reference Guide 2019
published: true
description: 
tags: FaaS, Cloud Computing, serverless
canonical_url: https://www.hiredevops.org/serverless-architecture-complete-reference-guide-2019/
cover_image: https://cdn-images-1.medium.com/max/800/1*0vi51TpSDBwtxTXx32B-Ag.png
---

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](https://martinfowler.com/articles/serverless.html) 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): {% youtube 3vaqTIIcfvY %}

##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.

![traditional vs serverless](https://www.hiredevops.org/wp-content/uploads/2019/05/traditional-vs-serverless-architecture-800x596.jpg)

##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 (https://www.slideshare.net/loige/building-a-serverless-company-with-nodejs-react-and-the-serverless-framework-jsday-2017-verona) 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](https://www.hiredevops.org/wp-content/uploads/2019/05/Is-It-Cheaper-To-Go-Serverless-car-analogy-1200x900.png)

##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 Faas](https://www.hiredevops.org/wp-content/uploads/2019/05/What-is-function-as-a-service-FaaS-1200x900.png)

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?: {% youtube RlzY81LLb3A %} 

**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](https://cdn-images-1.medium.com/max/800/1*av7m2FyOxomYk1jECLgeuw.png)

##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.

- Use a compute service to execute code on demand
- Write single-purpose, stateless functions
- Design push-based, event-driven pipelines
- Create thicker, more powerful front ends
- 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](https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/) by Serverless, Inc. here is a list of cases when serverless is a good fit:

![Serverless use cases](https://www.hiredevops.org/wp-content/uploads/2019/05/serverless-architecture-use-case-1200x960.jpg)

##But When Not To Use Serverless?##

Here is the answer on Quora: https://www.quora.com/What-is-the-best-use-cases-for-serverless/answer/Max-Katz

##Advantages And Disadvantages Of Serverless Architecture##

![Advantages And Disadvantages Of Serverless Architecture](https://www.hiredevops.org/wp-content/uploads/2019/05/Serverless-architecture-Pros-and-Cons.png)
*download  PDF: 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](https://serverless.com/blog/2018-serverless-community-survey-huge-growth-usage/) by Serverless, Inc.:

![serverless architecture importance](https://www.hiredevops.org/wp-content/uploads/2019/05/serverless-architecture-importance-1200x960.png)

##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](https://cloudevents.io/) and other initiatives that enable vendor choice.  As for the best cloud computing conferences happening in 2019, a curated list you will find [here](https://github.com/serverless/cloud-computing-conferences). 

##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.

![The Biggest Obstacle To Wider Serverless Adoption Right Now](https://www.hiredevops.org/wp-content/uploads/2019/05/challenges-serverless-architecture-1200x960.jpg)

##Recommended Reading##

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