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.

The Death of Microservice Madness in 2018

993 pointsby Sandmanover 7 years ago

60 comments

shitloadofbooksover 7 years ago
I think &quot;microservices&quot; is so appealing because so many Developers <i>love</i> the idea of tearing down the &quot;old&quot; (written &gt;12 months ago), &quot;crusty&quot; (using a language they don&#x27;t like&#x2F;isn&#x27;t in vogue) and &quot;bloated&quot; (using a pattern&#x2F;model they don&#x27;t agree with) &quot;monolith&quot; and turning it into a swarm of microservices.<p>As an Infrastructure guy, the pattern I&#x27;ve seen time and time again is Developers thinking the previous generation had no idea what they were doing and they&#x27;ll do it <i>way</i> better. They usually nail the first 80%, then hit a new edge case not well handled by their architecture&#x2F;model (but was by the old system) and&#x2F;or start adding swathes of new features during the rewrite.<p>In my opinion, only the extremely good developers seem to comprehend that they are almost always writing what will be considered the &quot;technical debt&quot; of 5 years from now when paradigms shift again.
评论 #16201739 未加载
评论 #16200916 未加载
评论 #16200732 未加载
评论 #16201042 未加载
评论 #16201081 未加载
评论 #16203046 未加载
评论 #16201652 未加载
评论 #16203143 未加载
评论 #16201451 未加载
评论 #16202081 未加载
评论 #16200956 未加载
评论 #16203195 未加载
评论 #16242690 未加载
评论 #16203432 未加载
评论 #16206288 未加载
评论 #16204518 未加载
评论 #16201253 未加载
评论 #16201794 未加载
评论 #16206063 未加载
评论 #16204697 未加载
评论 #16201367 未加载
评论 #16204064 未加载
评论 #16204779 未加载
评论 #16206316 未加载
评论 #16202279 未加载
评论 #16203349 未加载
评论 #16204001 未加载
评论 #16202224 未加载
评论 #16201659 未加载
评论 #16200924 未加载
dvtover 7 years ago
Biggest issue with microservices: &quot;Microservices can be monoliths in disguise&quot; -- I&#x27;d omit the <i>can</i> and say <i>99% of the time are</i>.<p>It&#x27;s not a microservice if you have API dependencies. It&#x27;s (probably) not a microservice if you access a global data store. A microservice should generally <i>not</i> have side effects. Microservices are supposed to be great not just because of the ease of deployment, but it&#x27;s also supposed to make debugging easier. If you can&#x27;t debug <i>one</i> (and only one) microservice at a time, then it&#x27;s not really a microservice.<p>A lot of engineers think that just having a bunch of API endpoints written by different teams is a &quot;microservice architecture&quot; -- but they could&#x27;t be more wrong.
评论 #16200497 未加载
评论 #16200611 未加载
评论 #16200452 未加载
评论 #16200623 未加载
评论 #16202267 未加载
评论 #16200843 未加载
评论 #16200726 未加载
评论 #16200536 未加载
评论 #16202185 未加载
评论 #16200876 未加载
评论 #16203529 未加载
manigandhamover 7 years ago
There is no such thing as &quot;microservices&quot;, it&#x27;s just services, otherwise known as a service-oriented architecture (SOA). A service is a logical grouping of functionality as it makes sense in your business domain. A small service for a large company can be bigger than the entire product of a startup; there is no standard unit of measure.<p>Computers also don&#x27;t care how code is deployed and different services can be bounded by classes, or namespaces, or assemblies, or packages, or processes, or completely separate APIs reached over the internet on the other side of the planet.<p>Microservices can perhaps be defined as more of a deployment model but even then it&#x27;s 99% about the team and organization structure. As companies get larger, there is a trend towards smaller teams in charge of separate functionalities that create, deploy, and operate their own service. This can be effective in managing complexity and creating efficiency, although definitely not absolutely necessary.<p>All that being said, outside of the major software companies, I have seen exactly 0 uses of microservices where the benefits were worth the effort, if any benefits even appeared at all.
评论 #16203030 未加载
klodolphover 7 years ago
Background… I’ve been on good and bad projects that used microservices, and good and bad monolithic projects.<p>The madness is going away but the microservices are staying. There are some rationales for microservices that are conspicuously missing.<p>1. Fault isolation. Transcoder stuck in a crash loop? Upload service using too much RAM? With microservices, you don&#x27;t even really have to figure out what&#x27;s going on, you can often just roll back the affected component.<p>2. Data isolation. Only certain, privileged components can access certain types of data. Using a separate service for handling authentication is the classic example.<p>3. Better scheduling. A service made of microservices is easier to schedule using bin packing. Low priority components can be deprioritized by the scheduler very easily. This is important for services with large resource footprints.<p>The criticisms remind me of the problems with object-oriented programming. In some sense, the transition is similar: objects are self-contained code and data with references to other objects. The 90s saw an explosion of bad OO design and cargo cult architectures. It wasn&#x27;t a problem with OO design itself. Eventually people figured out how to do it well. You don&#x27;t have to make everything an object any more than you have to make everything a microservice.
评论 #16201835 未加载
评论 #16262300 未加载
评论 #16204337 未加载
wst_over 7 years ago
I found out recently that people too often think about microservices in context of broader solution like it would be one app, just scattered around. I did that mistake in the past, either. The longer I work with microservices the clearer it is to me that teams implementing them should forget about the big product, just focus on the service, as it would be product itself. Assume that anyone can use it, for any purpose they like, as long as they stick to the contract that is, and you&#x27;ll be fine.<p>I tend to have two layers of design, now. One - big picture, which treats services anonymously. Just black boxes that respond to input. The goal here is to build solution like kids are building stuff from building blocks.<p>Other layer depicts services, as separate beings. They treat all their clients anonymously. They have a contract to fulfill and whomever plays by the rules can be served all right. They should be treated as completely separate projects, have their own backlog, release strategies, etc.<p>Now, if you would have a product that utilize certain data, would you allow some anonymous guy from the internet tap to it directly? No need to answer, I guess.<p>Edit: typo
评论 #16201421 未加载
mikekcharover 7 years ago
Just for the record, I&#x27;m one of the people who thought that putting a CORBA ORB inside GNOME was a <i>fantastic</i> idea. We&#x27;re all young once!<p>Microservices are just another way for us to do premature subsystem decomposition -- because we <i>always</i> think that we can build components with stable APIs that will be small, clean and reusable. It&#x27;s even more fun to put that subsystem into a different process because, who doesn&#x27;t like a little bit of extra latency in their processing? I jest, but it&#x27;s not such a silly idea. By making sure everything is in another processes and using the most inefficient IPC system available (TCP&#x2F;IP), you ensure that nobody is going to do stupid things similar to what people tend to do with threads. The multi-processing aspect appeals to people because it helps them break down the problem into isolated chunks and reason about them.<p>The key here, though, is to realise that you almost never need multi-processing. The design challenge is actually the same whether you isolate your processing in different processes or not. However, it&#x27;s <i>much</i> easier to refactor your code when you haven&#x27;t put road blocks in your path first. If you are doing that, then it is easy to extract the functionality into a separate process if you need to (or even a thread if you happen to work in an OS that thinks that thread processing should be more efficient than process processing).<p>In short, don&#x27;t practice &quot;I must protect myself from the stupid programmers&quot; programming and instead concentrate on writing good code with your coworkers.
CryoLogicover 7 years ago
Best use I&#x27;ve found for microservices is highly isolated and well-defined stateless functions which make a significant (read compute intense) change to some data and drop it somewhere else e.g. image compression.<p>Now you can use this microservice anywhere and just change a few params in how you call it and you have avatars, thumbnails, etc.
评论 #16200997 未加载
评论 #16200781 未加载
评论 #16201144 未加载
ChicagoDaveover 7 years ago
I&#x27;ve delivered two major applications (400k users, critical internal apps) using micro-services in the cloud reducing cost and increasing continuous delivery capabilities.<p>There are definitely special cases, but overall, after 33 years building software, domain driven design, PaaS, micro-services, and continuous delivery is the most productive paradigm I have ever seen.
评论 #16202139 未加载
评论 #16205194 未加载
DanielBMarkhamover 7 years ago
There&#x27;s a ton of stuff here -- enough for a book or two. I loved the article although I might take issue with several of the smaller points. It&#x27;s way too much to go into on an HN thread.<p>There&#x27;s just so many topics that all come together here: stateless programming, pure FP, NetOps, DevOps, and so on. It feels like one of those cross-discipline discussions where it&#x27;s either really simple -- or really complex. In fact the core skill here is managing complexity across multiple domains up and down the entire stack. It all depends on the fine details and which choices you make.<p>I just finished a really good book which may seem unrelated to the current topic but actually is spot on. It&#x27;s &quot;Domain Modeling Made Functional&quot; It uses F#, but the principles involved apply no matter which language you&#x27;re using.<p><a href="https:&#x2F;&#x2F;pragprog.com&#x2F;book&#x2F;swdddf&#x2F;domain-modeling-made-functional" rel="nofollow">https:&#x2F;&#x2F;pragprog.com&#x2F;book&#x2F;swdddf&#x2F;domain-modeling-made-functi...</a>
评论 #16202426 未加载
paulddraperover 7 years ago
<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Law_of_conservation_of_complexity" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Law_of_conservation_of_complex...</a><p>Broadly speaking, microservices make small, limited changes&#x2F;update less complex, and large, sweeping changes&#x2F;updates more complex.<p>This is why generalizations like &quot;larger, established organizations [which make mostly relative small changes] should lean more to microservices than smaller, younger organizations [which make mostly relatively large changes]&quot; hold true.
评论 #16201251 未加载
评论 #16205536 未加载
cocktailpeanutsover 7 years ago
Here&#x27;s my experience. Some features are extremely good as Microservices. And I wanted to use it. But I don&#x27;t. Why?<p>1. Setting up a &quot;Microservices&quot; architecture itself is a convoluted process. If you&#x27;re not a Netflix or Amazon that will run hundreds of microservices, the up-front cost and time is NOT at all worth it. I would rather just run an app on Digitalocean.<p>2. IF I decided to bypass step 1 and just use existing vendors like AWS, Google, Microsoft, etc., first I don&#x27;t feel good about it because I know it&#x27;s in each vendor&#x27;s best interest to implement lockin, which conflicts with my own interest.<p>3. Lastly, none of the existing cloud function vendors have good user experience. AWS Lambda, Google cloud functions, etc. all require you to go through all the authentication related stuff before running a simple function, not to mention all the constraints that come with &quot;function based paradigm&quot;. Again, definitely not worth it unless you&#x27;re trying to run hundreds of these functions.<p>I think part 3 is critical, because I was willing to ignore part 1 and 2, as long as I could get my function up and running really easily. But none of the vendors make it easy. Sure, there are frameworks that let you do that like Apex and Serverless, but those also require setup. I would rather just run a DigitalOcean server for $5 which by the way can run multiple of those services as a regular server, without me having to spend time dealing with the complexities of function servers.<p>I thought about how this could be improved. Sure there can be some &quot;Heroku for functions&quot; SaaS, but nobody is excited about building SaaS startups nowadays because they know they can&#x27;t compete with large vendors in the very long run. (Unless you&#x27;re comfortable with just building a lifestyle business, which is totally fine, but I personally won&#x27;t rely on a lifestyle business SaaS)<p>The only way this can be improved is if each root vendors like Amazon, MS, and Google actually implemented better UI, but none of them are really focused on this since the reason they&#x27;re doing this business in the first place is not for consumers but to make sure they have leverage in this space. (If AWS dominated 90%+ of this market, the rest of the companies will be in a great risk in the long run)
hamandcheeseover 7 years ago
I feel like several of the purported benefits of microservices could be realized in a monolith as well.<p>Independent development - just stick to your own part of the app.<p>Reusability - write a library<p>Isolated deployments and deployment velocity - I suppose not isolated but there’s no reason you can&#x27;t achieve great velocity with a monolith.<p>A less often cited advantage that I do think has a lot of merrit is the ability to choose different languages and tools for different problem domains.
drejover 7 years ago
What I &quot;love&quot; about some microservice <i>implementations</i> (so not microservices in general), is that people use fast and scalable data platforms to analyze data in microseconds, but then slap a REST API in front of them, ideally with slow authentication and logging (and ideally in a different availability zone), so instead of waiting 20 ms for your metric, you get it in 3 seconds.<p>I love (without quotes) microservices for their isolation principle, people can kill off&#x2F;rewrite parts of the system without affecting other parts, written possibly in a whole different language etc., but lets not abuse it. If you put every tiny function behind an API, what you&#x27;ll get is a slow and unmaintainable mess.
narayanbsover 7 years ago
Being a veteran programmer,i find it funny how the article sounds like the stuff we used to read back in 2004-2005, during the heydays of spring and EJB.
评论 #16201416 未加载
bayonetzover 7 years ago
The issue with designing an internal service without a consumer in mind is it tends to bloat the functionality and interface to allow for a variety of speculative-at-best use cases. The issue with desiging an internal service with a consumer in mind is that you tend to build a &quot;distributed monolith&quot;. It&#x27;s like a fricken Zen riddle. That&#x27;s why it takes a master to navigate the middle ground successfully.
justinwpover 7 years ago
Appears to be hip to bash microservices now. We have some very clear reasons that keep us on the service oriented path.<p>- scaling based on very disparate resource requirements across our api<p>- security isolation of critical backend infrastructure<p>- language requirements and dependency management<p>- accommodating different skills and groups of skills across our organization
linkmotifover 7 years ago
People talk about building monoliths like it’s some simpler alternative. On the JVM it’s not.<p>When I first started with Java one of the coolest things was that I could embed anything. I could embed Elasticsearch in my web service. Wow! Forget services calling each other! I’ll prototype real quick with everything in one JVM!<p>But that proved impossible! :( It turned out that until Java 9, the JVM has a single namespace for all loaded classes. For me this was the greatest driving force for building out smaller services. You had to be very careful about dependencies and couldn’t just include Elasticsearch—or even much of anything—in your web service even if you wanted to. You’d be in immediate unresolvable dependency hell. I can imagine the insane artifacts people produce when they try to build monoliths on the JVM. Even with JavaScript now you have one huge flat dependency namespace. Good luck building a monolith.<p>I can only conclude that the all the people on this thread who are painting “monoliths” as some easy alternative developers are ignoring due to some inexplicable desire to make things complicated have no idea what they’re talking about.
评论 #16205167 未加载
gfioravover 7 years ago
Nice article but I&#x27;d point out two things:<p>1. &#x27;Death&#x27; is a bit too extreme. I think everybody is excited at first and tries to find an excuse to use microservices. We&#x27;re assisting to a decline in that initial push, that&#x27;s all.<p>2. I think the point about transactions is fair, as well as the expertise and team concerns, but the rest are mostly &quot;it&#x27;s too hard and complex&quot;. It&#x27;ll get better with time. I think that being a bit uncomfortable as a dev is not too bad, that&#x27;s what we&#x27;re here for (assuming there&#x27;s a real need of course).
评论 #16204181 未加载
mattbillensteinover 7 years ago
Microservices as a mechanism for mainly code organization are just a bad idea. Build a well-organized monolith first -- structure your code as in-process services so that you can factor those pieces out individually in the future.<p>I see smaller teams heaping in tons of complexity for no real gain; and actual measurable cost.
ec109685over 7 years ago
These two statements don&#x27;t reconcile:<p>&gt; Being both a developer and an operator is already tough (but critical to build good software)<p>&gt; Yes, with effective automation, monitoring, orchestration and so on, this is all possible<p>This argues for having a separate ops team to handle the complexity centrally (e.g. operating a kubernetes cluster, providing standard building blocks), so developers can concentrate on their services.
评论 #16203513 未加载
评论 #16202091 未加载
Mc_Big_Gover 7 years ago
Next up, mixing logic and presentation like it&#x27;s 1999 <i>cough</i> php <i>cough</i> react native
评论 #16203058 未加载
gshulegaardover 7 years ago
This is a well thought out and well reasoned article.<p>It resonates on many of the pain points of microservices. I also nearly broke out laughing at his definition of &quot;microservice madness&quot;:<p>&gt; Netflix are great at devops. Netfix do microservices. Therefore: If I do microservices, I am great at devops.<p>Because it is so hilariously accurate it&#x27;s almost painful.<p>I do want to point out something the author implies, which is that there <i>are</i> benefits to microservices as a pattern...and as a pattern it is likely here to stay. It&#x27;s an advanced pattern that comes with tradeoffs and complexity increases on the ops side. In the best case you&#x27;re trading developer complexity for operational complexity and perhaps also getting better reliability (but this is not a guarantee).<p>Additionally, projects like Kubernetes, Istio, and Envoy are all tools aimed at making certain operational complexities of microservices easier...so the operational trade offs are likely to change dramatically this year.<p>But in the end we can all still hope that madness dies in 2018 though.
he0001over 7 years ago
One thing I’ve noticed with microservices is the business rules duplication. Everyone tries to solve their problem so the same rules start popping up (ofc implemented differently and mostly unknowingly) in all these microservices. The problems start when the business requirements change and you need to change all Microservices.
linkmotifover 7 years ago
Will someone enlighten me as to why a microservice should have no dependent services? Seems reasonable to me.
评论 #16201092 未加载
评论 #16201194 未加载
评论 #16200890 未加载
daxfohlover 7 years ago
Why is scaling independently a pro? I&#x27;ve heard that argument before and never understood it.<p>If I have one api that is low throughput and one that is high, say requires 2 and 20 nodes respectively, then you need 22 nodes whether they are two independent microservices or a monolith. I&#x27;d think the monolith would actually be easier to manage as you don&#x27;t have to worry about how to divvy up the resources. All 22 nodes run the same code. Sure you could do the same with a k8s cluster autoscaling (I assume), but still, I don&#x27;t see how this makes anything strictly easier than a monolith scaling. If anything it seems like one more thing to worry about.<p>But I&#x27;ve heard the argument multiple times, so wonder if I&#x27;m missing something.
评论 #16202560 未加载
评论 #16201151 未加载
jonehollandover 7 years ago
I took his guide at the end and apparently we are supposed to do micro services, which is good, because we do as an engineering org of 800+ people.
评论 #16200354 未加载
评论 #16204210 未加载
bluepeterover 7 years ago
&gt; In fact, if you have stateless services, then I&#x27;d be inclined to consider skipping microservices altogether and consider using a serverless model.<p>What? Isn&#x27;t a serverless model necessarily a microservices solution?
mattknoxover 7 years ago
It&#x27;s fascinating to me that people don&#x27;t point out that you can get many of the benefits of microservices with all your code in a monolith, indeed, all in a single runtime. Of the 4 benefits he lists (1: independent development, 2: independent deployment 3: independent scalability, 4: reusability) you can mostly get 2-4 by deploying your monolith to different server pools that are deployed and routed to independently.<p>Microservices get to be necessary for large dev teams, but probably a lot later than most teams think.
eeccover 7 years ago
Yeah, finally. uS architectures quickly devolve into a haphazard home-grown variant of an ejb design.<p>You&#x27;ve gotta tip your hat to Sun, despite the OO crap and XML-itis the underlying ideas were - and are - sane.<p>Now, just as ejb was rightfully considered massive overkill for all but the most large-scale applications, just as simple servlet based (later on controller, service, persistence designs) we often more than enough to get the job done, same applies to uServices.
luikoreover 7 years ago
I think another (important) cause of microservice is politics:<p>When every department wants the easiest job with max outcome and the boss decides to split the cake equally, then an easy job X can be cut into N services which are usually named &quot;micro&quot;, resulting in a huge project of complexity (X&#x2F;N)^N for each team.
adambyrtekover 7 years ago
Great article, but I&#x27;d like to dispute one point:<p>&gt; A new version of the subscriptions service may store data in the subscriptions database in a different shape. If you are running both services in parallel, you are running the system with two schemas at once.<p>Microservices should manage their own separate data stores and communicate with others through a well-defined API. Only then services can evolve independently, and each team is free to change the internals (including schema migrations) without coordinating with everybody else.<p>Multiple services sharing the same database is the perfect example of the &quot;monolith in disguise&quot; anti-pattern mentioned in the article, with all of the costs of microservices but few benefits.
评论 #16204205 未加载
评论 #16201912 未加载
jakozaurover 7 years ago
Thumb rule: Divide number of backend engineers by 5 you get optimal number of micro-services.
评论 #16205416 未加载
ramsesover 7 years ago
&quot;Real world systems often have poorly defined boundaries&quot; ... I have seen teams getting hit by that multiple times. As usual, it is a bad idea to try to make everything fit a single model before attempting to understand the consequences.
HumanDrivenDevover 7 years ago
So it&#x27;s backlash time already?<p>A lot of technologies get a lot of hype over the years. But often the backlash is no less ignorant or fashion driven.<p>Is there a silent majority of us that look at these hype trends, consider them, and make a level-headed decision to see if they fit our problem? I never got into micro-services, because I worked on small teams and it seemed like over-engineering. But it&#x27;s an idea that I tucked away in the back of my head, that I&#x27;d still use if the situation calls for it, HN backlash be damned. The same goes for nosql databases or dynamic scripting languages or anything else that&#x27;s now irrationally hated.
sidhukoover 7 years ago
We are such a totalitarian part of the species. Someone writes about microservices and my next project I&#x27;m building services for each feature because some manager heard it increases reliability. The fact is its always science. If you don&#x27;t want your inconsistent dataset from somewhere else in the corporation taking down your application then chunk a part of the application into your own container to manage calls rather than allowing the event loop to block up. It doesn&#x27;t have to be &#x27;micro&#x27;, it has to exist for some reason, if not it is just your developers trying to be cool.
abvdaskerover 7 years ago
My two cents would be that tooling makes all the difference with microservices, especially in terms of developer productivity. Having tooling which allows me to test changes to a microservice locally and easily is a huge win, and without that tooling microservice development becomes much more difficult. Making it easy to test a service locally -- including its network interactions -- lets me be more confident that my code will work in production and reduces a lot of the cognitive overhead of developing one component among thousands.
marcobehlerover 7 years ago
Because I find debating about the pro&#x27;s and con&#x27;s about microservices somewhat cumbersome, I tried to let the code speak and record a screencast series on exactly this topics. (<a href="https:&#x2F;&#x2F;www.marcobehler.com&#x2F;series&#x2F;9-microservices-the-good-bad-ugly" rel="nofollow">https:&#x2F;&#x2F;www.marcobehler.com&#x2F;series&#x2F;9-microservices-the-good-...</a> ) Because I feel that especially in the Java world, Microservices are an utter abomination most of the time. Comments more than welcome!
geodelover 7 years ago
At my workplace, the idea is distort, disparage or destroy applications and replace with Spring boot thingie. Voila, now we have a &#x27;Next Generation Platform&#x27; based on microservices.
xtrapolateover 7 years ago
Decoupling code&#x2F;infrastructure is not a bad practice. As it so often turns out to be, &quot;Microservices&quot;&#x2F;&quot;Monoliths&quot; mean different things to different people, and your mileage may vary. Difficulties may be introduced going either way.<p>Choosing the right tool for the job is difficult, there are many variables at play. There&#x27;s a lot of value to people sharing their perspectives&#x2F;experience about these issues. At the same time, I think the overall discussion shouldn&#x27;t be so dichotomous.
ntrepid8over 7 years ago
I&#x27;ve often thought that micro-services were more of a software engineering management solution rather than a technical one.<p>From the perspective of a high-level architect it makes delegating certain types of responsibility a bit easier and potentially reduces the need for communication between teams while maintaining centralized control of the overall system.<p>However, it always seems to come with such a high overhead that IMHO it&#x27;s almost never worth doing unless there really isn&#x27;t another option.
TekMolover 7 years ago
I have recently been thinking about doing microservices by simply having a shared MySql DB that all modules connect to.<p>So for example one developer can create the backend and one developer can create the frontend. The codebases can be completely independent. One could use PHP+Laravel and the other one PHP+Symfony for example.<p>Frontend and backend would live on their own servers. And simply having the IP, login and PW of the shared DB set in their project.<p>What do you guys think about such an approach?
评论 #16200424 未加载
评论 #16200529 未加载
评论 #16200492 未加载
评论 #16200479 未加载
评论 #16200484 未加载
评论 #16200412 未加载
评论 #16200541 未加载
评论 #16200439 未加载
评论 #16200423 未加载
评论 #16200417 未加载
评论 #16200501 未加载
评论 #16200430 未加载
评论 #16200398 未加载
评论 #16200413 未加载
评论 #16200845 未加载
acdover 7 years ago
Agree with the author that Microservices are harder to operate in certain aspects. For example latency tracing with Microservices is harder when you have many services to check latency through, what service call caused the latency. Doing error tracing with Microservices is also harder because now you have to follow a web request through many different Microservices. Microservices in some cases may have worse performance than a monolith. With Microservices data no longer does in local memory or local cache, you have to traverse the network through an API calls to fetch data. Imagine that you have a monolith that can look up data in a hash table that is one memory&#x2F;cache access versus a micro service network call. In the micro service you have to make a network call for a memory lookup. A memory access may take between 0.5ns-100ns versus a network call may take 10000ns. That Microservices may be between 20000 times to a 100 times slower accessing remote memory in another Microservice than accessing it locally in the same monoliths memory. Thus one could argue that in some cases performance are worse with Microservices than a monolith. You can still scale stateless monoliths buy putting a load balancer in front of the monolith. There is also increased overhead of running Microservices, instead of having one Java process&#x2F;NodeJS process for a monolith you may have several hundred nodeJS processes Microservices running in Docker containers. Each NodeJS process takes memory for NodeJS itself. An important aspect of Microservices which are good is that they allow a part of the system to be restarted independently instead of restarting a whole monolith. <a href="https:&#x2F;&#x2F;radlab.cs.berkeley.edu&#x2F;people&#x2F;fox&#x2F;static&#x2F;pubs&#x2F;pdf&#x2F;j03.pdf" rel="nofollow">https:&#x2F;&#x2F;radlab.cs.berkeley.edu&#x2F;people&#x2F;fox&#x2F;static&#x2F;pubs&#x2F;pdf&#x2F;j0...</a>. Sometimes you may want to rewrite a component that is also much easier to rewrite with Micro services. Compare a Mainframe from the 60s-80s running a monotlith without unit testing &#x2F; integration testing versus modern micro services with testing. Replacing parts or the whole main frame monolith will be very very scary.<p>Latency Numbers Every Programmer Should Know <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;jboner&#x2F;2841832" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;jboner&#x2F;2841832</a><p>However I would argue Microservices has been done before the idea is not new. Microservices is a realization of the same principle as that of UNIX&#x2F;Linux. This is called the UNIX philosophy, Write one program that do one thing well. Make the output of one program the input of the other one.<p>Microservices are not a new idea, its the reimplementation of the UNIX philosophy for the web.<p>The UNIX philosophy <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Unix_philosophy" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Unix_philosophy</a><p>&quot;Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new &quot;features&quot;.&quot; compare with Microservice definition by wikipedia &quot;The services are small - fine-grained to perform a single function.&quot;<p>Improving reliaility with recursive reboots, Microservices on Kubernetes are at least implementing micro reboots in case of component failure. <a href="https:&#x2F;&#x2F;radlab.cs.berkeley.edu&#x2F;people&#x2F;fox&#x2F;static&#x2F;pubs&#x2F;pdf&#x2F;j03.pdf" rel="nofollow">https:&#x2F;&#x2F;radlab.cs.berkeley.edu&#x2F;people&#x2F;fox&#x2F;static&#x2F;pubs&#x2F;pdf&#x2F;j0...</a><p>Like most tech Micro services probably follow the Hype cycle <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Hype_cycle" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Hype_cycle</a>
wiremineover 7 years ago
Looks like Microservices have rounded the &quot;Peak of Inflated Expectations&quot; and heading into the &quot;Trough of Disillusionment&quot;<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Hype_cycle" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Hype_cycle</a>
fiboover 7 years ago
I use microservices and I experienced many venefits. More in general it follows Unix phylosophy.
crb002over 7 years ago
I use a monolith AWS Lambda function. No need for snowflakes unless some cary huge binaries.
delfarasover 7 years ago
&gt; When I started writing the answer to this question, it turned into a long description, so I&#x27;m actually going to separate it into another article and publish it a little later.<p>eheh, on an article about micro service madness
didibusover 7 years ago
Very good article. Though some of the downsides are also problems a distributed monolith could face, but overall I agree with the article. You have to consider the trade offs.
juanmirocksover 7 years ago
For my small team of 2, but with an increasingly more complex codebase, the orchestration of (micro)services indeed causes headaches. There is no silver bullet.
dpeckover 7 years ago
Good. More often than not it is overengineering that is blessed by technical management because it means they have seemingly less personnel issues.
styfleover 7 years ago
&gt; If your boundaries are actually not well defined, then what happens is that even though theoretically services can be deployed in isolation, you find that due to the inter-dependencies between services, you have to deploy sets of services as a group.<p>This is the part I keep getting hung up on. Even with perfect boundaries, there always seems to be a cross-cutting feature that would require touching all of the services.
ramsesover 7 years ago
The author omitted an important one: microservices are the new source of spaghetti code.<p>When trying to implement as multiple microservices something that should actually be a single service—i.e., the ms&#x27;s are not useful as independent units—answering a single API request is an amazing mess of distributed calls all over the place and unnecessary serialization&#x2F;deserialization of queries.
z3t4over 7 years ago
If you can separate something out into it&#x27;s own completely independent and reusable module, you should always do so. Also if something can scale by adding concurrency, that is often a good strategy. For example in conferences where every participant is supposed to talk, you can divide them into groups, so many people can talk at the same time but in small groups.
tuananhover 7 years ago
microservices bring more advantages for management than technical people.<p>- easier to manage (smaller team) - easier to hire (we can hire good people with different skillset) - easier to scale - and so on...
Daycrawlerover 7 years ago
Call me back for the Death of Cargo Cult Programming altogether.
cottsakover 7 years ago
Someone ping me when HN shows a headline which reads &quot;The Death of JS Madness in ??&quot;.<p>Same issues right? Complexity === pain and we can&#x27;t seem to grasp this as developers. Are we the most self-flagellating people on the planet?
fragostiover 7 years ago
Still really important for scaling teams.
Chiba-Cityover 7 years ago
Reminds me of distributed architectures like CORBA turning into spaghetti in the 90&#x27;s.
评论 #16201395 未加载
jlebrechover 7 years ago
what we need is a polyglot PaaS that&#x27;s only runs microservices, lambda is the closest to that ideal right now.
Ericson2314over 7 years ago
Microservices (in practice) are like polyglot: throwing away type safety for no good reason. This shit needs to stop.
评论 #16201977 未加载
stevenmaysover 7 years ago
I posted this a few days ago... I wonder why HN didn&#x27;t keep the original post.<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16159589" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16159589</a>
评论 #16200325 未加载
评论 #16205558 未加载