Vor- und Nachteile
- Bessere Selbstorganisation von großen Teams, passend zur Organisationsstruktur (Conway's Law) → Cross-funktionale Teams
- Feingranulare horizontale Skalierbarkeit, ggf. auch automatisch
- Schnelleres Deployment von Änderungen (aufgrund der kleinen Deployment-Einheiten)
- Optimiert für Ersetzbarkeit (Neuentwicklung eines Microservices ist vergleichsweise günstig)
- Technologie-Heterogenität (Polyglot Sprachen und Persistenz) → nutze die Technologie, welche für das jeweilige Problem am besten geeignet ist
- Fault-isolation und Widerstandsfähigkeit (u.a. mithilfe von "Circuit Breakers")
- Einfacher zu handhaben, da kein verteiltes System und weniger operativer Aufwand nötig
- Einfacher zu verstehen
- Strong Consistency möglich
- Bessere Performance und Energieeffizienz bei Szenarien, die kein dynamisches Skalierungsverhalten erfordern.
Entscheidung wie treffen?
Neues Projekt? → Monolith
Ein kleines Team? → Monolith
Skalierung- und Performance-Anforderungen linear? → Monolith
Microservices können nur dann potentiell sinnvoll sein, wenn ein großes, heterogenes System mit unterschiedlichen Skalierungsanforderungen benötigt wird.
Skalierungsanforderung
Death By a Thousand Microservices
@renegadeotter.com
@Omnivore
Highlights
Death By a Thousand Microservices
⤴
There is no standard tooling for microservices-based development - there is no common framework. Working on distributed systems has gotten only marginally easier in 2020s. The Dockers and the Kuberneteses of the world did not magically take away the inherent complexity of a distributed setup.
Death By a Thousand Microservices
⤴
The auditrevealed an interesting pattern, where many startups experienced a sort of collective imposter syndromewhile building straight-forward, simple, performant systems. There is a stigma attached to not starting out with microservices on day one - no matter the problem. “Everyone is doing microservices, yet we have a single Django monolith maintained by just a few engineers, and a MySQL instance - what are we doing wrong?”. The answer is almost always “nothing”.
Death By a Thousand Microservices
⤴
It’s a simple question - what problem are you solving? Is it scale? How do you know how to break it all up for scale and performance? Do you have enough data to show what needs to be a separate service and why?
Death By a Thousand Microservices
⤴
The truth is that most companies will never reach the massive size that will actually require building a true distributed system. Cosplaying Amazon and Google - without their scale, expertise, and endless resources - is very likely just an egregious waste of money and time. Religiously following all the steps from an article called “Ten morning habits of very successful people” is not going to make you a billionaire.
Death By a Thousand Microservices
⤴
.
90 % aller Organisationen würden mit einem monolithischen System besser fahren als mit Microservices.
Death By a Thousand Microservices
⤴
After decades of teaching developers to write Don’t Repeat Yourself code, it seems we just stopped talking about it altogether. Microservices by default are not DRY, with every service stuffed with redundant boilerplate.
Death By a Thousand Microservices
⤴
“Developer ergonomics” is the friction, the amount of effort a developer must go through in order to get something done, be it working on a new feature or resolving a bug.
With microservices, an engineer has to have a mental map of the entire system in order to know what services to bring up for any particular task, what teams to talk to, whom to talk to, and what about. The “you have to know everything before doing anything” principle. How do you keep on top of it? Spotify, a multi-billion dollar company, spent probably not negligible internal resources to build Backstage, software for cataloging its endless systems and services.
Death By a Thousand Microservices
⤴
Integration testing a distributed setup is a nearly-impossible problem, so we pretty much gave up on that and replaced it with another one - Observability. Just like “microservices” are the new “distributed systems”, “observability” is the new “debugging in production”.
Death By a Thousand Microservices
⤴
Why do your services need to be “micro”? What’s wrong withjust services? Some startups have gone as far as create a service for each function, and yes, “isn’t that just like Lambda” is a valid question. This gives you an idea of how far gone this unchecked cargo cult is.
Death By a Thousand Microservices
⤴
So what do we do? Starting with a monolithis one obvious choice. A pattern that could also work in many instances is “trunk & branches”, where the main “meat and potatoes” monolith is helped by “branch” services. A branch service can be one that takes care of a clearly-identifiable and separately-scalable load. A CPU-hungry Image-Resizing Service makes way more sense than a User Registration Service. Or do you get so many registrations per second that it requires independent horizontal scaling?
Death By a Thousand Microservices
⤴
Probleme von verteilen Systemen
Risks and Challenges of the Microservices Architecture Style
Studies:
Vergleich Energieverbrauch
Microservices → Monolith
Amazon Prime Video
Scaling up the Prime Video audio/video monitoring service and reducing costs by 90% - Prime Video Tech
Even Amazon can't make sense of serverless or microservices
We’re gonna break [the monolith] up and somehow find the engineering discipline we never had in the first place... Now you went from writing bad code to building bad infrastructure.
— Kelsey Hightower
Monoliths are not dinosaurs | All Things Distributed
Building evolvable software systems is a strategy, not a religion. And revisiting your architectures with an open mind is a must.
Istio
Istio as an Example of When Not to Do Microservices – Software Blog
Segment
Goodbye Microservices: From 100s of problem children to 1 superstar
Monoliths, Microservices, and Containers. Oh my!
Bekannte monolithische Applikationen
See Monolith#Impressive monolith applications.