Concerns that go away in a serverless world
Tags: serverless, aws, devops
Published: 2018-09-19 10:28:42

---
title: Concerns that go away in a serverless world
description: A list of devops concerns when building and operating server-based apps that don't apply to serverless apps.
canonical_url: https://winterwindsoftware.com/concerns-that-serverless-takes-away/
tags: Serverless, AWS, DevOps
cover_image: https://winterwindsoftware.com/img/blog-images/ripped-book.jpg
published: true
---
A common claim from serverless advocates is that it can [increase a team's feature velocity](https://medium.com/@PaulDJohnston/feature-velocity-and-serverless-588a2ff2d59a) and reduce the ops overhead of running an application in the cloud. But if you're an engineering manager, developer or ops engineer who has never run a serverless workload in production, you may find this claim hard to visualise and quantify.

_**How** will serverless increase our team's productivity?_

_In what ways will it affect the skillsets we need in our engineering team?_

To help answer these questions, I've compiled a list of specific concerns and tasks encountered when building and operating server-based applications __that no longer apply when using a serverless architecture__.

By the end of the article, you should have a clearer picture of how selecting a serverless architecture can potentially reduce the total cost of ownership of a new application within your organisation.

When reading through the list, try to think of a server-based app you are currently or have previously worked on, and ask yourself the following questions about each list item:
- Do I have the __knowledge to complete this task myself__ or is this something a specialist or more experienced member of my team takes care of? If the latter, how much time would it take me to understand what's involved in doing this?
- How much __time do I (or another member of my team) currently spend doing this__ and how frequently does it need repeated?
- Even though I can do this task myself, am I __confident that I've implemented it correctly__ using best practices and that I haven't introduced any security holes or performance issues?
- Is this something that we don't currently do on our team (due to time or skill constraints), but that __I know that we *should* be doing__, and thus we've taken on extra risk by omitting it?

_A note on scope: I focus on the AWS ecosystem so the items listed below primarily relate to the EC2, VPC, RDS, ECS/EKS and ELB services Amazon provides. Nevertheless, most points are generally applicable to other major cloud providers. I've assumed the server-based system is run either in containers or directly on the virtual machine instances._

Ok, let's dive into the list of concerns which which go away in a serverless world...

## Server Provisioning and Scaling
- Configure AMIs for your VM instances with specific OS version and any required application software
- Set up a VPC and subnets using best-practice security settings
- Configure security groups and identify what ports need to be open on each instance
- Create launch configurations and auto scaling groups for each EC2 instance type
- Configure load balancers and associated health checks
- Set up internet gateways
- Configure route tables
- Configure VPC peering
- Configure RDS cluster with appropriate storage and instance size
- Regularly observe load-related metrics and modify scaling limits or instance resource allocation accordingly
- Repeat most of above steps for each environment (dev, test, staging, production)

## Application Development & Maintenance
- Define your container environment (Dockerfile)
- Configure your container orchestration cluster (ECS, Kubernetes, etc)
- Configure the pods/services/task definitions within your cluster
- Debug container inter-connectivity/service discovery issues
- Write script to deploy build artifact (Docker image, zip file) to EC2 instance
- Regularly update base Docker image with latest patches (e.g. to Node.js/Python/Java or whatever language your app uses)

## Server Maintenance
- Set up a secure VPN/SSH bastion instance (and keep it patched)
- Manage VPN/SSH access to different servers for authorised engineers
- Manage regular patching of all VM instances (either manually via SSH or automated via script/Systems Manager)
- Be available to promptly deploy emergency patches (e.g. heartbleed)
- Set up alerts to be notified about emergency patches
- Set up monitoring to watch for low disk space
- Manually expand a volume when it's out of space
- Handle SSL certificate renewal and deployment (if installing keys directly to instances and not just to load balancers where it's managed by AWS)
- Repeat most of above steps for each environment (dev, test, staging, production)

## Cost Control
- Pay for an EC2/RDS/ElastiCache instance when it's not in use
- Over-provision instances to handle occasional sudden traffic spikes
- Write cron jobs to spin down dev/test environment instances at evenings and weekends

📖  __Related: *[How to calculate the billing savings of moving an EC2 app to Lambda](https://winterwindsoftware.com/ec2-to-serverless-migration-calculator/).*__

By now, you're probably shouting _"That's great Paul, but what about all the new concerns that serverless brings?"_ And you would be correct to do so, my healthily skeptical friend!

I do intend to write about this soon, but for now I will point you at this article on [Containers vs Serverless from a devops standpoint](https://dev.to/adnanrahic/containers-vs-serverless-from-a-devops-standpoint-e4n) and also Martin Fowler's section on [the drawbacks of operating serverless systems](https://martinfowler.com/articles/serverless.html#drawbacks).

That said, and while this is very difficult to objectively measure, I personally believe that for most development teams building a greenfield production system in the cloud today __the total cost of ownership of a serverless app will be lower than that of a server-based app__.

This is especially true if your organisation doesn't have a skilled ops team already in place with availability to help your dev team build out the infrastructure and automation required to provision and maintain your application.

Got any more items that I should add to the list? I'm sure there are plenty of things I've forgotten so please leave me a comment below and I'll add it in.

---
💌 __*If you enjoyed this article, you can sign up [to my weekly newsletter on building serverless apps in AWS](https://winterwindsoftware.com/newsletter/).*__

_Originally published at **[winterwindsoftware.com](https://winterwindsoftware.com/concerns-that-serverless-takes-away/)**_.