diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000000..49cdd668e1c8 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.7.6 diff --git a/_posts/2023-05-20-monlith-vs-serverless.md b/_posts/2023-05-20-monlith-vs-serverless.md new file mode 100644 index 000000000000..ca27a9953055 --- /dev/null +++ b/_posts/2023-05-20-monlith-vs-serverless.md @@ -0,0 +1,79 @@ +--- +title: "Is serverless dead?" +excerpt: "TBD" +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