Don't start with microservices – monoliths are your friend
I wonder why no one ever talks about architectures in the middle between those two - modular monoliths.<p>The point in time where you&#x27;re splitting your codebase up in modules (or maybe are a proponent of hexagonal architecture and have designed it that way from the beginning), leading to being able to put functionality behind feature flags. That way, you can still run it either as a single instance monolith, or a set of horizontally scaled instances with a few particular feature flags enabled (e.g. multiple web API instances) and maybe some others as vertically scaled monoliths (e.g. scheduled report instance).<p>I wrote more about that approach on my blog, as one of the first articles, &quot;Moduliths: because we need to scale, but we also cannot afford microservices&quot;: <a href="https:&#x2F;&#x2F;blog.kronis.dev&#x2F;articles&#x2F;modulith-because-we-need-to-scale-but-we-also-cannot-afford-micro-services" rel="nofollow">https:&#x2F;&#x2F;blog.kronis.dev&#x2F;articles&#x2F;modulith-because-we-need-to...</a><p>In my eyes, the good part is that you can work with one codebase and do refactoring easily across all of it, have better scalability than just a monolith without all of the ops complexity from the outset, while also not having to worry as much about shared code, or perhaps approach the issue gently, by being able to extract code packages at first.<p>The only serious negatives is that this approach is still more limited than microservices, for example, compilation times in static languages would suffer and depending on how big your project is, there will just be a bit of overhead everywhere, and not every framework supports that approach easily.