Skip to content
← All thoughts

medium · 27 Feb 2023

Monolith vs microservice vs serverless.

A short tour of monolith, microservice, and serverless architectures, and the honest test for which one your team should reach for next.

ArchitectureServerlessMicroservices

The monolith

Everything is contained within a single codebase. That makes it easy to develop, test, and deploy an application, but it can quickly become unwieldy as the application grows in size and complexity.

Microservices

Microservices break the application down into smaller, independently-shippable components. The result is greater flexibility, scalability, and fault tolerance. If one component fails, the rest of the application can keep running.

The price is complexity. Developers now have to manage multiple interdependent components, with high-level coordination and communication between teams.

Serverless

Serverless takes the microservices idea one step further by removing the need for servers altogether. You write code that runs in response to specific events or triggers, without worrying about server infrastructure.

You get cost efficiency: you only pay for the compute used during execution. The trade-offs include harder debugging and observability, and concerns around vendor lock-in.

So which architecture is best?

Each has its own strengths and weaknesses. The right choice depends on the specific shape of your application: its size, its complexity, your team's skillset, and your budget. The honest answer is almost always, it depends.

Read on Medium 

Originally on medium.