Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.7.6
79 changes: 79 additions & 0 deletions _posts/2023-05-20-monlith-vs-serverless.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: "Is serverless dead?"
excerpt: "TBD"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pick an appropriate excerpt here.

layout: single
comments: true
read_time: true
share: true
related: true
tags:
- serverless
- monolith
- software architecture
header:
overlay_image: /assets/images/New DevCycle Logo.png
overlay_filter: 0.25 # same as adding an opacity of 0.5 to a black background
caption: "TBD"
teaser: /assets/images/New DevCycle Logo.png

---

# Is serverless dead? #

There's been lots of talk recently about something I've been talking about for years, serverless architecture vs
monolithic architecture, this conversation was sparked by this
[blog](https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90)
written by Marcin Kolny describing how the Prime Video team re-architected their audio/video monitoring service from
using serverless components to a monolith.

The arguments presented following the publishing of this blog can mostly be summarised as;

> [Serverless is dead and was a terrible idea in the first place](https://world.hey.com/dhh/even-amazon-can-t-make-sense-of-serverless-or-microservices-59625580)

## What is serverless, what is a monolith? ##

First we have to turn to some definitions, what is serverless?

> Serverless computing is a cloud computing execution model in which the cloud provider allocates machine resources on
> demand, taking care of the servers on behalf of their customers.

So serverless is an execution model and has nothing directly to say about how we organise functionality. However, most
serverless architectures tend to encourage separating functionality into small independently deployable execution units
that communicate with calls across a network (synchronous or asynchronous).

How about a monolith?

> a monolithic application is a single unified software application which is self-contained and independent from other
> applications...

So a monolith is a pattern of organising functionality into a single deployment/execution unit which doesn't need other
'applications' to carry out it's function.

These definitions are terms of art. For example, unless your application is completely self contained on your device and
has no requirement to connect to any other device then is it really a 'self-contained'? What does self-contained mean?
All high level applications rely on the underlying services of an operating system and most rely on some data store,
does that mean they're not a monolith? Almost all modern applications consist of a client/server architecture, does this
mean they're not a monolith?

So for the purposes of this discussion I'll use some somewhat subjective definitions.

> A serverless application is one where the functionality not directly involved in the user interface is divided into
> multiple deployment units (excluding any generic datastore) that are allocated on demand by a cloud provider.

and

> A monolithic application is one where the functionality not directly involved in the user interface is consolidated in
> one deployment unit (excluding any generic datastore).

Note, I've used the term 'deployment unit' and not 'execution unit' as I want to draw the distinction between run time
organisation and build/deployment time organisation. An application can be monolithic even if there are multiple
instances running provided each instance is a copy of the same deployment unit.

## Why use serverless or monolith? ##

People more steeped in the technologies than me have discussed the benefits of serverless architecture so I will
summarise my 'take' on the reasons for using it:

+ Respond to requests on demand especially when they are intermittent and 'peaky'
+ (Arguably) reduce the time spent on maintaining infrastructure
+ Code can run closer to the user, decreasing network latency