9 ms·
Don't microservice, do module
- gostsamo 2y agoYet another self righteous person on the internet teaching us the errors of our thinking. Everything wrong with micro services is an issue with micro services and everything wrong with modules is a skil issue of the person doing the modules. > Once the interface is established, each team can operate independently, just like in microservices, as long as they adhere to the defined bounds. Where I was lost laughing. I'm sorry, but the hords of spaghetti monsters that I battle on a daily bases are spawning because communication is hard the more people are involved in it and the more someone is in a hurry to deploy their feature. Not even talking for the fun when you need to update a third party dependency and you discover that half of the code base depends on a now removed feature, so expect migration in 5 to 12 years time.
- Joel_Mckay 2y agoMicroservices can destroy DevOps teams used to kludging polyglot stacks together. The issue is hardly limited to training, but rather ignorance of ones own bad habits. Author probably heard the buzzword off someone else's CV. =)
- graypegg 2y agoI feel like at this point in my career I've worked in all four quadrants of the spagehtti/encapsulation plane ^ monolith | | <- spaghetti ----+------ clean -> | | independent services v I really feel like it doesn't correlate. I think the real cause of spaghetti monsters is *mismatching* microservices to applications that are actually a single project under the hood, or monoliths to applications that are actually multiple applications under the hood.
- solidasparagus 2y agoIf you turned that into a heatmap of all software projects, I bet there would be hotspots. Probably would need to filter by project size or you would just end up with clusters at the top-right and bottom-left though
- m_2000 2y agoHaving an opinion on something doesn't make the speaker a self righteous person. Regarding the topic, I assume that with "the hords of spaghetti monsters" you mean lack of software perfection. In our profession, it's mostly about how to manage the lack of software perfection, and the answer does not always have to be a microservive. They are great for controlling hardware resources in a cloud-deployment, but then I see tech-dudes dockerizing everything anytime without asking why. It's a decision every dev team have to make for themselves.
- gostsamo 2y agoOpinions are like asses - everyone has one. Self righteous people are those who think that only their opinions matter and try to present them as facts, rolling over any reasonable objection with hand waving and insulting the other party for not understanding things.
- immibis 2y agoThis comment is also your opinion, which you think is the only one that matters, and you present as fact.
- HL33tibCe7 2y agoAs I’ve grown older I have developed a heuristic, which is that people who talk/write like this, i.e. being completely convinced that one way of doing things is always wrong and one way of doing things is always right, and that people doing things the other way are just ignorant/stupid/wrong, usually have no idea what they are talking about.
- onetimeuse92304 2y agoYeah, I am also suspicious about people with radical opinions. Truth is USUALLY somewhere not at the end of scale. BUT, have you noticed yours is also a radical opinion? The reality is that sometimes, a radical opinion is actually a correct one. Which is to say heuristics are useful but they still do not replace critical thinking. The problem with Microservices is actually that IMO most developers simply have no time, willingness, experience or mental capacity to think critically about all that stuff. People frequently need to make decisions efficiently. The theory of efficient decisionmaking I have is that frequently enough it is more important to make a decision than to make a perfect decision. And it kind of makes sense because I also suspect majority of the population (and that includes developers) are simply unable to think critically or retrospect about their own performance. And what you do when you have little experience in the field and can't yet think critically about things? You use training wheels. In case of IT (and business in general), a powerful training wheel is imitation. So what happens is that somebody at some company will publish a paper about how they solved a problem and suddenly a bunch of people will try to jump on that bandwagon ("you can't go wrong if they succeeded with it") but without the hassle of having to actually think through it, understand what were the circumstances at that other company, how those circumstances are different from own use case, etc. They will imitate what others have done before but without realising a lot of important things about the problem. Which is how we got to this whole microservices mess. Anyway, I am personally rolling back microservices implementations pretty much every project I join. People do not realise how much time they spend solving problems that are simply due to the fact they have partitioned large application into hundreds of small services which need to each be maintained separately. We have dedicated teams to do stuff that is simply unnecessary (they usually call them "devops", but really they are just ops because more frequently than not they are not actively developing the functionality). All the performance problems, all that inefficiency usually vanishes when you roll all that functionality into a single application and just scale that one application instance over multiple servers. My current team is even more funny. The microservices were originally meant to allow teams to work independently, but at my current team they work hard to bind all of the development process into a single stream of work. So there is some 80 people in 10 different teams all working on same set of environments, applications, with the same monthly release process, coordinating their work everywhere. But there is about 1 service maintained for each developer which means people spend half the time dealing with complex configuration. And the other half of the time figuring out how to improve performance of an application which copies all of its data from service to service.
- yanis_t 2y agoI wish we had more articles not about what good practices are, or how things should be designed in theory, but rather about how to enforce those practices in a large organization, when you are not necessary a guy who makes decisions.
- Joel_Mckay 2y agoUnfortunately, the "wisdom of the tribe" cannot be written down for the laymen. Most juniors can't look at a design-pattern, and somehow immediately understand why it is good or inappropriate. Almost all recent grads are similar to the following fellow: https://en.wikipedia.org/wiki/Eddie_the_Eagle https://en.wikipedia.org/wiki/Eddie_the_Eagle
- red_admiral 2y ago> when you are not necessary a guy who makes decisions I think a lot of it comes down to: if the guys who do make decisions make them badly, stuff is going to suck. You need the right people at the top.
- CuriouslyC 2y agoWhile I hate the cargo culting of microservices, there is one use case they handle very well - reusable services with obnoxious dependencies that don't really need to be integrated in with the rest of your codebase. I would much rather take a docker image of a whisper or text-to-speech service and add it to my compose file and call it via HTTP than try to wrestle a CUDA build and get whisper/TTS bindings working for every language where I might need them.
- mind-blight 2y agoA similar case for me has been processing large files. It's really nice to be able to scale up the memory of the file processing server when there are large files being processed, they scale it back down for normal usage
- _heimdall 2y agoMicroservices can also be a great fit for certain team/org structures. Its not ideal to pick the tech based on the team structure, but that's life. I've also found it micro services helpful for heavy data processing projects. A micro service architecture driven by events as data is processed and moved through different steps can be a surprisingly simple setup to reason about and debug.
- alephxyz 2y agoThe author seems to be assuming that microservices are only used to break down a single application into different services, in which case their arguments are valid. If you instead consider that a single service can in fact be used by multiple applications, most of their arguments are plain wrong. For example: >Why would you ever want to allocate more resources to one particular part? It’s not like the other parts will eat up the extra resources. If your system needs more RAM, it needs more RAM. Why would you care about which part needs more RAM?
- icholy 2y agoThere's a benefit of microservices that I don't hear talked about. At my workplace, there's absolutely no respect for api boundaries. Devs will monkey patch and reach into other module's internals without a second thought. I can't imagine the monstrosity that would exist if the network boundary wasn't there to stop them ...
- duxup 2y agoMicroservices (like a lot of things) might just be there to solve human developer problems as much as anything else. There are times where I'm all "No the authentication service is doing great, leave it alone!!!".
- aitchnyu 2y agoWe can enforce module boundaries in code with tooling. An example for Python: https://github.com/gauge-sh/tach https://github.com/gauge-sh/tach
- NoGravitas 2y agoThat's just another way of saying that microservices don't solve a technical problem, they solve an organizational problem.
- BillyTheKing 2y agoyes - and writing code also doesn't solve a technical problem, a computer runs fine with 0s and 1s, no need for code, in fact code produces a performance overhead - but it solves a human abilities problem, namely that 0s and 1s aren't particularly expressive for us. Almost everything we do solves for communication, some things on an individual scale, like programming languages, and other things on an organisational scale like micro-services (I'm also not blindly advocating for micro-services, but I do get why if done somewhat competently it's easier to organise a team of 1000 developers into 50 teams of 20 each responsible for one service rather than 1000 developers responsible for everything)
- kgeist 2y ago>Devs will monkey patch and reach into other module's internals without a second thought. I can't imagine the monstrosity that would exist if the network boundary wasn't there to stop them ... We have a tool in our modular monolith, which is like a linter which checks architectural violations like that. If someone tries to bypass the API layer of a module and peek directly into the internals, it refuses to build (and CI/CD refuses to deploy/release). No need to replace a basic linter with a network boundary...
- huygens6363 2y agoMicroservices are not solving a technical problem. This is related to another issue: many technical people think tech is the hard part. Technology is the easy part. If you think the tech is hard, you have no idea how hard The Rest is. I know it sucks, but the sooner you learn this the better.
- twelfthnight 2y agoSo true. Communication is insanely difficult. Hiring competent, motivated engineers is insanely difficult. Working around short-term thinking executives is insanely difficult. Iterating until you stumble on a success product is insanely difficult. How often does anyone talk about these problems in meetings? It's wild, I feel like all I ever do is argue over mostly irrelevant technical minutia.
- huygens6363 2y agoExactly! It's this huge elephant in the room and all we want to talk about is our editors and how Java is faster than Go or whatever. I'm sitting in this meetings thinking "Guys, using XML or JSON truly, truly does not matter here. You have already wasted months on this shit and the value meter is still at $0. I'm telling you we can make this work with either Scala or 6502 assembly or anything in between. What matters is that we need a coherent vision, formulate actionable goals and work on improving our communication and keeping it there." Maybe I need to go into management? (/s ?)
- anon64765446 2y agoIt's almost as if you are describing the meetings in my company (and my previous) I think focusing on technical trivialities is a symptom of what type of experience the developers have and how the current workplace is organized. In traditional companies, the developers are at the tail of a process that they have limited participation in. Most of the product decisions has been done by others and the developers often don't have enough contact with the business side to make any real impact. You end up with an isolated group that can only influence technical desicions, so that's what they will focus on. Choosing tech X vs tech Y is actually only 1 choice in a long chain of product, design and business choices that has led to the Jira ticket. From their point of view, it seems like the most important desicion because it is taken out of context. This is where experience is actually a good thing, because it increases the chance that you have been exposed to "the other side". They will also know that these types of decisions are not likely to be the reason why they fail. By participating from the beginning you also tend to be more motivated by outcome. Technical discussions that don't have a real impact become less interesting.
- skwirl 2y agoThere certainly are many cases where microservices are used where they are not actually appropriate, but this entire post just betrays a lack of experience working in a large monolithic codebase with many engineers.
- Octokiddie 2y ago> Microservices are the Wrong Answer The author never states the question. This makes it impossible to evaluate the answer, which presumably is stated in the title. The article would be much stronger with a clear statement of the perceived problem that microservices solve and why modules are a superior solution.
- DeathArrow 2y agoProbably the author never worked on large projects that need to scale. Almost no one of his objections does make sense. Imagine Facebook, Uber, AirbNB, Google as monoliths.
- dave1999x 2y agoHis LinkedIn is on the article. He has 3 years of professional/non academic experience so you're highly likely to be correct.
- nasmorn 2y agoOTOH I only know micro services from 5-20 dev teams where they made no sense whatsoever.
- krab 2y agoTell this to Instagram or WhatsApp before acquisition. ;-) They have scaled well enough, IMHO. On the other hand, I agree that for the larger teams, microservices make sense. It's much easier when you can roll back a failed deployment and block new releases just for your service, while the team tries to fix it. Also, monitoring and resource accounting is easier. All at the cost of some inefficiencies compared to a monolith.
- disgruntledphd2 2y agoYeah but all those companies invest an absurd amount into tolling to make this practical, and they AFAIK don't do insane things like having separate databases for individual services.
- netdur 2y agogot it, I will not build micro services, I will build just regular one.
- tombert 2y agoHonestly I never really understood the hatred that people on HN have for microservices. Everyone acts like "OMG THEY'RE SO COMPLEX!!!!", but a) that's not unique to microservices, b) monoliths aren't somehow immune from this complexity, and c) most big systems end up getting pretty complicated regardless of the model. Yes, Kubernetes is a pain in the ass, and libraries getting out of sync can be real problem, and distributed systems are inherently difficult, but I think that the benefits of something like event-sourcing with lots of individual, self-contained, "I don't care where this data came from" services outweigh a lot of the complaints. It's not like most of us are reinventing Paxos every day; we're using well-tested off the shelf components like Kafka and Consul and RabbitMQ. Also, I don't really understand the author's point about individual scaling not being a good thing. It can be very hard to measure things like memory usages for individual components of a huge service; the smaller and more atomic the service is, the easier it is to find out how many resources it actually needs. With a big ol' monolith, it seems like people just go off intuition (AKA self-righteous guessing). I dunno, even for home servers, I still basically do the microservice model. Maybe I'm weird.
- solidasparagus 2y ago> I never really understood the hatred that people on HN have for microservices. If you're an early stage company and just trying to ship something with a small team, the overhead of microservices (testing, deployment, monitoring, platform infra such as k8s, etc) can be pretty obnoxious (like an order of magnitude more time than the work to actually deliver business value). And microservices give you enough rope for one overly clever person to hang the whole team, so there are definitely some traumatized developers out there. If you are doing something simple enough, throw it in a single docker container and spend your time focused on building something useful.
- photonthug 2y agoThis is all true, but I think tends to cover up root-causes. Over the last 5-10 years, tons of people got jobs on the strength of "k8s experience" which was more like "I was on the software-side of an application development that was deployed with kubernetes once" and then got hired based on that as if they had architecture and infrastructure experience/expertise, when they actually don't have either one. So yeah, when you need 6-8 months of on-the-job training for your "experts" to get some expertise, that will set you back 6-8 months when it comes to productionizing your product (assuming the product itself is already finished!). It's not the sheer amount of work that's involved with microservices vs monoliths. It's the skill set, which is large enough that you can't get it overnight. Even setting aside the wider ecosystem and just counting the number core concepts at play, it's easier to pick up a new programming language than to learn kubernetes architecture/administration/operations. Startups (or a company of any size that simply doesn't have the ability to evaluate candidates) will be better off if they won't saddle themselves with full-time people of questionable qualifications, working instead with some limited-engagement technical consultants and contractors in a tactical way. Contractors like this will have actually solved the problems involved multiple times and will probably have bootstrap-a-whole-org testing/deployment/monitoring code in their back pocket already. To me it seems like all this is the predictable downside of the whole "full stack engineer" thing. A server-side language + html/css/javascript can probably fit into the average human brain, but even there it seems misguided. Once "full stack" is further twisted to mean SWE+Infrastructure+Platform+Cloud+Architecture and then you throw in a little "No-Ops" and "Low Code" optimism, then it's getting unrealistic, but naive management will imagine anyone can do anything and it's all very easy. It is easy, but not anyone can do it. Expertise is required, especially during design/bootstrap phases. As a company you don't have to buy that expertise forever with a FTE, but you also can't just assume you'll multipurpose some existing FTE for this stuff if they have less than adequate experience.
- deleted 2y ago[deleted]
- hubraumhugo 2y agoThis parody sums up the issues with mircoservices very well: https://www.youtube.com/watch?v=y8OnoxKotPQ https://www.youtube.com/watch?v=y8OnoxKotPQ
- c0balt 2y agoTbh, the best way to do this is likely the hybrid model adopted by, e.g., gitlab rails and Grafana Loki etc.. air usually let's the operator select if they want to run as a monolith, service with multiple components where some are instanced, and full micro service mode. For small deployments you can just use the monolith and be done with a single "service" while you still have the ability to scale out for large deployments. This gets even better when they allow you to do an in between where one component does A and B while only C is handled by micro services.
- nallerooth 2y ago> Self-confidence is good. On the other hand, too much self-confidence means disaster. - His holiness the Dalai Lama I guess it's true for microservices as well.
- rswskg 2y agoI lol'd when I got to 'Why would you ever want to allocate more resources to one particular part? It’s not like the other parts will eat up the extra resources. If your system needs more RAM, it needs more RAM. Why would you care about which part needs more RAM?' and stopped reading.
- didip 2y agoMicroservice design is a solution to scaling up people in a large organization. Regardless what HN people believe, some people like & proficient in a few languages that may not match the existing codebase. Eg. 50% of the team is Go enthusiasts in a Java/Python shop. Microservices solve that. If your company is tiny, you don’t win much using microservices.
- elktown 2y agoIt's also an excellent way to create large organizations due to the complexity chain reaction it seems to kick off.
- norman784 2y agoI would love the day when WASM + WASI fulfill their promise and let us write our modules against an interface so you can easily swap the underlying implementation without changing something in your app, this way I can care less if I'm running a microservice or a module, let that decision to the devops/management team.
- immibis 2y agoC FFI and machine code already accomplish this. The reasons you wouldn't use C FFI and machine code are the same reasons you wouldn't use WASI and WASM.
- brunoarueira 2y agoThe main problem with adopting microservices is the hype and many times the person who defends it doesn't have enough data! "We'll rewrite this into technology X, because this doesn't scale", but sometimes anyone measured it, tested or doesn't have a good knowledge about. Another common pattern is if a module is buggy, you start to listen people screaming that this need to be a microservices. My basic thought is to write modules and when non core features evolve in such a way that the team needs to be splitted, demanding more allocated people, this features needed to move somewhere and at that point the projects will benefit!
- rcleveng 2y agoSeparation is a critical part, and that could be modules that form a separate microservice, or split off into it's own "macroservice", the mechanics are the same. I've seen many cases where there is a service that does like 3 things. 2 of them are low importance and one of them super critical. A low importance one will have a bug, crash, introduce latency regression, etc and take down the critical one. Time to separate the critical one into it's own deployment to isolate and improve reliability. The other is on trade-offs, super important that every decision makes has them, just respect that and realize the answer is often "it depends".
- fire_lake 2y agoThe fault tolerance aspect is underplayed here. Different modules might have different reliability and uptime requirements. I don’t want an unreliable module without SLAs running on the same instance as something on the critical path for users.
- basfo 2y ago> Why would you ever want to allocate more resources to one particular part? It’s not like the other parts will eat up the extra resources. If your system needs more RAM, it needs more RAM. Why would you care about which part needs more RAM? Looks like resource isolation and avoiding a non performant piece of code to bring your whole system down is overrated. Just scale vertically! Get a bigger instance!
- rcleveng 2y ago> Just scale vertically! Get a bigger instance! That works great until it suddenly and unexpectedly stops working.
- kgeist 2y agoWe use a microservice architecture at the company and like every second incident is a cascade failure which is actually harder to monitor and manage... And having microservices doesn't help. Things like, someone forgot to batch the events when posting to the event bus so a large tenant generating many events suddenly overflowed RabbitMQ which ran out of memory and started blocking producers who are holding DB connections and so we're out of DB connections now and the whole thing goes down. The only difference is that when it's going down it's harder to understand who's calling who in all this mess (compared to a single beefy server).
- intelVISA 2y agoBehold: the distributed monolith.
- steve_adams_86 2y agoI’ve yet to see an article which explores the pros and cons of different strategies and demonstrates each with examples rather than picks one and insists it’s better for arbitrary reasons. I’ve used microservices, monoliths, serverless, and other similar permutations based around different core architectures (event buses, peer to peer, client-server). Some aspects of each were awesome. Some weren’t. Knowing why and how/when to leverage each is far more interesting than demoting or excluding a solution because you like another one more. There are some suspicious ideas in here. “If your system needs more RAM, it needs more RAM. Why would you care about which part needs more RAM?” I suppose. But what if I only spin up a service once per day, and it needs far more ram than the rest of my system? I should use those resources for the 23 hours of the day that I don’t need them and pay for them nonetheless? It I don’t own my hardware, that’s an insane waste of money. Sometimes ephemeral services are a huge cost saver even for smaller teams… And it isn’t strictly due to poor communication. It’s a legitimate challenge presented by resource and finance constraints. “Microservices introduce a lot of overhead in terms of communication latency” - sometimes this is perfectly acceptable. Say you have jobs you need done, and sometimes it goes from ten at a time to perhaps 100. A monolith would get bogged down severely. The client’s expectation of having the job done is likely not instantaneous if it’s something that needs to be sent to a queue. In this case, ephemeral job runners make sense. They can take on however many jobs they can at once, and if they’re maxed out, spawn another worker. This does not work well with monoliths in my experience. The communication overhead doesn’t matter here, as it could be worse if the monolith is bogged down while working anyway. There’s more I don’t agree with, but I don’t claim to be a seer or anything. Maybe I’m just old and incapable of learning (though I do like the module approach as well).
- nijuashi 2y agoTo be frank, this is a terrible advice. I’m certain this person, given enough time, will come to the same conclusion as he/she is exposed to different projects and organizations. As many posters here state, there are many instances where services are loosely coupled, developed by different team and/or at different time, and makes no sense to make into a monolith. As you may not benefit from shoehorning a well-maintained monolith into a microservice, the opposite is true.
- rysertio 2y agoAm I the only one who uses microservices to deploy small monolithic projects?
- deleted 2y ago[deleted]
- whack 2y agoMy intuition is that at a certain scale, microservices are preferable to a monolith. Two principled reasons: - Autonomy over deployment rollbacks. If your team owns a microservice, and you noticed that you deployed buggy code, you can easily and autonomously do a rollback. Your rollback doesn't impact other teams. It isn't visible company-wide. This allows teams to take more risks with fewer downsides and more psychological safety - Isolation of secrets, api-keys etc. If one module has access to an api-key, then it's effectively made visible to every single module in the monolith. Other teams can decide to bypass your API entirely and read directly from your database, making it impossible for you to abstract away your implementation details Problems solved by microservices that could in theory be solved in a monolith: - Build/test times. A big monolith will have a huge build time and a large number of CI/CD tests. In theory you could parallelize your build/test-suite to make it infinitely fast, but I'm not sure how practical this is - IDE slowness. A monolith will make your average IDE run much more slowly. In theory also solvable, but would require major IDE changes and investments - Code ownership by specific teams. In theory you can use things like regex-CODEOWNERs to enforce code-ownership of individual modules, but it's easier with microservices - Migrating to better languages/frameworks. If your original monolith was written in perl or on a bad framework, it's very hard to move away from it. With microservices, each microservice can be independently and incrementally migrated, allowing the company's tech stack to evolve gracefully. Any others I missed?
- lolinder 2y agoOne that I don't think a monolith can solve is partial availability. A monolith is either available or it isn't, which is fine as long as you can guarantee that nothing ever takes down the monolith, but we all know that that's not something you can guarantee. If you split out services that live outside the critical path, then when those services go down you can still engineer your system to keep going and gracefully degrade the functionality provided by those currently-down services. This makes incident response much less stressful because there's less urgency, which in turn leads to fewer mistakes during the response and faster recovery times. (Yes, there are some pieces of functionality that will always be in the critical path, like authorization, but many things don't have to be.)
- elktown 2y agoNot sure if there's any other profession than software that has such a hard time with proportionality. We can seemingly with a perfectly straight face argue that yes this massive Rube Goldberg machine was required to avoid that small nuisance that feels wrong but actually isn't something that consumes time at all. Imagine if a carpenter or plumber acted like this; having self-fulfillment as prio 1, 2, 3 in all cases, not outcome. They'd never get hired again.
- jiggawatts 2y agoMicroservices are just Enterprise Java Beans reinvented, but without the efficiency. At least with EJBs we had the option of bypassing the network layer and having tightly coupled services communicate directly in-process. Someone looked at that and thought: “Too efficient!” and made the network step mandatory. This is how we ended up with web apps like Jira that take a solid minute to open an empty form.
- supermatt 2y agoSo I can just rename my "microservice" to "module" right? That is all the author seems to have done in my eyes, but then also thrown away the bits that make it scale - for no less complexity. First of, I am going to disagree with the microservices.io definition the author references, because it is short-sighted and ends up contradicting itself when talking about assemblage. Chris Richardsons book is definitely worth a read, but we clearly come from different worlds when it comes to a core belief of microservice architecture. Too many people who complain about microservices are clearly unaware that a microservice doesnt mean remote, or distributed. It can have local transport - even a simple function call - which is the same as the "modular" approach the author dictates - but is also more flexible in that you CAN have remote transport with no additional effort because the service locator handles it for you. Its just building your code in a modular way, with a defined interface between isolated components, a service locator (this is effectively an index of your modules (microservices) and where they are located - local, remote, etc) and some mechanism to call them based on the supported transports (thread local, RPC, whatever) of that "module". It can all reside in a single repo. Your microservices can all be compiled in a single app, your service locator can be a switch statement, and your transport can be a function call. The only requirement is that they never perform a task that another microservice can handle - and if we were just talking programming, we would just call that "modularization" or using DRY principles! Microservice architecture is just non-monolithic DRY. Anyone NOT writing microservices that way is just making life hard for themselves and probably hasn't read even the most archaic book on microservice architecture. Remove the remote transports, and you have a well built, domain driven monolith...
- zubairq 2y agoHaving worked with several systems using both modules and micro services I would say that using modules is the way to go from a debugging and understandability perspective, so modules are a more productive method. However micro services can still be valid but to me they are actually “developer UI” and should only be used when services have to be shared between developers who don’t know each other. For example a public API will almost always be an API with a micro service behind it
- namaria 2y agoDon't take design advice in a vacuum. Think about the problem at hand, the constraints and the people and organizations involved, and design something appropriate to that context.
- kodama-lens 2y agoWhile I don't agree with quite some assumptions and comparisons the author makes I tend to agree that microservices are often not the right answer for your problem. They can be great when: * You need just one function that is not directly related to your core application logic and might be needed by other service. Great usecase for a microservice or lambda * You need to separate statefull and stateless components * Have async workflows * Scaling to infinity and beyond But most don't application problems don't have these requirements for it's core logic. Microservices have a huge cost. Code and dependency dublication, complex deployments, latency, harder debugging and tracing and the cognitive load is much higher. A lot of read blogs and new form netflix and google and want to do the same. The management of my current project is asking for microservices because it is the new hot sh*t, so teams are doing it just like SAFe and AI - even when it does not help to solve the problem.
- 0x63_Problems 2y agoProbably the most formative experience in my early career was seeing a massive (attempted) rewrite from a monolith to microservices. Multi-unicorn company spent a year and $Ms in developer hours just to realize that the network separation did more harm than good. There are use cases for network separation (fault tolerance, independent scaling, polyglot teams etc.) but for essentially every startup I've been at, the better bet is to enforce logical boundaries in the codebase itself.
- YektaDev 2y agoThank you to everyone who contributed insightful thoughts and feedback on the subject. Your input has been invaluable, and I've taken the time to revise and improve the article.