10 ms·
> 1. Almost all the successful microservice stories have started with a monolith that got too big and was broken up. This is pure survivor bias. The majority -
by wellpast 11y ago
> 1. Almost all the successful microservice stories have started with a monolith that got too big and was broken up.
This is pure survivor bias. The majority -- by far -- of 'failure stories' I know of in the software industry are ones in which a company tried to take their monolithic code base and modularize or microservice-ize it.
> 2. Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble.
This is not because microservices-first is inherently flawed. This is purely a skill set issue. Microservices demand a greater skill set. A 'monolithic' approach puts much less of a demand on the engineer's skill set.
For a simplistic but illuminative example, if all you know how to do is build systems that operate on global mutable state (most newbie programmers), then of course you will run a lot further in a monolith than if you are trying to do this in a microservices pardigm.
This is a simplistic example because effective use of microservices requires much more of a skill set than not using global variables. The truth is that effective use of microservices (knowing how to build architecturally sound software) is way beyond the reach of MOST smart, senior level engineers that I've met in my career. If this sounds arrogant, it's not; there's a definitive architectural skill set that CAN BE LEARNED but that is missing from most software practitioners. (Our industry/academies need to learn how to teach it.)
This is the elephant in the room in our industry--and why we spin so many wheels talking about everything else. All of the energy we spend talking about patterns, processes, languages, etc etc do so much less for our industry than if we trained our practitioners in how to construct architecturally sound software systems.
- duggan 11y ago> This is not because microservices-first is inherently flawed. This is purely a skill set issue. Microservices demand a greater skill set. A 'monolithic' approach puts much less of a demand on the engineer's skill set. > The truth is that effective use of microservices (knowing how to build architecturally sound software) is way beyond the reach of MOST smart, senior level engineers that I've met in my career. If this sounds arrogant, it's not; there's a definitive architectural skill set that CAN BE LEARNED but that is missing from most software practitioners. If this skill set exists, and almost nobody can or does possess it, then your argument is purely semantic. Who cares if there's an ivory tower of geniuses out there spinning out perfectly formed microservice architectures in novel domains? We're talking about rules of thumb for practitioners here, not laws of physics.
- dropit_sphere 11y agoI had the same thought, but the argument has relevance if you accept that said skill set can be acquired (which, I do).
- wellpast 11y agoI never said genius. And "perfectly formed" is not the objective. Tractability is. Go visit companies with medium-sized codebases and find me one that isn't lamenting how difficult it is to grow and maintain it. I wouldn't consider myself that smart. But I have spent 20 years in this industry with what some might call a sick obsession for understanding how to compose and evolve systems and I've acquired some skills that I believe (1) very much matter to our productivity; and (2) can be mentored and taught, but (3) are not being taught. My guess is that academy can't teach it because they don't have enough real-world experience behind their pedagogy. And industry can't teach it because it takes quite a while to learn and master -- and what business can afford to do that with their juniors who are just going to leave them in a few years anyway :)
- johnmaguire2013 11y agoStart teaching it then?
- duggan 11y agoI've certainly never worked for a company that did not have a laundry list of complaints about its software, all reasonably successful ones too. And it usually only takes a couple of beers to draw the same laments from people working in the sort of companies a lot of developers aspire to. If you think you've acquired a teachable, repeatable set of skills that aren't being taught then it sounds like you've got a gold mine on your hands :) As a relative industry junior (about 10 years) I haven't been introduced to a codebase that wasn't lousy. Certainly all were lousy to one degree or another when I left them, but they served customers all while drawing down the ire of developers (including myself).
- wellpast 11y ago
- karmajunkie 11y ago> This is not because microservices-first is inherently flawed. This is purely a skill set issue. Microservices demand a greater skill set. A 'monolithic' approach puts much less of a demand on the engineer's skill set. Its not purely a skillset issue. Its a domain discovery issue, which Fowler mentioned as boundary discovery. Most startups are inventing their own domain in whole or in part; as the business changes, either the "domain" changes with it, they segment and focus their efforts on part of the domain, or they invent a new set of domain concepts. Evolving an application is often difficult when everything is Just Right. When its not, and you throw into the mix artificial boundaries that have arisen from incomplete, incorrect, or evolving analysis, the job is going to become much, much harder.
- wellpast 11y agoYou are saying that you cannot have an architecturally sound software system when you do not fully know your domain. This is a fallacy. In fact, architectural soundness makes it MUCH easier (tractable) to grow your system in the face of changing your domain.
- karmajunkie 11y agoThat's not what I'm saying at all. You seem to be jumping to an assumption that all architectures are created equally at all points along the knowledge graph, or alternatively that a microservice architecture is fundamentally better than a monolithic architecture, and neither interpretation of that is true.
- dasil003 11y agoHow is it easier to change a service interface than an API within a single app? The former requires a specification and tooling around serialization/deserialization to have any meaningful guarantee of correctness, it requires error handling to reap the benefits of decoupling, the latter can be covered with a unit test. I'm sorry but this is pure hype to say that microservices make refactoring easier: that is true if and only if your boundaries stay static. It is a huge assumption that anyone can draw those boundaries correctly for a large microservices architecture in its infancy.
- facepalm 11y agoIf such a rare skillset is required, doesn't that kind of imply that the risk of failure is greater when choosing Microservices?
- wellpast 11y agoYes.
- exelius 11y ago> This is pure survivor bias. The majority -- by far -- of 'failure stories' I know of in the software industry are ones in which a company tried to take their monolithic code base and modularize or microservice-ize it. In my experience, this happens when a dev team has built a product but customers aren't flowing in. If they had customers, they wouldn't have time to fiddle with their architecture unless it was a growth-limiting problem. But the real problem ultimately is customer acquisition, not that they had to rearchitect the app. > This is not because microservices-first is inherently flawed. This is purely a skill set issue. Microservices demand a greater skill set. A 'monolithic' approach puts much less of a demand on the engineer's skill set. I disagree. I don't think "microservices-first" is inherently flawed, I think it's just really hard to know how you need to break apart your services in a way that seems logical to customers. It's less about good/bad architectural design skills (though I agree, that is a problem) and more about engineers being really awful at predicting demand. But microservices are not a panacea that fixes everything on their own. You have to think about the entire deployment stack, from the hardware up. This means things like VM orchestration, network/load balancers/firewalls, configuration management, etc. that you don't have to worry about as much or as often with a monolithic application. Microservices optimize flexibility because they can be deployed in the widest variety of ways, but they do induce management overhead that is unnecessary in a lot of cases. Besides, splitting out an app to a microservice architecture usually isn't that hard. I've architected this 3 or 4 times in the last year alone -- you use a proxy to break the traffic off to a different deployment endpoint and split the code up later. This assumes your monolithic app is stateless and using a separate persistence layer, but that's just basic software design.
- balls187 11y ago> This is pure survivor bias. The majority -- by far -- of 'failure stories' I know of in the software industry are ones in which a company tried to take their monolithic code base and modularize or microservice-ize it. Interesting. I thought that the #1 reason why startups fail is because they run out of business, not because they couldn't modularize.
- zwischenzug 11y agoI believe the OP's talking about high-level software project architecture failure, not commercial failure.
- wellpast 11y agoThank you, exactly. But the fact that a lot of companies attempt to decopule their monoliths should make it very clear how much unsound architectures hurt us. Business make these grand attempts because of the intense amount of pain their monoliths cause them. (They thought they had a software asset; when in reality it's becoem a liability.)
- zwischenzug 11y agoIn my experience, they've done it because they've been sold a microservices dream that has nothing to do with commercial success.
- crdoconnor 11y agoMicroservices aren't particularly hard to build, but they are brittle as hell. The serialization/deserialization layer adds potential for bugs. The massively increased number of services all need constant monitoring. The massively multiplied error conditions (what happens when service 37 talks to 39 and 39 times out?) need to be accounted for and those edge cases must be ironed out. There would be nothing particularly wrong with doing all of this if you gained something great by doing it, but you don't. You get fuck all except migraines caused by the brittleness of your app.
- crashoverdrive 11y agoI feel like if you're building them brittle, you're building them wrong. I had the pleasure of watching Sam Newman's tutorial on microservices. He's uploaded the slides here: http://t.co/2nhDBJK1oB http://t.co/2nhDBJK1oB Building microservices requires a few changes in culture. If you are moving from a monolith to microservices, your entire culture must change how you look at problems must change and if you fail to do those things, of course your transition will change. It is not a silver bullet. It is a paradigm shift.
- crdoconnor 11y agoThe more people use the phrases 'paradigm shift', 'culture change' and 'I feel like" and the less people give actual hard-nosed technical justification for this new architectural mold, the more convinced I become that it is a transient fashion that needs to die already.
- duaneb 11y ago> technical justification for this new architectural mold The technical justification is easier than the cultural or managerial justification: you can make more granular technical decisions by splitting and merging code across services and servers. This is very powerful. Microservices aren't going away—they are the core of a successful, scalable distributed system. The hype surrounding the term is definitely loaded with cultural and managerial implications that are rarely addressed, however, and I hope that changes soon.
- banachtarski 11y ago> This is purely a skill set issue. Microservices demand a greater skill set. Right and sometimes the simpler solution is the correct one.
- alphanumeric0 11y agoHow is a monolithic architecture the same as programming against a global mutable state? Programming with a global mutable state seems to have more to do with the programming paradigm and little to do with the architecture.
- ilbe 11y ago> there's a definitive architectural skill set that CAN BE LEARNED Would you care to share what that skill set is, for the sake of improvement of a mid-level engineer like myself?
- duaneb 11y ago> This is not because microservices-first is inherently flawed. This is purely a skill set issue. Microservices demand a greater skill set. Actually, from the perspective of someone building them for the past nine months, the actual service is the easiest part to deal with because the loose coupling drops the requirements to service constraints. The hardest part, by far, has been coordinating common changes, tracking deployments, and running no-downtime migrations. The hardest part of micro-services, BY FAR, is the management, communication, and coordination changes that MUST accompany a successful move from a monolithic codebase to many smaller codebases. Some of these are easier to address than others, but the barrier is NOT technical so much as it is social.
- hinkley 11y agoAnd I've seen a lot of failure stories where the big monolith was tolerated until it became so painful that people were threatening to quit (or already had). When that much pain is going on people try a lot of things. That doesn't mean that the thing they tried was good or bad necessarily. All it really means is that deathbed conversions don't usually work. Don't wait until your problem is literally killing you before starting to think about how to address it. I think where Devs tend to fall down is that we don't know how to think about a problem without immediately jumping to executing on a plan to fix it. Contingency plans are pretty cheap to create, if you know how, and you can jump on them as soon as the problem proves itself.
- vidarh 11y agoOne of my pet peeves is that developers rarely understand the costs of traversing boundaries well enough to even think about them. You won't do distributed services well if you don't understand that each step removed from in-process, in-cache carries with it a severe cost-multiplier for communicating state. E.g. most developers (rightly) assume that function/method calls are usually quite cheap, but we don't tend to be good at thinking about cache effects. So we lose the first big factor of performance by e.g. chasing pointers around. Then people tend to (wrongly) assume that if function calls are cheap, this extends to system calls. Another multiplier, as people e.g. does tons of small read()'s instead of larger reads into in-process user-space buffers. But I see people go further, and assume that database queries or http requests are cheap, often helped by having them hidden behind ORMs and various APIs that obscures how often they're making these queries even if they're logically aware they're calling them. The end result is that often these applications get written with the assumption that a function call is a function call is a function call, without thought to whether or not that function call is just a handful of machine instructions, or will trash the cache, or traverses a process boundary of hundreds of cycles before anything gets executed, or executes a remote API that may take millions of cycles to return. And then something is "slow" and the developer in question often have only a very vague idea what is likely to be slow, and stumbles around trying to measure various parts of it without thinking about the bigger picture of what information traverses what boundaries how frequently. The same concern applies to reliability tradeoffs as well as performance (e.g. lack of understanding of implications for high-availability for example). I think a huge proportion of problems making effective use of distributed systems boils down to this. There are hard challenges, sure, but if you are aware that each step across a boundary carries a certain penalty, you're already well on the way to actually thinking about why you want to move something across a boundary, and think about whether or not you understand the tradeoff well enough, and to structure things to e.g. minimize the number of boundary traversals (once you think of system calls as "slow" you are much more likely to entertain the idea of the slight extra complexity of ensuring you read/write as much as possible in one go, for example). Even just teaching younger developers to be aware of this, and how to actually measure and profile more, would help immensely, I think (one of my favourite things to show people is just very basic crude use of "strace"; suddenly it becomes very obvious to a lot of people that some of the things they do are immensely inefficient). Not because it would teach them to do distributed systems right, but because it would give them the tools to recognise much earlier when they're headed into territory they don't know well enough yet, instead of finding out after they've already painted themselves into a corner.