Live data from Hacker News

Monoliths are not dinosaurs

allthingsdistributed.com

231–240 of 243 posts

Re: Monoliths are not dinosaurs

#231
post #76

Earlier quoted context omitted.

reminds me of that law: "For something to get clean, something else must get dirty" and the corollary: "You can get something dirty without getting anything clean"

How does that apply here? (I’m not being facetious)

I was sort of thinking along the lines of...

You must remove complexity to make understandable code.

You can remove complexity without making anything understandable.

Re: Monoliths are not dinosaurs

#232

Earlier quoted context omitted.

Or... if you're working in an organization that already has a Microservice based infrastructure in place. Otherwise, I generally agree... I'll usually take a monolith approach and break things off in ways that make sense. Usually starting with long running processes that can simply be workers off of queues. Sometimes potential bottlenecks that have higher compute overhead, such as passphrase hashing and comparison wh…

Isn’t something paraphrase hashing something that should be heavily rate limited? In order to DoS your typical site through passphrase hashing you would need to be: - have a ton of valid usernames/emails of accounts that need to be checked (because a typical password check will rate limit by account) - send in a massive torrent of traffic from a ton of IP addresses (because a typical password check will be rate limit…

Correct microservices don't magically prevent DDOS attacks. They can actually make things much worse.

Re: Monoliths are not dinosaurs

#233
post #184
post #120

A good rule of thumb is that if you’re starting a new project and immediately implement microservices, you’ve already failed. Never seen it work, don’t think I ever will. The only way microservices can ever work is if they’re extracted over time as the monolith gets fleshed out, likely over the course of years. And even they’re probably a bad idea.

I've never done it myself, but it seems startups are succesfully deploying using for example auth0. Outsourcing auth like that is using microservices right?

That's a different thing really. It's like using sendgrid.

Re: Monoliths are not dinosaurs

#234

Earlier quoted context omitted.

But you can make a "new service" in code in the same binary communicating through memory. You can then separate it to a separate binary, when the network and serialisation overhead worth it. 80% of the time it will never come.

Microservices are not only "function calls over TCP" though. There are other concerns such as database per service vs a single shared database. There are also security implications that you don't have with a monolity. Designing it that way from the beginning could easily be as complicated as making them separate services.

I wouldn't call that microservices.

Re: Monoliths are not dinosaurs

#235

Earlier quoted context omitted.

tldr: Microservices trade design complexity with operational complexity , to address the shortcomings & patterns of the modern IT sector, at both worker and management levels. This was an excellent choice for consulting (companies like ThoughtWorks, who were pushing microservices) as it optimized their workflows and bottom line: the answer to every client's question of "what's the architecture?" was "Microservices".…

I would argue Microservices trade 100% design complexity with 100% operational complexity and 20% design complexity. Everytime I saw a microserviced design, I always wondered how would they debug this easily and re-operationalize it. Sometimes it is better to let the entire system die and spawn it back instead of having something running to make it look like it's alive.

Or more than 20%.

Re: Monoliths are not dinosaurs

#236
post #40
post #34

Earlier quoted context omitted.

Now that PHP has lost its massive deployment advantage, step up to Rails or Python.

I hear about Python all the time. Rarely hear about Rails now. I think the world picked one over the other.

GitHub & Shopify both run substantially on Rails.

Re: Monoliths are not dinosaurs

#237
post #214

Earlier quoted context omitted.

Sure but there's still limits such as the binary size and working memory etc

Could you give a concrete example from your experience? I ask because in my experience, services have had a relatively small (say less than a few hundred GB) fixed working memory usage, and the rest scales with utilisation meaning it would help to spawn additional processes. In other words, it sounds like you're speaking of a case where all services together consume terabytes of memory irrespective of utilisation, bu…

Let's imagine Facebook, we can partition the monolith by user, but you would need the entire code base (50+ million lines?) running in each process just in case a user wants to access that functionality. I'm not saying one can't build a billion dollar business using a monolith, but at some point the limit of what a single process can host might become a problem.

Re: Monoliths are not dinosaurs

#238
post #214

Earlier quoted context omitted.

Could you give a concrete example from your experience? I ask because in my experience, services have had a relatively small (say less than a few hundred GB) fixed working memory usage, and the rest scales with utilisation meaning it would help to spawn additional processes. In other words, it sounds like you're speaking of a case where all services together consume terabytes of memory irrespective of utilisation, bu…

Let's imagine Facebook, we can partition the monolith by user, but you would need the entire code base (50+ million lines?) running in each process just in case a user wants to access that functionality. I'm not saying one can't build a billion dollar business using a monolith, but at some point the limit of what a single process can host might become a problem.

Things like Facebook and Google are at a level of scale where they need to do things entirely differently form everyone else though. e.g. for most companies, you'll get better database performance with monotonic keys so that work is usually hitting the same pages. Once you reach a certain size (which very few companies/products do), you want the opposite so that none of your nodes get too hot/become a bottleneck. Unless you're at one of the largest companies, many of the things they do are the opposite of what you should be doing.

Re: Monoliths are not dinosaurs

#239
post #229
post #217

Earlier quoted context omitted.

> So it is very likely for a tornado to reconfigure things into debris and extremely extremely unlikely for the tornado to reconfigure everything into a brand new car. Is this not a linguistic sleight of hand? There are billions of trillions of states we label with "debris" but only a few thousand we would call "car". So a specific state of debris, then, is equal in complexity to a car?

The technical term for this is macrostate. It is not a linguistic sleight of hand. It is literally within the formal definition entropy. Debris is a high entropy macrostate, while a car occupies a lower entropy macrostate. There are less possible atomic configurations for cars then their is for debris. Each of these individual configurations of atoms is called a microstate. A macrostate is a collection of microstates…

> There are less possible atomic configurations for cars then their is for debris.

That doesn't really line up logically. :/

Re: Monoliths are not dinosaurs

#240
post #229

Earlier quoted context omitted.

The technical term for this is macrostate. It is not a linguistic sleight of hand. It is literally within the formal definition entropy. Debris is a high entropy macrostate, while a car occupies a lower entropy macrostate. There are less possible atomic configurations for cars then their is for debris. Each of these individual configurations of atoms is called a microstate. A macrostate is a collection of microstates…

> There are less possible atomic configurations for cars then their is for debris. That doesn't really line up logically. :/

You're mistaken and you're intuition is off. It lines up absolutely.

Debris is almost any configuration of atoms that are considered trash or unusable.

There's are much more ways you can configure atoms to form useless trash then you can to make cars. Case in point "you" can manufacture "debris" or "trash" by throwing something into a trash can. Simple.

When's the last time you manufactured a car? Never.

Post reply on HN