upvote
I have been building a SaaS for a business. One of the decisions I took is "as monolithic as possible" (though you cannot just use that).

One reason is that microservice architecture requires much more operational overhead. So any server we have (except for the database) should be self-contained as a rule, so that it can be autonomous and horizontally scalable.

So far, it is working quite well. You do not need suddenly a Redis for one thing, a ZooKeeper for the next one, and 3 or 4 things to just run the damn binaries. The binaries will start, do whatever migrations need to be done if it applies, and start running. They only need the database. They land health checks, api calls and all the logic needed, in one binary with zero dependencies that is containerized.

This has saved me a lot of pain compared to other architectures where I worked, but those were massive and it was justified (and there was budget for it). But you just need a bunch of teams to be able to do that.

I think going the microservices way for a small team not only does not pay off. I think it can be a suicide.

At the same time, I keep the servers internally modular (enable/disable feature).

reply
well... no, splitting a monolith once it has grown past the point where services make sense is incredibly difficult. My last employer spent a couple of years doing it and ultimately gave up. There is just way too much interdependency to split it up cleanly.

So the key here is good engineering leadership to recognize when that point arrives, and push the company to start the transition.

And indeed, microservices solve a organization problem not an engineering problem. When I taught the architecture to new hires, I always say: a service is the largest piece of system that stays together in a reorg :)

reply
That's assuming you don't separate concerns in your monolith into modules with clear boundaries and dependencies. If you did that from day one, splitting a module off to a different service is easy.
reply
That's my belief as well: modular architecture and separation of concerns is orthogonal to monolith <-> microservice infrastructure axis.

And Service Oriented Architecture is the nice middle ground of that infrastructure axis

reply
Big companies mostly seem to use the microservice(s) per team model. If your whole company is two founders, one account manager, and an engineer, you only have one team.

It can make sense to have more than one service for purely technical reasons. I once worked on a friend's startup where we built a separate ingress microservice so we could scale it independently from our monolith. There's no organisational benefit to doing so, however. The technical founder and the one engineer are hardly going to block each other.

reply
"Big companies mostly seem to use the microservice(s) per team model. "

I am good with that. What we often see is 10 microservices per team of 3 devs. And ideally using the same database.

reply
Multiple services using the same database will typically end poorly. When schemas or indexes change, how will that affect all of the different services? How do their read/write patterns differ? When one service needs to scale, will the additional connections starve the other services? And worse, if a service ends up moving to a different team or department, who controls the database?

I prefer a service that fronts the database. Swap the database, scale it, whatever, and clients keep going.

reply
I've seen a startup with 10 devs + 60+ microservices and growing.

The team was stuck in a mindset that they just hadn't split things up enough to arrive at nirvana.

reply
Been there before - I worked at a company where some geniuses thought that microservices would solve all of our scaling issues. We ended up with four microservices just to send an email (one to template, one to send, one to persist to database and one other which I can't remember now).
reply
Microservices are a solution to business/team organizational issues. Never technical ones.
reply
Yes start with a monolith but split it sooner than later ( was at a company where they realized it too late, after being in business for 8+ years) .

It was a nightmare at that point. We pretty much gave up.

reply