Before we get to it, let me start by saying that, by writing this article, I'm probably gonna ruffle a few feathers.
When you build your software, should you go for monolithic or microservices architecture? This is one of the hottest argument in developer circles. There are advocates for either sides and the argument is never ending (don't even get a developer started on tabs vs spaces).
If you're not already familiar with these concepts, here's the short version of it. Monolithic architecture is when all the pieces of a software application —authentication, payments, email delivery — are built and deployed from one code base. Microservices architecture is when you split these pieces into separate code bases.
Each architecture has it's own advantages and disadvantages. In recent times, microservices architecture has seen a surge. Technologies like Docker, Kubernetes and serverless cloud functions have made it simple to build and deploy microservices applications.
But which one should you use?
If you're just starting out and not sure which one to pick, go with monolithic architecture. Hold this flavored sparkling water while my anxiety sets in.
Why am I suggesting you go with monolithic architecture?
Well, because it's easy to get started. When you're in the early stages of your product development, you don't wanna spend time managing multiple codebases. You want to simplify your setup while you talk to customers and build features.
So it is completely fine if all your code lives in one codebase. I split my frontend and backend code into separate codebases and you can do this without facing any difficulties. This will make things a little easier down the line but it's not wrong to put them together too. Any further split in your codebases, you're in for a ride.
At work, we use a combination, one monolith and a bunch of microservices. This was a recent change and for the longest time we only had the monolith which worked really well. Basecamp, which is used by millions of users, still uses a monolith architecture. Their new email service, Hey, will also be using a monolith.
Using a monolith doesn't mean you can't scale. But it also doesn't mean you shouldn't use microservices. When you have teams working on focused areas of your application, it makes sense to split them up.
Well I guess that's your answer. Use monolithic architecture. And don't @ me.