Live data from Hacker News

Monoliths are not dinosaurs

allthingsdistributed.com

121–130 of 243 posts

Re: Monoliths are not dinosaurs

#121

Software would be 50% better if every developer understood Tesler's Law: "Complexity can neither be created nor destroyed, only moved somewhere else." The drive to simplify is virtuous, but often people are blind to the complexity that it adds. Okay, so your microservices are each very simple, but that made the interactions and resource provisioning very complex. What was the net gain? The correct solution depends on…

Not true. You can make any system arbitrarily complex. And 95% of software developers IMHO are hell-bent on proving that true every single day. Micro-services is a GREAT example of this.

> You can make any system arbitrarily complex.

But isn't that introducing incidental complexity? Not sure if you actually disagree.

Re: Monoliths are not dinosaurs

#122

Software would be 50% better if every developer understood Tesler's Law: "Complexity can neither be created nor destroyed, only moved somewhere else." The drive to simplify is virtuous, but often people are blind to the complexity that it adds. Okay, so your microservices are each very simple, but that made the interactions and resource provisioning very complex. What was the net gain? The correct solution depends on…

Last paragraph about essential and incidental complexity rings my ear about Rich Hickey's "Simple Made Easy" talk.

Talk: https://youtube.com/watch?v=SxdOUGdseq4

Re: Monoliths are not dinosaurs

#123
post #98
post #45

Earlier quoted context omitted.

If you can have a monolith for $500/month with a team of 2, or a distributed system for $50,000/month with a team of 50, what manager in their right mind would choose the former. Zero prestige in that.

Because we can't definitively prove which one is better. There is no formal theory around system design so you get people complaining about how monoliths are error prone and way too complex and you get people complaining about microservices with the exact same argument. The result is that with a period of about a decade the industry just oscillates between the two methodologies in an endless flat circle. Monoliths wi…

Yeah. I think what it boils down to is inexperienced developers and shortsighted product managers are capable of bad design choices in any paradigm. And handing them a new paradigm that's en vogue will all but guarantee they'll mess it up.

Perhaps the real crux is that large teams don't build good software. Especially not from the ground up.

Re: Monoliths are not dinosaurs

#124
post #84

Earlier quoted context omitted.

“we have 100 people so require 20 microservices”. More like 3 people requiring 13 microservices

I'm convinced that micro-service hell happens when the primary app calcifies and becomes too difficult to modify.

What are the specific decisions along this course of events? I guess nobody says "Our primary app has calcified and become too difficult to modify. Let's make microservice hell!"

But what do people say that leads down that road, in your experience?

Re: Monoliths are not dinosaurs

#125
> My rule of thumb has been that with every order of magnitude of growth you should revisit your architecture, and determine whether it can still support the next order level of growth.

The last hyper growth startup I worked at grew 10x in scale every 2-3 quarters for nearly 3 years at meaningfully large scale (millions of monthly transacting users). In that time, the number of different business-lines/categories and amount of functional flows and their intersecting/overlapping complexity also grew multiple folds.

So, we were adding whole new things and throwing away old things and basically refactoring everything every 18-months. Without knowing consciously, the superpower we had was our ability to refactor large live systems so well. In hindsight it became clear to me that our ability to do this hinged on a few different things:

1. A critical mass of engineers at both senior and junior levels understood the whole systems and flows end to end. A lot of engineers stayed with their own team developing strong functional-domain understanding. Similarly a good number of senior engineers rotated across teams.

2. The devops culture was extreme – every team (of 10-12 engineers) managed all aspects (dev-qa-ops-oncall etc) of building and operating their systems. This meant even very junior engineers were expected to know both functional and non-functional characteristics of their systems. Senior engineers (5-10 yr experience) were expected to evaluate new tech stacks and make choices for their team and live with the consequences.

3. Design proposals were openly shared and sought critical feedback. Technical peer reviews were rigorous. Engineers were genuinely curious to learn things, ask and understand things, challenge/debate things etc. Strong emphasis on first-principles thinking/reasoning and focusing on actual end-to-end problem-solving without being territorial or having dogmas was strongly encouraged and the opposite was strongly discouraged.

4. Doing live-migrations – we mastered the art of doing safe live migrations of services whose API schema or implementation was changing and of datastore whose schema or underlying tech was changing. We had a lot of different database tech migrations – from monolith SQL dbs, to NOSQL clusters to distributed SQL dbs and their equivalent in-memory dbs and caches.

Surprisingly, the things we didn't do so well but didn't really hurt our ability to refactor safely were:

1. Documentation – we had informal whiteboard diagrams photographed and stuck in wiki pages. We didn't have reams and reams of documentation.

2. Tests – we didn't have a formal and rigorous test coverage. We had end-to-end tests for load-testing and we had a small manual QA for doing end-to-end integration testing for critical flows. These came about a bit later – but trying to scale them effectively proved very challenging. But these were not seen as hurdles for doing refactors.

3. Formal architecture councils and formal approval processes – we didn't have these. Instead we had strong people to people connect and strong team level accountability – culturally people owned up their mistakes and do everything they could to fix things and do better next time. Humility was high.

Later, I worked at a large mature company with very large scale – and everything was exactly flipped on all the points above and any major refactors were a serious pain and migrations took forever and actually never completed. The contrast was very eye-opening and I realized in hindsight the above contributing factors.

Re: Monoliths are not dinosaurs

#126
post #106

HN could be a little less pessimistic. People aren't choosing microservices merely because of the hype. Here's why I'd choose microservices for a large project: 1. People don't produce uniform code quality. With microservices, the damage is often contained. 2. Every monolith is riddled with exceptional cases in a few years. Only a few people know about corner cases after a few years, and the company becomes dependent…

Yes! Finally! People keep making the assumption that going for Services/Microservices is merely technical. It’s almost all about people and organization.

Point 7 is the most important of the technical considerations: just make your services big enough to make sense as a separate unit and small enough to not be another unchangeable monolith. Yes, it’s not sane to have 300 Lambdas that add one number to another talking to each other over network, so just don’t do it.

Microservices the “Netflix way”, with the huge graph of services, gives a bad name to the idea of factoring out modules into independently deployable parts, which always made sense. Kubernetes just helps with deployment, but how coarse or fine you factor is on you.

Re: Monoliths are not dinosaurs

#127
The monolith/microservice dichotomy is a red herring.

What even is a microservice?

There are other distinctions, borders and splits that are more important to consider.

Here's a koan that highlights a few of these considerations:

> If you run a kubernetes cluster on a single physical server, is it a monolith or is it a microservice architecture?

Re: Monoliths are not dinosaurs

#128

Software would be 50% better if every developer understood Tesler's Law: "Complexity can neither be created nor destroyed, only moved somewhere else." The drive to simplify is virtuous, but often people are blind to the complexity that it adds. Okay, so your microservices are each very simple, but that made the interactions and resource provisioning very complex. What was the net gain? The correct solution depends on…

Both essential complexity and accidental complexity can be created or destroyed based on how functional scope or technical scope is defined and understood. In a live and evolving system, a lot of complexity is also because of not having a vision for how the product domain or market or ecosystem might evolve and having a coherent shared understanding of it amongst product managers and platform builders. When product direction flip-flops or technical choices flip-flops too widely, it creates lots of complexity lag/debt which can be very murky to clearly identify and attack.

Re: Monoliths are not dinosaurs

#129

I can’t believe it’s news that someone said this. I thought everyone understood: you don’t try to do microservices until you have to . Before you get to that point you make your monolith modular enough that if you ever need microservices you’re prepared to break them out.

A lot of people are focused on microservices as a way to address scaling (of load, team size, etc.) but there's other reasons to choose a microservice. A pretty basic one is when an existing microservice already does what you need and no suitable module or library exists. In that case, there's no "until". Start with a microservice. There's a number of open source projects that are pluggable microservices, for example.

Re: Monoliths are not dinosaurs

#130
post #106

HN could be a little less pessimistic. People aren't choosing microservices merely because of the hype. Here's why I'd choose microservices for a large project: 1. People don't produce uniform code quality. With microservices, the damage is often contained. 2. Every monolith is riddled with exceptional cases in a few years. Only a few people know about corner cases after a few years, and the company becomes dependent…

For "large projects" there are merits to microservices, but large projects are the exception - most projects aren't large. Unfortunately, a few years ago the consensus seemed to be that microservices should be applied to every project size, because they were always better - which generated so many problems.

The simplified view I hold is this: if your main problem isn't a lack of engineers, but how to split work between hundreds, or even thousands of engineers, then microservices make a lot of sense; that's true at FAANG and some other companies. If your main problem is how to get the maximum out of a limited number of engineers you can afford to hire, then microservices is not the solution. The latter is by far the most common case.

Post reply on HN