Readit News logoReadit News
hericium · 4 years ago
Microservices are a great way to promote cloud vendors' offerings and complicate IT life with over-engineered "standards" like Kubernetes.

Big corp wins while their customers create DevOps and other buzzword teams and the majority of IT world loses the capability to actually administer systems and becomes users addicted to ever-changing vendor offerings that complicate learning useful stuff outside.

orwin · 4 years ago
I'm working on an internal service that do not benefit being set up on kubernetes (it is basically a cronjob that runs everyday, collect data from every third party software, consolidate it and send it in a s3). It could be run on a small vm, deployed with ansible.

But i understand why, for streamligning purpose, we use kubernetes. It makes the networking "easier", and i feel it integrate better with other CI/CD tools than ansible. It is only a feeling since the ansible version i used to use was quite old, so i might be wrong.

hericium · 4 years ago
Sounds reasonable. Personally, I just try to stay away from k8s until it becomes a requirement. Until then simplest tools are often a good choice for building systems that require less maintenance. That's a per-project decision though.

You do not need Ansible for VMs provisioning - you can bake a VM image that will pull repos and do other preparation stuff. HashiCorp Packer[1] is an good tool for this imo. This applies to bare metal, too, as you can bake ISO or IMG the same way. Stuff that differentiates those systems can be set up with cloud-init or something similar.

Regarding Ansible, it didn't changed much over the years. At least nothing really major like statefulness.

But again, I'm not opposite to using Ansible when a project reasonably calls for it. Proper tool for configuring multiple systems with details generated for/by other systems, say multi-cloud HA provisions, clustering etc.

[1] https://www.packer.io/

DoneWithAllThat · 4 years ago
I’ve worked for decades now as both a developer and an SRE and have never once thought either “man I wish these microservices were monolithic” nor “man this monolith is so great I’m glad it’s not a collection of microservices”. These kinds of articles seem to be written for people who work in environments I’ve never even heard of let alone experienced.
ericbarrett · 4 years ago
I've seen the degenerate states of both extremes:

- a monolith with too many engineers contributing: no continuous deployment but rather "release day," which was a shitshow; said day was an extensive process where hundreds of engineers (anybody who was on git blame) had to be online and sitting by for four hours while it rolled; the release team often had to hand-revert bad patches; bullying of engineers who "broke the build" reached levels that would raise HR eyebrows; there were still often rollbacks and site breakages.

- microservice hell: there were often 2-3 APIs for the same service; platform engineering (for the protobuf RPC generation) had to support five different languages; security auditing was NP-hard; every team had its own release process; services that were still highly used were "deprecated" and left languishing for years until somebody took up the mantle and released their own parallel service that did nearly the same thing but with a different API, so now other services had to use both; etc.

"But that wouldn't happen at $my_company, we know the pitfalls and we'd never be that bad at engineering!" Sure...sure. That's what these companies said to themselves too :)

otagekki · 4 years ago
I have also known both albeit on a lesser scale.

At a company we as a dev team had to maintain a constellation of desktop applications and homemade ETL Airflow-like software that scaled really badly. For the time I'd been there I had managed to automate deployment almost totally on my own. Sadly it had been somewhat controversial as it was done at the expense of other development tasks (my manager agreed but not his nontechnical manager), and probably too late too. Before I had had enough grasp on the complicated context we had to deliver on a big project and needless to say it was a shitshow and we developers took basically all the blame, with pretty much nothing to say back.

The tech stack and code had been in a state of neglect for 8+ years but that was not an acceptable answer at that time, it seemed, and I'd only been there for 6 months when it happened.

On the other end of the spectrum, at the above's parent company, I had to maintain several major versions of an API on several cloud regions. Undocumented peculiarities regarding the object storage that was specific to one region caused a production incident that took the dev and support team 3 days to untangle and solve.

I have similar stories on monorepo vs. multirepo too

Dead Comment

DJBunnies · 4 years ago
I think that all the time.

Or more specifically, "I wish these services were a monolith so we could have better type checks/easier logging/debugging."

bluefirebrand · 4 years ago
"I wish these services were a monolith so there was any amount of discoverability at all, and I don't have to beg for time from busy people on other teams to help me use their undocumented APIs"
KronisLV · 4 years ago
When I'm forced to work with a monolith that has 4000+ source files and takes a few minutes to even start up, and has about 20 configuration files that all need to be setup properly for it to even start, I wish for microservices.

When I'm forced to work with microservices that need Skaffold and Helm charts just to run locally, but with the configuration in the monorepo being kind of mismanaged and strewn around a bunch of folders with no documentation, in addition to debugging in the IDE not working because nobody set it all up, I wish for monoliths.

Really, you can have good monolithic systems and you can have good microservices as well, in addition to something in the middle: https://blog.kronis.dev/articles/modulith-because-we-need-to... (actually the first blog post that I wrote, the casual language probably shows its age).

But there can also be plenty of poorly developed projects with either. It just so happens that people hate monoliths more in the mainstream culture because most of the older and worse projects out there were monolithic, much like many hate Java and other languages because of being exposed to bad legacy projects written in them: https://earthly.dev/blog/brown-green-language/

Just wait for 5-10 years and people's disposition towards both monoliths and microservices will even out, the advantages and disadvantages of either will become clearly recognized and the hype will shift towards something like serverless. Much like now we know the advantages and disadvantages of languages with/without GC as well as higher/lower abtraction levels pretty well (consider Python vs Rust, for example).

Maybe things will slow down a bit because Kubernetes will also become a bit easier to use, possibly thanks to projects like K3s, K0s, Portainer and Rancher.

barking_biscuit · 4 years ago
It turns out the secret is just not writing crappy software and having crappy processes. It turns out the caveat is that the conditional probability of those two things is vanishingly small, so regardless of monolith or microservices, most devs are exposed to crappy stuff and because their sample sizes are tiny they assume well we just did it wrong, when in fact they did it average and average is crappy for any and all architectures.
jnash · 4 years ago
Nothing stops microservices from having the same problems. Plus all the extra problems you get with distributed systems (timing issues, logical dependencies etc.)
throwaway894345 · 4 years ago
Same. I keep hearing that people have had bad experiences with microservices, but I'm not sure what those bad experiences are. I certainly don't relate to them. We had a monolith, and it devolved into a mess--managers would insist on people taking dependencies on stuff they didn't own in the name of expedience ("yeah, we'll totally circle back and do it the right way lol"). Microservices kept things neat by making dumb things hard. We were also able to deploy individual services much more frequently without needing to coordinate with a bunch of other teams, and builds, tests, etc were much faster helping shorten our iteration loops.

Local development environments were a bit more tedious in certain cases, but that was the only issue I recall.

willcipriano · 4 years ago
Microservices suck when you need to make a process faster, so you run a profiler and figure out that 90% of the workload is handling the http requests between the services.
anonymoushn · 4 years ago
At a multibillion dollar company, local development is impossible, staging doesn't exist, most stack traces from production are truncated because the log aggregator cannot handle log entries as large as java stack traces, and most of the work involves migrating from talking to the database to talking to a microservice that exposes a single table of the database. What are joins?

At another company that was acquired by Amazon, the "user service" team (so again this is a microservice that exposes a single table of a database, this time with a two-pizza team dedicated entirely to that microservice) told us that we couldn't just query the user service when we wanted to render a page containing a username given a user id, because that was too many queries. Product demands from a VP dictated that we didn't have time to set up our own caching layer for their service (is this the responsibility of every team other than theirs?), so we shipped the feature with the usernames saved in our own DB, and now when users change their usernames the old name will appear in the pages for our feature, depending on when the pages were created.

deterministic · 4 years ago
If you don’t have the skills to implement a well structured and easy to maintain monolith then you most definitely don’t have the skills to implement a distributed more complex implementation of the same system.
arinlen · 4 years ago
> Same. I keep hearing that people have had bad experiences with microservices, but I'm not sure what those bad experiences are. I certainly don't relate to them.

Likewise. When I see people complaining about microservices, more often what I see is actually poorly thought-through strawmen aimed at distributed systems, which boil down to "having to do network requests is bad".

I wonder why attacking the "microservices" buzzword gets these people on rage mode but the sight of a web app calling a dozen APIs somehow doesn't make them bat an eye.

mbrodersen · 4 years ago
A friend of mine is working on a 20 years old Microservices application. It is literally the worst piece of garbage system I have ever heard about. I am sure my friend would have loved for it to be a monolith instead of 50+ services with massively complicated distributed dependencies and timing issues.
nailer · 4 years ago
Really? You’ve never seen an over-engineered microservices design that could be a much simpler express app?
fud101 · 4 years ago
What is an express app?
honkycat · 4 years ago
There are a lot of small shops who aren't dealing with scale, and assume that what works for them works for everyone.

Personally, I think micro-services should be approached very carefully but I understand the idea of them.

jnash · 4 years ago
Companies like Jane Street use Monoliths to handle millions of transactions per second. How many transactions per second do you have?
atleta · 4 years ago
It still depends on the organization size (or the size of the user base, or the complexity of the product). So you may only have experience with services where it was the right choice.

I did see two instances where it wasn't. (I mainly work with/for small companies, startups.) In one instance I was called in as a tech lead/expert for a small startup having a kind of a product/software crisis. They've been working on their service for a year or too (yes, way too long) and 2-3 months before the planned release at some random conference (Slush, TNW or whatnot) one of the developers figured out that the whole codebase was a piece of shit and there was no way they could be ready in time, but they should rewrite it as a collection of node microservices and that could work. The monolith they had was PHP, just to add to the fun, so switching over would mean switching languages too.

The guy, he was a smart and motivated chap, even started implementing one service in his free time, the user registration/user handling I think (the least important and least complex one, of course) which somehow screwed up the monotlith and made it start crashing. (Or so they said, I don't know what was up with that.)

Obviously, it was a 100% stupid idea and we went on with fixing their development process (starting to do scrum and teaching the stakeholders that they need to stop phoning the developers directly and asking for features, fixes, introducing automated testing, etc.) Oh, and it was a team of 2-2.5 people. (With the group manager doing some backend work too, but also managing another, totally unrelated project for another client.)

The other one was a bit different story, where I just shared my insights over a call. A guy I've known took over a project that was built by a small team (2-5 people, can't remember) for a startup and wanted some external opinion for himself and the founder. That one was built as a set of microservices but they did have all kinds of stability issues. The idea was that it had to be very-very-super scalable. Because, you know you launch and they will come and there's nothing worse than not being able to handle the load. Except, there is: they had been building the thing for over 2 years back then.

It was an online medical consultation solution (you describe your problem, pick a doctor, do a f2f call and pay by the time). The funny thing is that I've built a very similar system, as a startup cofounder, 3-4 years earlier for psychology consultation with the help of 2 other guys, who didn't even work full time (one of them came after the first one quit). The MVP was up in, I think, 2 maybe 3 months. Ours was a monolith-ish thing and theirs definitely looked better, maybe scaled better and would have been cheaper to operate at scale (we used an external service for the video calls). But ours was a lot cheaper to build and launch and we could test (validate) our solution a lot earlier with real customers.

If it worked out, we could have started breaking it down into multiple services as/if/when needed.

arinlen · 4 years ago
> (...) The monolith they had was PHP, just to add to the fun, so switching over would mean switching languages too.

Why do you feel this is relevant, let alone detrimental to the idea of microservices? It looks to me that it's one of the primary positive traits.

> The guy, he was a smart and motivated chap, even started implementing one service in his free time (...) which somehow screwed up the monotlith and made it start crashing.

This statement makes no sense at all.

> Obviously, it was a 100% stupid idea (...)

I saw no stupid idea in any of your statements.

You stated the legacy codebase was crap, and that a team member took up to himself to do the strangler's vine thing and gradually peel responsibilities out of the monolith. What leads you to believe this is stupid?

taude · 4 years ago
I'd love to see more of these "you don't need microservices' type of articles be more prescriptive on when you might need them. 20 product scrum teams? 10 different team? Certain functional team separate (like you have a data infra team, search, payment processing)?

I always can't help but to think most of these articles are written by engineers working at 30 people startups or something. And there's definitely a lot of org-size and structure between the startup and a faang-sized tech giant.

Sevii · 4 years ago
I worked on a SOA setup and we hit the inflection point somewhere around 50-100 devs contributing code to the service. Honestly, we should have taken splitting up the service more seriously earlier.
blowski · 4 years ago
I’d argue bashing microsevices is more in vogue than microservices themselves. They’ve reached that point on the hype cycle where you can get a whole bunch of likes by saying “microservices bad amirite?!”
foobiekr · 4 years ago
Most of the real world "microservices" usage outside of FAANG has been to legitimize polyglot development (a net negative for most organizations) and the to create heretofore unseen levels of Conway's law. A microservice per person? Sure, why not?

It's madness. The solution is to avoid the polyglot issue by fiat and to ensure that there is some actual planning and rationale around when it makes sense to add a service. Most groups I've talked to don't even have a good answer to "why is this in a separate service from that?" when asked, and I've talked to a lot of them.

blowski · 4 years ago
I agree. There’s a whole cohort that seems to think you should introduce IO between every function call. But they’re not “managing complexity”, they’re just shifting it into the operational layer, where it’s harder and more expensive to run, debug, secure, etc.
anonymoushn · 4 years ago
A crypto exchange has bragged about having 30ish microservices per engineer. It's pretty wild.
smrtinsert · 4 years ago
I'd love a number attached to that "most"
monksy · 4 years ago
They're irrationally thrown up there as a silver bullet and people are heavily criticised when people suggest non-monolith+microservice alternatives.
tomlin · 4 years ago
That wasn't the argument that was being made. Do you have commentary on the content of the article, or just that you don't like that he had a non-party line opinion?
blowski · 4 years ago
Nothing in the article is fresh news. Sam Newman made many of these same points himself in his 2015 book on microservices.

The article does _not_ discuss why engineering teams ignore that advice.

Companies see microservices as a silver bullet for solving complexity. Inexperienced engineers attracted to shiny things jump on the bandwagon. Vendors sell tooling to deal with the new complexity. But in that case, if it wasn’t microservices, it would be OOP, FP, SPAs, RPC, RDBMS, NoSQL, etc. The problem is the hype cycle. Over-use of microservices is only a symptom.

jnash · 4 years ago
Yep because it is true. Microservices is just the latest "Silver Bullet" that inexperienced developers think will save themselves from doing bad work. The reality is that microservices is inherently more complex than monoliths. So the more you can discourage developers from making that mistake the better.
atleta · 4 years ago
Which is a good thing, since microservices were way overhyped from the beginning. Now bashing too hard wouldn't be good either, but fortunately, the organizations that need it will be technologically mature enough to be able to ignore the current hype.

Whereas when microservices were overhyped, they were introduced into orgs/companies that didn't have the brain power/experience to implement these properly or just to be able to say an informed no.

dfbsdfbwe2ef2e · 4 years ago
That's true for all ideas.

A lot of people, especially smart people, like going "everyone says X, I'm going to try to appear smart by arguing not-X".

And that's how you end up with people in the west going "Russia is the victim of the war in Ukraine! Nato encroachment!", or "they haven't tested the vaccines!"

blowski · 4 years ago
I’d argue that’s being contrarian - taking an opposing stance just for attention seeking.

This is more like “the trough of disillusionment” on the hype cycle. You’ve suffered so much at the hands of microservices, you want to convince everyone else not to use them. Lots of others have suffered similarly, so thanks to confirmation bias, your post gets lots of likes based on the sentiment.

nailer · 4 years ago
That haven’t tested the vaccines. That’s why there’s emergency use laws.
kristopolous · 4 years ago
Some people will make an incoherent mess out of anything.

A garbled knot of interdependent microservices with timing issues, bad extensibility, and unpredictable flow.

An ornate matroyshka set of wrapper functions calling each other spreading over multiple directories making any modification a large error prone effort.

Event systems, probably multiple, without any real difference between just a function call other than your debugger getting very confused by it.

Database schemas with table names that exude the narcissism of small differences with nitpicky rules that make it explode if any flexibility is demanded

Aws bill that's 10x more than any reasonable expectation given the problem set.

An object oriented design that looks like some kind of fetishized exercise of every feature possible, where defects cascade to action at a distance and unintended consequences with tight coupling that can't be extricated leading to a rewrite, just like it did last time

They are the people who create the waterfall of dozens of levels of div tags for no functional reason other than to accommodate their incompetency

They are the ones that want to pollute your entire day with needless meetings over irrelevant things that will not be acted upon.

Of course there's no useful comments or tests or documentation. The git comment messages are single words like "fix" and "rewrite". There's no versions in the deploy or a reasonable approach to logging that allows a successful audit and the thing is too state dependent to reproduce bugs.

Then there's dependencies, loads of them just picked seemingly at random, written by people who think like them with the same disregard for documentation, compatibility or testing. But they have very pretty websites which says they're painless, simple and easy, so I guess it's all ok right?

The problem with microservices is the same problem with anything else and changing paradigms won't fix it. The approach needs to change, not the technique. It's a different kind of budo.

jsargiot · 4 years ago
Amen!
johnthescott · 4 years ago
bravo
softwarebeware · 4 years ago
"You don't need" anything. You can walk to New York from San Francisco. But of course you'd rather fly. You may settle for driving.

The power of a concept isn't in the need but in how well it optimizes the process.

api · 4 years ago
One of the benefits of being in this industry for a while is that you learn to spot and avoid fads. You even learn classes of fads.

Microservices instantly looked like a fad. Two classes of fad apply. One is a "move stuff around and complexity will magically go away" fallacy fad. The other is a "way to promote vendor lock-in or higher cost" fad.

Other major classes of fads are: consultant self promotion fads, re-invention fads of all kinds in which devs speed run the history of some aspect of computing to arrive at the same place, magic pixie dust fads where sprinkling some buzzword on things makes everything better, management "methodology" panacea fads, etc.

Avoiding fads is a superpower. It tends to save a whole lot of money and wasted time.

The test of whether something is a fad is whether it reduces incidental complexity, enables something categorically new, or genuinely boosts developer velocity.

Incidental complexity is the complexity that creeps into our designs that is not essential to the problem but an artifact of how we got there or some prior limitation in how things are done. A genuine innovation will make incidental complexity actually go away, but not by pretending that essential complexity doesn't exist.

A categorically new thing would be e.g. deep learning or an actually practical and useful provably-safe language (Rust).

Boosting developer velocity means actually speeding up time to ship without doing so by adding a ton of technical debt or making the product suck.

If something doesn't do at least one of those things well, it's a fad.

tomtheelder · 4 years ago
Microservices are very much not a fad, and they aren't even that new of a concept. They have just gotten more attention recently, and have probably been over-adopted a little bit.

In the right circumstances, a microservices architecture can absolutely boost developer velocity. You can reduce development/mental model complexity, reduce blocking internal dependencies, increase performance of tooling and deployment, and allow more consistent and less risky deployments. There are certainly costs: infrastructural complexity, a new network boundary between services, increased risk of techincal/product drift.

For orgs where the benefits outweigh the costs, due to scale/org structure/perf concerns/etc it can be an enormous win for velocity. For other orgs it can be a huge velocity killer. It just depends.

api · 4 years ago
The same advantages can be achieved by separating things into libraries or discrete packages.

Microservices just takes that and spreads it around a K8S cluster using gRPC or RESTful JSON or some other RPC bus for all the various modules to talk to each other, consuming far more compute resources and helping increase atmospheric CO2 and make cloud vendors rich. Why is calling a library running in a separate task (possibly on a separate CPU) via gRPC a better approach to code modularity?

The only time this makes sense is when you are (1) totally huge and (2) have specific hot regions of your service that you want to autoscale relative to the rest of the service.

Incremental upgrades can be achieved by just incrementally cycling your service, no microservices needed. Doing so when only some modules change can be achieved with CI without the crazy runtime overhead.

jnash · 4 years ago
Everything you claim is unproven and pure speculation. However what is proven to be true is that thousands of developers all over the world can effectively work on massive monoliths (like Linux and Windows) without using microservices.
msaspence · 4 years ago
> "move stuff around and complexity will magically go away" fallacy

This is a great description of microservices

anonymoushn · 4 years ago
> actually practical and useful provably-safe language (Rust).

You can have spatial and temporal memory safety by writing single threaded code in any GC language.

revskill · 4 years ago
Microservice is to manage junior level programmers who don't know how to make loosely coupling architecture. That's it. Because your job is to manage low quality code produced by junior devs, you need to use microservice to prevent bad code to break the monothlic.

Edit: For more context, this opinion is more about "the art of developer management", not much about infra, security, scalability stuff

tomtheelder · 4 years ago
Firmly disagree. Microservices get you very little in terms of code quality enforcement past what you would get with a well modularized monolith, and they introduce a lot of code quality & architectural pitfalls. I think going microservices to enforce boundaries and decoupling is a very bad idea that will create far more trouble than its worth. I'd be a lot more scared of my junior devs committing code to microservices than to a decently organized monolith.

I would only seriously consider a move to microservices for deployment/perf reasons.

revskill · 4 years ago
You might misunderstand the point here.

It's about how to keep the velocity without firing junior dev, without removing bad code from the production system.

So microservice is a leadership tool to manage it. Keep it in control.

vasergen · 4 years ago
Micro-services also good when an organization has a numbers of teams with different domains and release cycles, at some point it would be easier to spit code in some ways and have a boundaries. In this case splitting to services/micro-services creates those boundaries on a network level.
jacquesm · 4 years ago
Just 'services' will do. A couple of them tied together with a single front is >> a monolith.
jnash · 4 years ago
There is this much simpler advanced technology that can be used instead that has been around for 50+ years: it's called libraries/modules. It works. Linux is a collection of thousands of libraries. Windows is a collection of thousands of libraries as well. Linux and Windows are way bigger than pretty much any other software out there. So I am sure this advanced technology is good enough to handle whatever you and most other devs are working on.
mirekrusin · 4 years ago
Why micro-?
throwaway894345 · 4 years ago
Code quality is only one reason to use microservices; deployment frequency is another (you want people to be able to deploy their service without needing to coordinate with every other service in the system).

Moreover, code quality isn't just encumbered by junior devs--in fact, in my experience it's more often managers pressuring developers to take shortcuts (e.g., taking a dependency on another system's private internals in the name of expedience, while swearing up and down that we will totally clean it up in a future iteration) or other organizational hurdles that make it difficult/impossible to fix it the right way, so shortcuts are taken instead (with microservices, the organization has to confront those issues, they can't be easily papered over by bypassing official interfaces).

Another reason to prefer microservices is security--not putting every secret in a single process's memory space is a great way to minimize blast radius if a service is compromised.

Another reason is reliability--if one system has a catastrophic failure mode, it won't take out all other systems. Of course, if the failing system is a core service, then it may not matter, but at least you're not bringing everything down when some service on the architectural periphery goes haywire.

jnash · 4 years ago
Nothing you say can't be accomplished by using libraries instead. The largest software on earth (Linux/Windows/...) is created by composing thousands of libraries into a single system. With thousands of developers contributing from all over the world. It works. It's proven.
msaspence · 4 years ago
I love the idea of "managing junior level programmers who don't know how to make loosely coupling architecture" as describing engineering leadership, regardless of how cynical it is.

I do question how microservices manage that, though? Tightly coupled microservices ie "the distributed monolith", are a still real danger for teams that don't have enough engineers that know "know how to make loosely coupling architecture"

revskill · 4 years ago
Yes, we have a term for that: Technical debts!

The reality is like this: You have a critical system that ran for ages, and now what will you do to scale the features ? By allowing/teaching junior devs to understand how to contribute to the codebase ?

There's a simpler way to do that efficiently: Extract a subdomain into its own microservice and you control the interface. Then even that microservice has bad code quality (tech debt), your business is still running fine!

Problem solved.

ripberge · 4 years ago
Adding in a machine boundary does not guarantee loose coupling. If a dev does not have the skills to make a loosely coupled monolith, how they can they suddenly have the skills to make a collection of loosely coupled services running on more machines? That same low skilled dev is going to have to deal with a lot of other complexities now...
revskill · 4 years ago
The point is, to keep the sprint in velocity, let's just keep the bad code (tech debt), but make sure it won't break the quality of original system. By extracting "bad parts" into its own system, you can manage it efficiently.
awinder · 4 years ago
I would think that junior level developers are usually walking into an architecture put together by leads/seniors? Juniors should be coming into a well-architected monolith that they can be productive in, if they can’t that’s kinda on the senior staff…
jnash · 4 years ago
I have 15+ years of management experience and I have never ever had a problem managing developers at all skill level. You can't solve management issues with technology. You solve it with people skills. I sincerely hope you are not and have never been a manager. There are already enough arrogant and incompetent managers out there.