Live data from Hacker News

In Defence of Monoliths

techblog.bozho.net

1–10 of 76 posts

Re: In Defence of Monoliths

#2
I have seem cases when a group of stateless monoliths would have solved more efficiently a business case than the micro-services alternative.

I'm not saying micro-services are a fad, because they are great for isolating domains and degradation of service, but that comes with a high amount of boilerplate code for remote invocation and serialization.

I would personally say, if your project has not reached 10,000 lines of code do not go that way. also if you can solve the problem at hand with a cluster of stateless monoliths, keep it simple.

Dear friends, keep at hand the Occam's razor

Re: In Defence of Monoliths

#3
> decentralize all things – well, the services are still logically coupled, no matter how you split them.

I think this is missing the point. It isn't just about decentralizing services, it is also about allowing you to decentralize teams and decision making. With very large teams working on a single monolith, features that are complete often cannot be deployed because of the larger organizational overhead of planning and coordinating a release. The higher coupling in most monoliths also restricts a teams ability to try new things and take risks.

If performance of technology is the only metric that matters to you, then yes, microservices are probably a horrible idea. If you are having difficulty scaling your teams, then it might be worth looking at.

Re: In Defence of Monoliths

#4
One thing I don't think gets hammered on enough is that if your organization is not large microservices will create a lot of overhead for little gain.

If you have few developers most of the time it's a lot more efficient to have a modular monolith than it is to have 50 entirely different rocks.

Decentralizing teams, decision making, and allowing increased independence of agency within a larger org is great. Trying to do the same thing when you only have 5 people is usually borderline crazy.

Re: In Defence of Monoliths

#5
post #3

> decentralize all things – well, the services are still logically coupled, no matter how you split them. I think this is missing the point. It isn't just about decentralizing services , it is also about allowing you to decentralize teams and decision making . With very large teams working on a single monolith, features that are complete often cannot be deployed because of the larger organizational overhead of planni…

I don't see how microservices makes that overhead go away. That overhead is really a matter of proper systems engineering. With well-defined interfaces and properly-sectioned functional components teams can work just as independently on a monolithic application as they can on a microservice application. Similarly, a poorly-sectioned application with bad or nebulous interfaces will be a planning and coordination nightmare regardless of the architecture.

What I think the microservice architecture does is force some measure of good systems engineering on a team. You can't design a microservice application without putting effort into deciding how to divide the functionality and defining how those functional blocks will work with each other. You can get away with not doing that (until it's too late) when designing a monolithic application.

Re: In Defence of Monoliths

#6
post #3

> decentralize all things – well, the services are still logically coupled, no matter how you split them. I think this is missing the point. It isn't just about decentralizing services , it is also about allowing you to decentralize teams and decision making . With very large teams working on a single monolith, features that are complete often cannot be deployed because of the larger organizational overhead of planni…

I don't see how microservices makes that overhead go away. That overhead is really a matter of proper systems engineering. With well-defined interfaces and properly-sectioned functional components teams can work just as independently on a monolithic application as they can on a microservice application. Similarly, a poorly-sectioned application with bad or nebulous interfaces will be a planning and coordination night…

I've actually found overhead to increase significantly when using micro-services vs a monolithic codebase. Automated integration testing is far more complex. Ensuring that a change in one micro service doesn't break things in another can be daunting. But when you have a common codebase dependencies are far more clear.

Of course if you have tons of cash and resources to throw at it then that isolation could be beneficial. But is it worth it? I have no idea.

Re: In Defence of Monoliths

#7
post #3

> decentralize all things – well, the services are still logically coupled, no matter how you split them. I think this is missing the point. It isn't just about decentralizing services , it is also about allowing you to decentralize teams and decision making . With very large teams working on a single monolith, features that are complete often cannot be deployed because of the larger organizational overhead of planni…

> The higher coupling in most monoliths also restricts a teams ability to try new things and take risks.

I think it's you who's missing the point. That right there is why.

Turning your monolith into a micro-service architecture should add up to basically: - Wrap your internal modules in your favourite form of RPC - Replace the modules with stubs that call the RPC

If you need more work than that, the problem with your application isn't being a monolith, it's having functionality be way too tightly coupled.

If turning your application into a micro-service architecture actually _is_ that simple, then you already have well-delineated modules that your teams can focus on. Deployment is just about integrating the latest stable version of each module, and the decision process within each team needs only respect the contract around the interface they provide -- same as a micro-service.

Saying you need a micro-service architecture to keep a sane internal structure to your application is a symptom that you need to review your engineering practices, because people aren't respecting the interfaces, and it's throwing out the baby with the bathwater.

Re: In Defence of Monoliths

#8
One advantage of a microservice architecture not mentioned in the article is the ability to scale services independently of other services. Being able to fire up more instances to address a bottleneck is often much simpler than managing threads in a monolith.

Re: In Defence of Monoliths

#9
It depends how you do micro services. There are middle grounds. One big gain of micro-services is that it guarantees things are separate and can be handled by separate teams if the need arises. That doesn't mean you need to start out that way. For instance in Python I use hug to create my microservices https://github.com/timothycrosley/hug, then I can just install them to create a "monolithic" services that consumes all the microservices, the great thing is that hug allows you to expose both as a webservices, and as a Python library so I can consume as a Python library with no overhead, until the need to split is evident, and then can split up the services with very little work. Of course the need may never arrive, but the modularity that is forced when using micro-services pays dividends quickly regardless

Re: In Defence of Monoliths

#10

One advantage of a microservice architecture not mentioned in the article is the ability to scale services independently of other services. Being able to fire up more instances to address a bottleneck is often much simpler than managing threads in a monolith.

that is true in some very rare cases. CPU-intensive bits of the application should definitely be separated, so that they can scale independently. But that's not the main point of microservices.
Post reply on HN