TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Microservices: Why Are We Doing This?

304 pointsby htunnicliffabout 3 years ago

70 comments

bob1029about 3 years ago
Honestly, we originally did microservices because it sounded like a fun idea and because it would look really cool in our marketing materials. At the time, this was a very shiny new word that even our non-tech customers were dazzled by.<p>As oxidation and reality set in, we realized the shiny thing was actually a horrific distraction from our underlying business needs. We lost 2 important customers because we were playing type checking games across JSON wire protocols instead of doing actual work. Why spend all that money for an expensive workstation if you are going to do all the basic bullshit in your own brain?<p>We are now back into a monolithic software stack. We also use a monorepo, which is an obvious pairing with this grain. Some days we joke as a team about the days where we&#x27;d have to go check for issues or API contract mismatches on 9+ repositories. Now, when someone says &quot;Issue&#x2F;PR #12842&quot; or provides a commit hash, we know precisely what that means and where to go to deal with it.<p>Monolithic software is better in literally every way if you can figure out how to work together as a team on a shared codebase. Absolutely no software product should start as a distributed cloud special. You wait until it becomes essential <i>to the business</i> and even then, only consider it with intense disdain as a technology expert.
评论 #30761404 未加载
评论 #30760482 未加载
评论 #30763073 未加载
评论 #30762194 未加载
评论 #30781424 未加载
评论 #30761659 未加载
评论 #30766224 未加载
jedbergabout 3 years ago
I&#x27;m a huge proponent of microservices, having worked on one of the earliest and largest ones in the cloud. And I absolutely think that they provide huge advantages to large companies -- smaller teams, easier releases, independently scaling, separation of concerns, a different security posture that I personally think is easier to secure, and so on.<p>It&#x27;s not a surprise that most younger large enterprises use microservices, with Google being a notable exception. Google however has spent 10s, possibly 100s of millions of dollars on building tooling to make that possible (possibly even more than a billion dollars!).<p>All that being said, every startup I advise I tell them don&#x27;t do microservices at the start. Build your monolith with clean hard edges between modules and functions so that it will be easier later, but build a monolith until you get big enough that microservices is actually a win.
评论 #30760270 未加载
评论 #30760135 未加载
评论 #30760376 未加载
评论 #30760961 未加载
评论 #30760751 未加载
评论 #30760158 未加载
评论 #30760854 未加载
评论 #30762314 未加载
评论 #30760022 未加载
评论 #30761143 未加载
评论 #30760282 未加载
glouwbugabout 3 years ago
The last microservice architecture I worked on consisted of 7 python repositories that shared one &quot;standard library&quot; repository. Something as simple as adding an additional argument to a function required a PR to 7 repos and sign off on each. When it came to release we had to do a mass docker swarm restart and spin up because the giant entanglement of micro-services was really just a monolithic uncontrolled Cthulhu in disguise.<p>The business revolved around filling out a form and PDF generations of said form. I felt like I got no work done in a year and so I left
评论 #30759834 未加载
评论 #30760344 未加载
评论 #30760437 未加载
评论 #30761056 未加载
评论 #30760193 未加载
评论 #30759753 未加载
评论 #30765228 未加载
评论 #30759751 未加载
Nextgridabout 3 years ago
The reason why &quot;we&quot; are doing this is because in a lot of cases, the tech is no longer used as a means to solve a business problem - instead, the tech is the end-game itself and complexity is a desired <i>feature</i>.<p>The market has been distorted by endless amounts of VC funding for very dubious ideas that would never be profitable to begin with, so now you have 2 solutions: you can spend a few hundred grand building a boring solution with a slim amount of engineers, realize it doesn&#x27;t work and quit, or you can keep over-engineering indefinitely, keep raising more and more millions, enjoying the &quot;startup founder&quot; lifestyle while providing careers to unreasonable amounts of engineers with no end in sight because you&#x27;re too busy over-engineering rather than &quot;solving&quot; the business problem, so the realization that the business isn’t viable never actually comes.<p>Which one do you pick? The market currently rewards the second option for all parties involved, so it&#x27;s become the default choice. Worse, it’s been going on long enough that a lot of people in the industry consider this normal and don’t know any other way.<p>I&#x27;ve commented&#x2F;ranted about this before, see <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30008257" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30008257</a>, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24926060" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=24926060</a> and <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30272588" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=30272588</a>.
评论 #30760016 未加载
评论 #30761166 未加载
评论 #30759656 未加载
评论 #30761031 未加载
评论 #30761670 未加载
评论 #30760960 未加载
评论 #30759742 未加载
评论 #30760310 未加载
评论 #30765036 未加载
评论 #30761554 未加载
评论 #30759462 未加载
评论 #30759724 未加载
Natalesabout 3 years ago
Before microservices were a thing, I had the chance to work on a couple of telecom systems written in Erlang&#x2F;OTP, but it wasn&#x27;t until years later that I realized we were already doing most of the things people were using microservices for, with the single exception of being polyglot (although Elixir and Gleam are starting to challenge that).<p>Small teams were dealing with specific functionality, and they were largely autonomous as long as we agree upon the API, which was all done via Erlang&#x27;s very elegant message passing system. Scalability was automatic, part of the runtime. We had system-wide visibility and anyone could test anything even on their own computers. We didn&#x27;t have to practice defensive programming thanks to OTP, and any systemic failure was easier to detect and fix. Updates could be applied in hot, while the system was running, one of the nicest features of the BEAM, that microservices try to address.<p>All the complexity associated with microservices, or even Kubernetes and service meshes, are ultimately a way to achieve some sort of &quot;polyglot BEAM&quot;. But I question if it&#x27;s really worth it for all use cases. A lot of the &quot;old&quot; technology has kept evolving nicely, and I&#x27;d be perfectly fine using it to achieve the required business outcomes.
评论 #30762089 未加载
sarks_nzabout 3 years ago
I found microservices had the benefit of increasing release cadence and decreasing merge conflicts.<p>Are there complications? Sure. Are they manageable? Relatively easily with correct tooling. Do microservices (with container management) allow you better use of your expensive cloud resources? That was our experience, and a primary motivator.<p>I also feel they increase developer autonomy, which is very valuable IMO.
评论 #30760380 未加载
评论 #30759565 未加载
评论 #30759588 未加载
评论 #30760096 未加载
zwiebackabout 3 years ago
If you&#x27;re going to complain about something you need to present some data that backs up your point, this is just a bunch or rambling opinions.<p>A lot of software engineering is about managing modularization, I&#x27;ve lived through structured programming, OOx, various distributed object schemes and now this. Basically all these mechanisms attempt to solve the problem of modularization and reuse. So, the fact that new solutions to the old problems appear just means that it&#x27;s a hard problem worth working on. I&#x27;d say use every single technique when it&#x27;s appropriate.
评论 #30760254 未加载
taurathabout 3 years ago
&gt; While microservices talk likes to pretend the solution is some horrific “monolith”, we never really had “monoliths” before in development that I experienced. What we had were some kinds of tiered architectures.<p>I&#x27;ve worked with with monoliths. The author must not have experienced them. I&#x27;ve worked places that had builds that took hours to run. We had git merges that took days. We had commit histories that were unreadable.<p>The developer experience working with it was one of CONSTANT frustration. The system was too big to make large changes safely. Incremental changes were too incremental and costly.<p>Note nowhere in here am I saying that microservice architecture should always be preferred. But the idea that its all just some sort of trend with no real underlying advantage is sort of silly.<p>Every company I&#x27;ve ever been at with a monolith tends to have &quot;untouchables&quot; of architecture and the original design schematics who understand the system orders of magnitude better than anyone else. That doesn&#x27;t scale, and really messes with an engineering organization.<p>There&#x27;s conways law where software will eventually reflect the organization structure of the company, but there&#x27;s also a sort of reverse conways law - when you have teams dedicated to specific services you also get to be able to target investments in those teams when their services are not executing well enough.
评论 #30761277 未加载
simonwabout 3 years ago
If you&#x27;re going to embrace microservices, you need to be VERY confident that they solve real problems that you currently have and that they will result in an improvement to your engineering velocity within a reasonable time-frame.<p>The additional complexity - in terms of code and operations - is significant. You need to be very confident that it&#x27;s going to pay for itself.
richardfeyabout 3 years ago
I have been around for a while too and I think I can answer the rethorical question: it&#x27;s a great fulcrum upon which to build teams and spring careers, and by the time problems have calcified there&#x27;s been enough turnover or promotions that the reason why they are in place is completely lost. I do not say this with bitterness accumulated while building them: on the contrary, it&#x27;s something I&#x27;ve usually realised only much later, when it was too late (and more than once).
paxysabout 3 years ago
Incompetent teams and engineering organizations will find a way to mess up both monoliths and microservices. Great ones will pick what works best for their specific use case and be effective at it.<p>The only correct answer is to not waste time with the decade+ worth of pointless internet debates on the topic.
评论 #30761542 未加载
Jtsummersabout 3 years ago
&gt; If we think about the fastest way to execute some code, that is a function call, not a web request.<p>No, the fastest way to execute some code is a goto. Be careful with arguments from performance, that&#x27;s how you get garbage like a former colleague&#x27;s monstrous 10k SLOC C(++) function (compiled as C++, but it was really C with C++&#x27;s IO routines). Complete with a <i>while(1)</i> loop that wrapped almost the entire function body. When you need speed, design for speed, but you almost always need clarity first. Optimizations can follow.<p>&gt; If we think about resilient systems, the most resilient systems are the ones with the least number of moving parts. The same is true for the fastest systems.<p>I suggest care with this argument as well. This would, naively interpreted, suggest that the most resilient system has 1 moving part (0 if we allow for not creating a system altogether). First, this is one of those things that doesn&#x27;t have a clean monotonically increasing&#x2F;decreasing curve to it. Adding a moving part doesn&#x27;t automatically make it less resilient, and removing one doesn&#x27;t automatically make it more resilient. There is a balance to be struck somewhere between 1 (probably a useless system, like <i>leftpad</i>) and millions. Second, there&#x27;s a factor not discussed: It&#x27;s the interaction points, not the number of moving parts themselves, that provides a stronger impact on resilience.<p>If you have 500 &quot;moving parts&quot; that are linearly connected (A-&gt;B-&gt;C-&gt;D-&gt;...), sure it&#x27;s complicated but it&#x27;s &quot;straightforward&quot;. If something breaks you can trace through it and see which step received the wrong thing, and work backwards to see which prior step was the cause. If you have 500 moving parts that are all connected to each other then you have 500(500-1)&#x2F;2 interactions that could be causing problems. <i>That&#x27;s</i> the way to destroy resilience, not the number of moving parts but the complex interaction between them.
kodahabout 3 years ago
Microservices work well if your contracts are well-defined, domain knowledge is limited, your team is under the size of a pizza, and your platform needs are diverse. Eg: Some small teams prefer containers, other prefer managed containers (serverless), others prefer small VM&#x27;s.<p>SOA works well if your teams are larger and have larger domain (or end to end, however you want to call it) knowledge.<p>Monoliths work well when the domain of the application is singular, the team is large, or if you&#x27;re in prototyping. The big downside for monoliths is that their scaling model must be considered in advance or engineers can tactically corner themselves with architecture. That incurs big, expensive rewrites as well as time.<p>While Conway&#x27;s Law may be reflective of the enterprises use of (or overuse of) microservices I think it really has more to do with a different enterprise habit: understaffing and budget constraint. Microservices and client-side applications, from my perspective, very rarely have long-term maintainers. Instead, things get done in cycles and then for most of the year a given service does not receive <i>anything</i> besides some maintenance updates or low-hanging fixes. That makes it look like a microservice is expendable and easier to replace to the people who manage resources, staffing, and budgets. Thus, things now look &quot;modular&quot; to the people who fund the ship that everyone else drives.
评论 #30762040 未加载
edgyquantabout 3 years ago
I see a lot of people acting like microservices are some conspiracy theory pushed on us engineers. I’ve never worked anywhere that pushed microservices, the places I’ve used them they tended to be additional functionality we could easily decouple from the standard backend. Even if they were I like the idea of microservices, having everything as abstracted away from each other as possible. Also would probably make code easier to onboard, just get a junior up to speed on one service at a time.
mathgladiatorabout 3 years ago
As I build out my infrastructure for Adama (my real-time SaaS for state machines), I&#x27;m leaning hard into a monolithic design. The key reason is to minimize cost and maximize performance.<p>For instance, comparing Adama to the services needed to build similar experiences offered by AWS has interesting results. Adama costs 97% less than AWS ( <a href="https:&#x2F;&#x2F;www.adama-platform.com&#x2F;2022&#x2F;03&#x2F;18&#x2F;progress-on-new-datastore.html" rel="nofollow">https:&#x2F;&#x2F;www.adama-platform.com&#x2F;2022&#x2F;03&#x2F;18&#x2F;progress-on-new-da...</a> ), and a key thing is that the microservice approach is amenable to metering every interaction which scales linear to demand whilst a monolithic approaches condenses compute and memory.
评论 #30761914 未加载
mekkkkkkabout 3 years ago
I&#x27;ve been at a place where a single person is juggling twenty microservices to power a product with barely any users. Just the infra cost alone makes it insane.<p>&quot;But one day, when we get massive growth, it will all be worth it&quot;, he says.<p>Alas that day may not come, since he is busy configuring load balancers and message queues instead of developing features.
tiberriver256about 3 years ago
I really like the way Uncle Bob described Microservices in this article: <a href="https:&#x2F;&#x2F;blog.cleancoder.com&#x2F;uncle-bob&#x2F;2014&#x2F;10&#x2F;01&#x2F;CleanMicroserviceArchitecture.html" rel="nofollow">https:&#x2F;&#x2F;blog.cleancoder.com&#x2F;uncle-bob&#x2F;2014&#x2F;10&#x2F;01&#x2F;CleanMicros...</a><p>He made the point that micro-services are a deployment method not an architecture. A good clean architecture shouldn&#x27;t care how it&#x27;s deployed. If you need to move from plugins to micro-services to be massively scalable your architecture shouldn&#x27;t care. If you need to move from micro-services to plugins to make your app simple to host and debug, your architecture should also not care.<p>This strategy has been implemented in frameworks like abp.io very successfully. You can start your application as a single collection of split assemblies deployed as a single application and move to deploying as micro-services when it&#x27;s necessary.
评论 #30760214 未加载
j_oshi_curuabout 3 years ago
In my experience, 95% of the people advocating microservices can&#x27;t properly explain ACID. Not to mention advanced concurrency concepts like MVCC.<p>Regarding division of work, those advocates seem to have forgotten that libraries exists.<p>Or that you can deploy a monolith and still scale endpoints independently.<p>Microservices might be a good fit for tiny fraction of real world scenarios.
eandreabout 3 years ago
Whether you build microservices or just services, distributed systems are undeniably here to stay. In today’s world there are very few products that can run on a single machine, whether it is for latency or availability or redundancy.<p>That said, the challenges of building such systems are real, and the developer experience is universally quite awful compared to our monolithic, single-server past.<p>It’s for that reason that I’ve been building [1] for the past four years. Would love your feedback if the OP resonates with you.<p>[1] <a href="https:&#x2F;&#x2F;encore.dev" rel="nofollow">https:&#x2F;&#x2F;encore.dev</a>
dasil003about 3 years ago
This article fails to mention anything about team size which should be the first criteria for any decision about &quot;microservices&quot; (in quotes because it&#x27;s just new terminology someone made up because service-oriented architecture wasn&#x27;t cool anymore and they had to prove how original and modern their thinking was). Half of the engineering orgs chasing this fad are &lt;50 people and have absolutely no reason to be adding the overhead of an SOA. The rules of thumb should be if you have more than 1 service per 4 engineers it&#x27;s too many; and if your total engineering org size is not big enough to support a dedicated infra team of &gt;4 engineers working full-time on tools just to support the other teams then you&#x27;re not big enough.<p>Over-complicating things to pad your resume might get you into FAANG but it won&#x27;t make you a good engineer or a good entrepreneur. The sign of a truly senior engineer is one who knows how to keep things as simple as possible to solve real problems while maximizing power to weight ratio of their code. The resume-driven-development anti-pattern is pretending that the problems facing 1000 or 10000 person orgs are your problems. Those large companies got to where they are by solving the problems in front of them, and you won&#x27;t get to that scale if you don&#x27;t do the same.
rickspencer3about 3 years ago
I dunno, I think &quot;We are doing this&quot; because it solves a ton of problems related to running an application at scale. He doesn&#x27;t mention any of the difficulties that using monoliths have caused &quot;us&quot; over the years.<p>Packing multiple concerns into a single instance&#x2F;VM seems particularly cavalier. What if one of the services crashes the OS based on novel user input that is being sent over and over? I think it&#x27;s naive to say that perfect testing and strongly&#x2F;statically typed languages make this problem go away.<p>A large team iterating on a set of monoliths runs into other problems as well. Ready to deploy, but wait, you need to rebase for someone else&#x27;s changes, oh wait, now your tests don&#x27;t pass, etc...<p>A set of monoliths certainly simplifies things for some projects, but many of &quot;us&quot; have battle scars from managing large cloud-based projects in that way, and find the deployment complexity of having a proliferation of independent entities that can have their own life cycle to be crucial for velocity and availability. At least that is why some &quot;us&quot; do it this way.
commandlinefanabout 3 years ago
&gt; teams want to make their own choices, dislike code review or overbearing ‘architects’ above them, and to a lesser extent want to use different and newer languages.<p>I&#x27;m not sure this is 100% correct - or, at least, has never been the case in the 20 years or so I&#x27;ve been working with &quot;microservice&quot; architectures. There&#x27;s always an architecture team dictating the form of the services themselves - usually much more so than a module in a monolithic application. Part of this standardization is usually a set of languages - you can use Python (with Django) or Java (with Spring Boot), but anything else has to be approved by the committee.<p>That said, I agree with is ultimate conclusion that microservices haven&#x27;t lived up to their promise. The usual justification for microservices was and continues to be &quot;we can update one component without disturbing the others&quot;. I&#x27;ve never seen that actually happen. Every time one component changes, everything that depends on it has to be retested just to be on the safe side (and most of the time, something is found).
评论 #30759963 未加载
4maz1nabout 3 years ago
I miss Ruby, a lot. It’s just makes developers happy. It just makes sense, and I am so sad that microservices killed my livelihood. Nowadays, there’s few Ruby jobs, w&#x2F; many competitions because fewer company uses it. Now been working for JS&#x2F;TS &amp; Microservice for 5 years, but I am still longing for Ruby. I wish Ruby is still around. I wish to be happy again.
评论 #30766430 未加载
fdgsdfogijqabout 3 years ago
I think the real reason is that cloud software development has enabled microservices. Meaning, if you arent on AWS or GCP, forget it. But if you are, its a paradigm that fits very well with cloud software architecture. Those criticizing it for the complexity, probably just havent spent enough time in code bases where it makes sense.
hinkleyabout 3 years ago
For me, part of the sales pitch of splitting different workflows into distinct processes was that it often turns out that in a healthy system you need about twice as much hardware for Service A as you did for Service B, so if they are separate clusters (or separate pods) you can do that without wasting hardware.<p>Then I remember that half the time we only notice a problem with service A because service B started getting slower, and that it can take a lot of servers to make sure that you aren&#x27;t &quot;wasting&quot; servers.<p>Sometimes a little slack can be cheaper. Sometimes side effects shorten the feedback loop for a group that has a bad habit of letting problems fester until someone on another team notices.
throwaway984393about 3 years ago
If you don&#x27;t really understand how they work, you get blog posts like this. Microservices add many design benefits that prioritize rapid independent work. Monoliths add many design benefits that prioritize simplification and tight integration, testing and releasing. Both exist for good reasons, and both have to be implemented properly. <i>Neither of them is a silver bullet.</i><p>But the real reason we use microservices is they&#x27;re just more popular. Nobody wants to recommend something obscure or old for fear they&#x27;ll be laughed out of the office. Nobody can hire tech people to work on &#x27;uncool&#x27; technology. People like to follow trends. That&#x27;s why we are doing this.
jnashabout 3 years ago
If you don&#x27;t know how to write large scale maintainable monoliths then you don&#x27;t know how to write large scale maintainable micro services. Micro services are inherently <i>more</i> complex than monoliths.
dastbeabout 3 years ago
&gt; If we think about resilient systems, the most resilient systems are the ones with the least number of moving parts. The same is true for the fastest systems.<p>in some sense yes, in some sense no. a monolith with a denial of service vector in part of its functionality can suddenly take down your entire fleet because everything was exactly the same.<p>in much the same that domestic bananas are more or less one virus&#x2F;bacteria away from being wiped out (again), a monolith very susceptible to any kind of correlated failure because the blast radius is most likely the entire monolith.
评论 #30763549 未加载
评论 #30760232 未加载
blawsonabout 3 years ago
I wonder how much of this can be traced back to the proliferation of System Design interview stages, and resulting training material?<p>From my experience all of these resources tend to direct you to think in microservices &#x2F; uber-distributed architectures. I can easily imagine this causing folks to consider this as &quot;the way we do systems now&quot; and taking it to extremes.<p>The low barrier as well for 1 engineer to decide they want to just get busy on a weekend on their own and build something is another way I&#x27;ve seen this proliferate.
eternityforestabout 3 years ago
Because UNIX philosophy will sneak into any profession and somehow be accepted without question because of Antifragile psychology effects?<p>People will drink rat poison, as long as simple, natural, local, small scale, etc.<p>People don&#x27;t want what is technically best. They want what makes them feel strong and smart.<p>They LOOOOVEEE to add challenges and problems because they want to build a world where people are &quot;tested&quot;. If something is such a good design that it just works without a lot of talent they get bored.
richardwabout 3 years ago
Work at a bank. Microservices have allowed replacement as tech preferences or performance requirements have changed. I haven’t always liked the changes but they were enabled by the architecture. Can shift one service at a time, run both, leave some services alone, no dependency.<p>Note: lots of systems, lots of technologies, from SAP to Rust. Not all microservice by a long shot but those have worked pretty well.
jimbobimboabout 3 years ago
&quot;Do we have to release often? No, we do not, because the release process almost never changes and there are so few components.&quot;<p>This is non-sequitur: release frequency is not dictated by release process - although it is affected by it - but by business requirements.<p>&quot;We never really had “monoliths” before in development that I experienced&quot;.<p>Good for the OP, I guess. I currently involved in development of 3 monolith services. All are 6-7 years behind on the framework they were based on and making any sweeping refactorings is cost prohibitive and tantamount to a full rewrite. Were they architected as microservices (which entails not just code, but infra), major refactorings would&#x27;ve been on the table.<p>Code review policy feelings doesn&#x27;t make a lot of sense to me either. Company&#x27;s policy is all code goes through review. How one feels about it is not relevant, it&#x27;s a part of one&#x27;s job. Microservices or not, code gets reviewed.
foxyvabout 3 years ago
My favorite part of a micro service is when I walk into a project I&#x27;m unfamiliar with I can just dig into it. I&#x27;ve worked with a few monolithic applications for years without truly understanding half of what they do altogether. A micro service I can wrap my head around in a day or two.
ThereIsNoWorryabout 3 years ago
I&#x27;m just leaving my first job because - among other things - I really start dreading adding business features to a 20 year old huge monolith riddled with terrible code and even more terrible OOP inheritance roller coasters of madness - up, down, up, up, down, up, down ... who thinks this has anything to do with good abstraction wtf? - It certainly doesn&#x27;t help that the company has a &quot;it always worked so we will never change&quot; kind of attitude towards absolutely everything.<p>Currently, I couldn&#x27;t be more excited to start my new position in which I&#x27;ll be responsible for speed, reliability &amp; security of millions of cloud transactions in a microservice backend.<p>That being said, let&#x27;s see how I feel in 6 months. Experience need to be made by oneself.
nawgzabout 3 years ago
This really reads like a bad-faith interpretation of microservices. Of course microservices suck whenever someone starts a new one to do something that shares code or logic with already existing services. Likewise, of course monoliths suck when people just willy nilly add code and modules for each thing; low quality programming is low quality regardless of where it lives<p>Real microservices implementations don&#x27;t deliver so much from the proposed statement about synchronous web-tier request handling vs asynchronous compute workers in my experience. A few easy rules to guide this development are even touched on in the article, but treated like they could only ever be a tenet of monoliths.<p>Very strange.
hatwareabout 3 years ago
&quot;Microservices&quot; is just a tool that can help a technology company scale. Like any tool, when used improperly or with the wrong architecture, can be very bad for those involved.<p>Given how many fail to implement it right, it would help if we had a paradigm that caused less failure, but I don&#x27;t see the author recommending anything except for going back to monoliths. I understand their perspective but I&#x27;m not sure this is an either or scenario.<p>The solution is probably some new paradigm we haven&#x27;t figured out yet.
imwillofficialabout 3 years ago
As somebody working on software pipelines that do not use a micro service architecture, I’ve seen it becomes hard to manage large applications with tons of business logic. Smaller teams with their well defined pieces of the puzzle seem to be a better fit when you’re working at scale.<p>Not, I’m not a software developer, and I work on some of the largest software pipelines in AWS so my view might be distorted by my lack of experience in the field and the massive scale we operate at.
travisgriggsabout 3 years ago
Complexity breeds economy. It allows a greater number of members to participate in the value feed. Given the excess of cash in the economy, there has been less incentive to do things efficiently in many segments of the software industry. There is a glut of people exiting previous career paths, attending boot camp, so they too can participate. Modern web app development reminds of the portrayal of the British civil service portrayed in Yes, (Prime) Minister.
tootieabout 3 years ago
&gt; A Technical Solution To A People Problem<p>I spend like 98% of my time dealing with people problems. I will trade technical optimization for communication optimization every single time.
dupedabout 3 years ago
Stop talking about how inappropriate microservices are for applications that will never scale, they&#x27;re a goldmine for consultants contracting with &quot;CIOs&quot; that every middling sized company decided they needed because they heard about ransomeware on Fox News. Billable hours out the wazoo, converting totally reasonable monoliths into microservices that can&#x27;t be maintained by the clients and will always go over time and over budget.
fleddrabout 3 years ago
The problem with modularization and its supposed benefit of autonomy is that the universe disagrees. Everything is connected whether you like it or not.<p>A pure microservice ideally has no state, or if it does, its own data store. That&#x27;s awesome, until the front-end team wants a joined result (query) from multiple microservices, and thus data stores.<p>What are you going to do now? Build a proxy microservice in front of it? With shit performance, no referential integrity, and hard dependencies? More likely, you won&#x27;t do that, so the front-end is going to be looping calls. 50 network requests with each having parsing overhead just to render a simple list of things.<p>The autonomous team has their own roadmap, which in a connected universe (the one I live in) is a problem, not a solution. The business team really needs that mobile app to be shipped soon, but the micro service team has no room on the backlog for another 6 months to build the part needed. A business prioritization problem? Perhaps, but it just shows that autonomy is largely a fantasy. The reality is that as soon as something is &quot;one team away&quot; everything becomes dramatically slower and less flexible. That&#x27;s the price of autonomy.<p>All of this is like a 100 times worse than the ridiculed traditional software stacks, but hey, I&#x27;m not complaining. In a perverted way I benefit from delusional tech choices. It keeps me paid.
评论 #30762023 未加载
seanp2k2about 3 years ago
If you only have a few large services that work quickly and efficiently, you probably don&#x27;t have many teams working on them and have little overhead &#x2F; devops work. If you have thousands of microservices, suddenly you need many more architecture, platform, SSO &#x2F; auth &#x2F; ident teams, security teams, etc. Creates more jobs.
analyte123about 3 years ago
A compact, functional monolith can be leaked and downloaded under a warez link somewhere, or taken by a former employee to a new company. A sprawling byzantine landscape of poorly documented microservices can’t be pirated (or even reproduced legally) without resources close to the original creator.
peakabooabout 3 years ago
I never got exited about micro services because I understood that the complexity would be unreal.<p>I was watching as the industry went all in on something fundamentally wrong. It didn&#x27;t make anything better, it made everything worse.<p>Now we are looking back and wanting monorepos, monoliths with simple code, and low complexity.
RajT88about 3 years ago
I do not have a problem with a a product being implemented as Microservices if:<p>1. The Microservice platform itself is mature and stable. See: VMware Tanzu. 2. The devs implement traceability. See: CorrelationID 3. There is good cross-training between the Dev and SRE teams.<p>Actually. All 3 apply to Monoliths too.
master_yoda_1about 3 years ago
I somewhat disagree with this article. Microservice is great for complex software modules. But some jokers in industry starts writing miscroservice for every small function&#x2F;method in the code. It&#x27;s better that microservice should be designed by experts.
leephillipsabout 3 years ago
I can’t even tell what the author is trying to say. This reads like a machine translation.
davelacyabout 3 years ago
I&#x27;m of the opinion there are pros and cons to both approaches. Which of the two approaches is better for a company is dependent upon the relevant experience and preference&#x2F;work style of the developers.<p>The grass is always greener, as they say...
aryehofabout 3 years ago
&gt; Microservices: Why Are We Doing This?<p>1. Because many developers have no idea that it is possible to produce a “local <i>modular</i> application”.<p>2. Plumbing, technologies and deployment pipelines have become more important than a business problem domain.
desktopninjaabout 3 years ago
I believe there is a middle ground ... monolith + satellite services
AndyPattersonabout 3 years ago
SOAs when implemented correctly don’t have any of the issues Michael describes; for one, cascading errors shouldn’t happen and devs should test for this in their game days.
haolezabout 3 years ago
I&#x27;ve started my current project with microservices and I regret it. If I could start over, I&#x27;d simply use Rails and focus on the business instead.
da39a3eeabout 3 years ago
To people from the world of smaller companies, &quot;microservices&quot; means creating a lot of JSON &#x2F; GraphQL services and trying to make them talk to each other reliably.<p>People from big companies are also doing microservices but they don&#x27;t necessarily call it that. They use typed inter-process communication technology such as protocol buffer &#x2F; thrift etc, and work in a monorepo with statically typed languages. This makes things much more likely to work.<p>I suspect that in general smaller companies doing microservices should move in the direction of what the bigger companies are doing.
mupuff1234about 3 years ago
At what size does a microservice become a service?
评论 #30764794 未加载
lutarezjabout 3 years ago
I prefer to use the term &#x27;Hexagonal architecture based software&#x27; instead of &#x27;monolith&#x27;<p>I think this should be tought in schools
Philip-J-Fryabout 3 years ago
I&#x27;m part of a team that is slowly breaking down our systems into microservices. Our old monoliths were a pain to maintain, the pain comes from overengineering rather than being a monolith. I don&#x27;t fully buy that our business is better now because we use microservices. It just works well for us now that most of the business is moving to a new language.<p>We managed to write more performant code even though we&#x27;re calling off to 10+ services each request. Did microservices make our applications faster? Of course not, but they clearly exposed the issues with our monoliths. We could make the same applications even faster if we moved back to a monolith, but the worry is when does it get back to the state we were in before?<p>It was not uncommon to have multiple pieces of code calling into the database to grab the same data in our monoliths. The fact is that it&#x27;s way too easy to just DI a service where it doesn&#x27;t need to be and boom, a pointless DB call. Do it in a few more places, add a bit of a spiderweb here and there, and you&#x27;ve just amplified the number of database requests doing the same thing. Yes, a lot of this comes down to fundamental issues with the architecture of the applications, things that have been stacked over years and years of tech debt. It&#x27;s not an issue with a monolith, but rather how developers often treat them. There&#x27;s a sense that everything is on the table because it&#x27;s all in the same code base. A lot of developers don&#x27;t care to think of the future implications of injecting a service where it doesn&#x27;t belong, it does what they were asked and the person reviewing it thinks the same.<p>With microservices it feels like the decisions and behaviour of them are more public and there&#x27;s more eyes seeing what they&#x27;re doing. If someone is doing something weird, it&#x27;s easier to call out since these interfaces are public. Previously all the shit code got hidden in random pull requests. Now the shit decisions are out in the open. Everyone is interacting with the same microservices, a shit API is shit for everyone, a slow service slows everyone else&#x27;s services down, people seem to care more and make better decisions. There&#x27;s still those guys who just don&#x27;t give a shit and make a microservice into a macroservice. But when that happens it&#x27;s easier to see now, it&#x27;s in our faces, it&#x27;s not 500 lines of code hidden in a library, it&#x27;s easier to call out.<p>As time goes on I do long for a monolith again because personally I&#x27;ve learnt a lot from breaking down our systems into microservices. I know what touches what, I know what shouldn&#x27;t touch what. The domain knowledge gained from this project would indefinitely lead to a better engineered monolith. But at the end of the day, microservices force these decisions into the open and less architectural mistakes are being made, which is good.<p>This is also a big reason why I&#x27;m a fan of Elixir&#x2F;Erlang, you&#x27;re almost forced to think in microservices and that leads to better decisions.<p>One mistake I think a lot of people make is creating a web of microservices. You want to keep the hierarchy as flat as possible so that each microservice is entirely independent of another. When you want to actually do work, you write an orchestrator that calls into each of these services to carry out the work. This orchestrator is not a consumable service, it&#x27;s console app, it&#x27;s a website, it&#x27;s a product.
评论 #30760987 未加载
heleninboodlerabout 3 years ago
&gt; isn’t this an argument for ... better hiring instead?<p>What are the odds the companies aren&#x27;t already doing the best hiring they can?
CraigJPerryabout 3 years ago
&gt;&gt; A Technical Solution To A People Problem<p>I think the author has correctly identified the reason but the given explaination is wildly off base. There&#x27;s a much better answer to this and interestingly it predates the term &quot;microservice&quot; by around 40 years!<p>In 1968 the Conway, Melvin E. had his paper &quot;How Do Committes Invent?&quot; published, you can read it here: <a href="https:&#x2F;&#x2F;www.melconway.com&#x2F;Home&#x2F;pdf&#x2F;committees.pdf" rel="nofollow">https:&#x2F;&#x2F;www.melconway.com&#x2F;Home&#x2F;pdf&#x2F;committees.pdf</a> (since the article author mentions Waterfall which also has an excellent paper behind it; this one, like that, is super readable and accessible).<p>TL;DR &quot;organizations which design systems (in the broad sense used here) are constrained to produce designs which are copies of the communication structures of these organizations&quot;
shroompastaabout 3 years ago
It&#x27;s a case by case scenario.<p>I built my project in a microservice architecture, so when the author states that microservices were built so that teams can enjoy their independence, it doesn&#x27;t apply to me as I am currently a 1 man team.<p>I split my services up for many reasons, but primarily two, the ease of migrating from python to go as the ease of rebuilding one service at a time differs as opposed to a full blown rebuild, and also for performance and scaling as parts of my application will be hit harder by outside requests than others.<p>&gt;Web requests can be managed by one type of instance, that results in one EC2 image or whatever. Anything that can be handled within the lifecycle of one request can be handled there, and these instances are horizontally scaled behind a load balancer.<p>The author gave an extremely simple and generic system design, and while this can work for a sizable amount of applications, there are still a significant amount of applications that require and demand a more complicated structure.<p>One of the services that I have split, almost exclusively deals with real time connectivity with websockets which requires a towering amount of performance as opposed to the other services that I have - to place these in a monolithic structure, scaling would be incredibly awkward - imagine adding 10 more load balanced boxes just so you can handle your websocket requests, but now the part of your app that deals with all your http requests is now also horizontally scaled when it didn&#x27;t need to be.<p>&gt;On the communications front, internal web services are often doubly inefficient by using REST rather than binary transmissions. There’s no reason for any of this, and if multiple microservices hops are used, this all adds up and slows down the system. Even just a conversion to JSON and back is a wasted effort, more so if done dozens of times.<p>This is true - while initially developing internal communication with GRPC, I&#x27;ve reverted back to http despite the 30-50ms TLS&#x2F;SSL handshake simply because its a tired and true technology.<p>GRPC is still relatively new, with seemingly insubstantial development, and I was afraid to proceed further as roadblocks and technical debt may be accumulated in the future.<p>However, in a smaller mesh, in my opinion, anything shorter than ~150ms is insubstantial in my opinion - A blink of an eye is just about 150ms, and if it is the case that the internal requests are hitting multiple endpoints before resolving the original request, then it&#x27;s more of an architectural problem, not that &quot;microservices&quot; are a problem.<p>Not everything has to be finely chopped, but breaking some portions down can make it more digestible
6510about 3 years ago
Frank was going to die anyway.
deathanatosabout 3 years ago
&gt; <i>Microservices are, in that essence, a religious belief that we should approach with skepticism - as is true with many things in software.</i><p>This is a ridiculous strawman. The point of microservices is higher-level architecture and design: to have discrete components in your system that fulfill a single responsibility — do one thing, and do it well—, so that reasoning about the entire system as a whole becomes simpler. It allows the microservice to expose its implementation behind a well-defined API, and thus keep its privates private. Additionally, microservices permit those (sub-)systems to scale independently.<p>Monoliths can do <i>some</i> of that, but often the &quot;keeping the implementation private&quot; is the hard part. When every part of the system has access to a database, people <i>will</i> reach behind the API &amp; just get the data they need. It&#x27;s not <i>impossible</i> to prevent, per se, but having the service entirely separate makes for a much better, stronger separation that forces the API design &amp; planning that would not otherwise occur, as it would otherwise require a level of discipline that I don&#x27;t think today&#x27;s PMs and &quot;agile&quot;&#x2F;scrum permit to exist.<p>Now, the article tries to address one of my points,<p>&gt; <i>In the usual web application, this is not a problem, because load and tested ensures each VM will be tested to it’s autoscaling parameters, and then it will grow.</i><p>No, it most certainly does not… I&#x27;ve seen plenty of VMs in my career running monoliths that were 90+% idle and most RAM free, because the application was bottle-necked on the database. And even if they&#x27;re &quot;monoliths&quot;, there&#x27;s inevitably some other service not part of the monolith (either b&#x2F;c it is third-party, or what) that then gets its own ASG, it&#x27;s own set of VMs for redundancy … and it <i>is</i> waste. Never have I seen exactly 3 VMs running exactly 1 monolith.<p>(&amp; VMs are like the worse case, too, as they are inevitably hand-crafted snowflakes. But worse, if a dependency, such as a package, is required… what part of the system required it? If I remove a use, is the package still required? Answering these requires reasoning over <i>the entire monolith</i>, something that, once the codebase is big enough, becomes effectively impossible.)<p>&gt; <i>On the communications front, internal web services are often doubly inefficient by using REST rather than binary transmissions.</i><p>… this is beyond wrong and it doesn&#x27;t make any sense. You can serve Protocol Buffers over REST … is that not a &quot;binary&quot; transmission? (Not to mention that HTTP&#x2F;2 &amp; later is a binary protocol…) Sure, many people use JSON today, but there&#x27;s no requirement to do that, and I&#x27;ve written several RESTful endpoints that didn&#x27;t serve or consume JSON. (Generally because the requirements were such that that would make no sense.) The protobuf vs. JSON is a whole different debate, and each format has its pros &amp; cons, but it is certainly orthogonal to the question of whether microservices are good or bad…<p>&gt; <i>Code that needs to be shared between the asynchronous services and the web tier should be kept in libraries used by both of them and is not a service call.</i><p>If you&#x27;re going to do a monolith, yeah, this is what one should be doing. I&#x27;ve just literally never seen it done. (In fact, I&#x27;ve suggested it, mulitple times, when the second, third, fourth, fifth use case comes up: &quot;we have code for that, but it isn&#x27;t in library form. Let&#x27;s solidify it into a library, &amp; then change the existing consumers to use it, and then your use case is just another consumer&quot; is inevitably met with &quot;but I just want to do $whatever_it_is_thats_the_use_case it&#x27;s just one more instance of this code, what could it hurt?&quot; … followed by &quot;why am I hitting $corner_case&quot; and &quot;well, that&#x27;s some old organic growth; the original code, that we would have turned into a library, handles that…&quot;)<p>&gt; <i>The number of which does not really matter, but in a world of 200 microservices</i><p>This is strawman is repeated in every &quot;I hate microservices&quot; article. I&#x27;ve never seen microservices taken to that extreme, and yeah, if that&#x27;s what you&#x27;re doing, I expect you&#x27;re in for a world of hurt. But that&#x27;s not the point, and I doubt you actually have 200 well-defined systems with well-defined boundaries &amp; APIs. But yes, if you take something to the absurd, it breaks down?
deltaonefourabout 3 years ago
This is the story of software development. We have no formal way of defining which style is better. It&#x27;s just anecdotal arguments over and over again with no proof.<p>Like evolution, you would think the technology gets better through natural selection. However, selection pressure in the real world is vague. The best doesn&#x27;t necessarily win (just what works) and microservices is a form of genetic drift.
评论 #30764956 未加载
deltaonefourabout 3 years ago
I don&#x27;t usually see companies with microservices. It&#x27;s more like there&#x27;s this one big monolithic service with a bunch of satellite services orbiting the big one.<p>The only time where microservices truly exist is if you&#x27;re part of a big company that has a multitude of initiatives. But within a scope of a single project, there&#x27;s almost always a mothership.
TameAntelopeabout 3 years ago
Some people just like to be countercultural for the sake of it, and apparently the author is one of those people. Is there a word for reverse cargo culting? Cargo hipstering?<p>Not the apt, &quot;The cargo is from a plane!&quot; but rather, &quot;We never needed any of these supplies to begin with! We were better off starving!&quot;<p>It&#x27;s wholly unsurprising that the next series of topics the author plans to discuss are mental health. That makes <i>perfect</i> sense, given the rest of the article.
malkiaabout 3 years ago
Microservices is what allows one to scale independently.
monocasaabout 3 years ago
20% legitimate Conway&#x27;s law concerns, and 80% cargo culting other orgs&#x27; Conway&#x27;s law concerns in an effort to feel like you&#x27;re a big boy org with big boy org problems.
thinkharderdevabout 3 years ago
To me the core point is just that all access to persistent data should be mediated through a service interface which implements access controls and restricts what operations available in the underlying data store are exposed to other clients. Whether that qualifies as a &quot;micro service&quot; seems like mostly just a semantic game.
winternettabout 3 years ago
I hate to say it, but I told about 100 people this long long ago before they invested hard into microservices...<p>The same people who said to me that the pandemic would just last a few weeks.<p>The same people who though a PT Cruiser was a beautiful car.<p>The same people who believed dogecoin and NFTs would make them rich.<p>People keep willfully failing because there&#x27;s no incentive for them to be credible and accountable... There&#x27;s just all the money they can make from perpetuating lies.<p>Sometimes we need to unplug the microphone, or ask the more quiet individuals what they think.
efitzabout 3 years ago
Microservices actually allow teams to work independently of each other (once there are agreed on interface contracts) and more importantly, decouple schedule - I don&#x27;t have to wait or switch to something else if you&#x27;re 3 days late delivering your component; it is usually easy to mock the inputs and outputs and build test harnesses and do lots of things that are more difficult with monoliths.<p>HOWEVER, I don&#x27;t understand why people get religious about methodologies. Every time a new fad comes out, I don&#x27;t look at it as the &quot;One True Way&quot;, I just evaluate its strengths and weaknesses and add it to my toolbox. I also am not religious about following all the precepts of the new religion. I&#x27;ll mix agile and waterfall if I want. I will conduct my daily status meetings how I want and call them scrum, even if it&#x27;s just to piss off zealots. I will sit down during standup. I&#x27;ll mix microservices and monoliths. I will figure out the value I want from a methodology and be happy when I get that; I don&#x27;t believe in utopia anymore.
评论 #30761259 未加载
doctor_evalabout 3 years ago
I think the complexity claims for microservices are way overblown. There are a set of trade offs to be made on both microservices and monoliths.<p>For microservices you need a good idea of how you’re going to do IPC and how you’re going to maintain isolated state. In most cases there are reasonably easy solutions to both problems, but in general there is a little bit more more up-front work to do when starting with microservices.<p>For monoliths you need a good understanding of how you are going to upgrade a running system without downtime, and how you are going to stop developers from taking stupid shortcuts that create invisible internal coupling. IMO, if your team is big enough to have the necessary processes to get this right, it’s big enough to deal with microservices too.<p>So I honestly don’t get the hate from some on HN for microservices. You can fuck anything up if you try hard enough, but microservices epitomise the principles of good systems engineering, most particularly around separation of concerns. I honestly don’t understand why anyone would choose a monolithic architecture for a new build in 2022.
评论 #30761172 未加载