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.

Some thoughts on microservices

146 pointsby filipnover 3 years ago

23 comments

acjohnson55over 3 years ago
Microservices are not a solution, they&#x27;re a capability. It&#x27;s powerful for a team to be able to deploy a tiny service with the absolute minimum amount of explicit plumbing to meet operational requirements. Whether they <i>should</i> break their system up this way is a case by case judgment.<p>Every place I&#x27;ve been, the costs of microservices get overlooked in favor of the illusion of decoupling. Microservices will absolutely make simple features fully contained within a service easier, but as soon as a feature spans services or even impacts the contract of a service, you&#x27;re in for more pain than in a monolithic architecture. Microservices sieze local simplicity at the cost of integration complexity.<p>Microservices, as a philosophy, is encoding your org design at the networking layer. I hope you get it the factoring right the first time, because it&#x27;s going to be painful to change.<p>I&#x27;m all for small services where they make sense. But just like the advice that &quot;all functions should be small&quot; microservices has been myopically adopted as a design principle, rather than a debatable decision.
评论 #29408267 未加载
评论 #29407873 未加载
评论 #29404097 未加载
评论 #29409320 未加载
评论 #29408431 未加载
cjfdover 3 years ago
One should probably not even think of microservices if one employs fewer than 100 programmers. In many cases microservices are introduced because of fashion and&#x2F;or resume driven design not because it actually makes sense. I prefer refactoring a poorly structured monolith to refactoring poorly structured microservices in every case.
评论 #29403293 未加载
评论 #29406255 未加载
评论 #29403189 未加载
评论 #29403131 未加载
评论 #29405810 未加载
评论 #29403720 未加载
papitoover 3 years ago
First of all, we called these &quot;distributed systems&quot;. We reserved those for rare cases where scale was THE requirement, and you jumped into it fully expecting to have no life.<p>The world did not finally &quot;crack&quot; distributed systems. Most companies created multiple microservices, putting their small dev team underwater because &quot;this is the way at the FAANG&quot;.<p>All of your DRY principles are out the window, and now you have to debug in production - the new word for <i>that</i> is OBSERVABILITY.<p>Not to mention that the actual reason for distributed systems is to scale multiple parts of the system independently, but you need to KNOW what has to scale individually before you do it. What I see is that the topology really reflects the company structure, of course. It&#x27;s not &quot;what has to scale separately&quot;, it&#x27;s &quot;team Y is working on X, and team Y does not want to talk to team Z, so they will create a service to make sure they don&#x27;t have to talk to people&quot;.<p>Except that this is a giant self-own. We all still have to talk to each other, like, a LOT, because things just keep breaking all the time and no one knows why.<p>Dropbox, Instagram, StackOverflow - these companies are largely monoliths to this day. You thinking that your small outfit needs to be like Google is highly arrogant.<p>And don&#x27;t get me started on the amount of money, people, CPU cycles, and CO2 emissions wasted on this solving of the problem most people don&#x27;t have.
recursivedoubtsover 3 years ago
Microservices means just that: tiny, single purpose services that deploy and scale on their own.<p>I often see appeals to Conway&#x27;s Law when discussing microservices, but teams don&#x27;t organize themselves this way. Instead, teams work on a <i>macro</i> services: the email delivery team, or the monitoring team, or whatever. In most cases these macroservices would be best implemented and deployed as a monolith, and then presented to the outside world over a reasonable API.
评论 #29404670 未加载
bob1029over 3 years ago
Start with a monolith and only break it up if you are actually forced to by the computer (i.e. the process won&#x27;t fit in ram anymore or eats all the CPU&#x2F;IO). The second you break up your monolith, you lose its most powerful feature - The direct method invocation. The amount of time I see developers spending on JSON wire protocols, CORS problems, API endpoint designs, et. al. really is starting to concern me. I sometimes wonder if anyone wants to do any actual work or if this is just a big game to some people.<p>I did the full trip on this microservices rollercoaster. Monolith =&gt; uServices =&gt; Monolith.<p>I used to vehemently advocate for using microservices because of <i>how easy</i> it would be to segment all the concerns into happy little buckets individuals could own. We used to sell our product to our customers as having a &quot;microservices oriented architecture&quot; as if that was magically going to solve all of our problems or was otherwise some inherent feature that our customers would be expected to care about. All this stuff really did for us is cause all of our current customers to walk away and force a re-evaluation of our desire to do business in this market. All the fun&#x2F;shiny technology conversations and ideas instantly evaporated into a cloud of reality.<p>We are back on the right track. Hardcore monorepo&#x2F;monolith design zealotry has recovered our ship. We are focused on the business and customers again. The sense of relief as we deprecated our final service-to-service JSON API&#x2F;controllers was immense. No more checking 10 different piles of logs or pulling out wireshark to figure out what the fuck is happening in-between 2 different code piles at arbitrary versions.
评论 #29409435 未加载
wayoutthereover 3 years ago
I have found one other use case: limiting the blast radius of ops and deployment issues. As an example, I once was working with a large telecom client who had their AAA web service (yes, don’t roll your own auth, but this client was big enough and had the right expertise on staff to do so) in the same monolith as their account management web service. The account management service saw active, frequent development to support new functionality while the AAA code only got updated a couple times a year.<p>Why touch a critical web service relied upon by literally every product you have when you don’t have to? Your business still functions if account management is offline; but not when authentication is offline. Even short outages to auth were unacceptable (millions of customers) and any updates had to be performed in constrained windows due to the criticality of the service.<p>So we cleaved off the mission-critical parts, stuck them in their own repos to be versioned independently, which let us move faster on the account management work since we could confidently deploy code that wasn’t 100% working because we didn’t need to wait for a maintenance window.
FinanceAnonover 3 years ago
Fundamentally, I don&#x27;t really see much difference between monoliths and microservices.<p>In a monolith, you just call another function&#x2F;class, but in microservices that function is a http call. I guess the benefit of microservices is the ability to independently scale different microservices, being able to choose different languages for different microservices and less conflicts in the repo as more people work on it, but you still have to deal with backwards compatibility and versioning of endpoints.<p>I think lambdas are interesting when you look at it this way. A microservice is essentially a set of functions which is constantly deployed as one unit. But with Lambdas, each function is a single unit that can scale independently.
评论 #29403383 未加载
评论 #29403323 未加载
评论 #29405944 未加载
评论 #29403563 未加载
评论 #29422776 未加载
评论 #29404979 未加载
评论 #29403517 未加载
评论 #29404865 未加载
评论 #29408086 未加载
BoumTACover 3 years ago
I watch the other day, the Lex Fridman podcast with Kevin Systrom, founder of Instagram.<p>He talks about the scaling issue; they were using Django at that time and scale up to 50 millions users with a small team of developers.<p>I do not think a majority of companies have more than 50 millions users and absolutely need to go full microservices.<p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=3pvpNKUPbIY" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=3pvpNKUPbIY</a>
评论 #29403159 未加载
评论 #29403752 未加载
Sohcahtoa82over 3 years ago
My thoughts on microservices...<p>They&#x27;re fine. But what&#x27;s NOT fine are <i>nano</i>services. I did security on a project once where it seemed that every function was its own microservice. User registration, user login, and password resetting were each a separate microservice. It was an utter nightmare.
评论 #29408120 未加载
评论 #29406634 未加载
评论 #29406031 未加载
daxfohlover 3 years ago
For me it&#x27;s the repetition in horizontal tasks. Need to update TLS version? Need to move to a new region? Need to add i18n? You have to do these things 20 times instead of one.
tomrodover 3 years ago
Hey! I enjoyed this post a lot. I agree with almost all your points raised except for single-team == no microservices. Your prose makes your points easy to understand.<p>I have a couple layout comments:<p>First, I love that you have a high contract text-to-background. That is really helpful for me. There was&#x2F;is a trend to have light gray on white backgrounds for blogs; this is absolutely a terrible pattern. I appreciate that you did not go this route.<p>Second: serif fonts are difficult to read when the font size is relatively small. Something like Jura or similar could maintain the &quot;terminal&quot; feel without getting bogged down in serifs.<p>Third: I have a really hard time reading content when it uses smaller fonts and uses a minor fraction of the screen. This is what I see: <a href="https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;NPCBkHJ" rel="nofollow">https:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;NPCBkHJ</a> -- I am getting older, and reading smaller fonts is increasingly difficult for me. I tend to keep my zoom at 150%, something about this page forced it back to 100%. I am not well versed in responsive design, so I don&#x27;t know the technical details for it, but having zoom maintain or using a larger font would save some cognitive cost to older users like myself needing to zoom in.<p>Thanks for your thoughts on microservices!
bluGillover 3 years ago
I&#x27;m looking at micro services for a different reasons: security. I have given up on the idea that our code will ever be completely secure. However micro services means if someone breaks into one service they can&#x27;t see data belonging to a different service. (that is run each service as a different user, and so OS protections means file commands cannot open such data)<p>This only protects against some threats related to insecure code, but layers of protection is the key to threats and it is useful for the parts it does help.
评论 #29407541 未加载
评论 #29403890 未加载
nunezover 3 years ago
OP makes a really good point in that dev teams also need to own their infrastructure when everything is a microservice. Asking &quot;DevOps&quot; to change an infra component prior to a release just shifts the monolith under the rug while also completely defeating the point of DevOps.<p>Lots of devs don&#x27;t know infrastructure that well, though this is changing with the adoption of Kubernetes. Additionally, most devs don&#x27;t want to go on-call when their app crashes unexpectedly.
kakoniover 3 years ago
&quot;microservices is a psyop by big tech to make deploying &amp; maintaining software so insanely difficult that future potential competitors are too tied up trying to keep the cloud equivalent of &quot;hello world&quot; afloat to present any real threat&quot;<p><a href="https:&#x2F;&#x2F;twitter.com&#x2F;htmx_org&#x2F;status&#x2F;1462636513578135556" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;htmx_org&#x2F;status&#x2F;1462636513578135556</a>
alexchamberlainover 3 years ago
An interesting list, but is this specific to Microservices, or just Service Oriented Architecture in general?<p>For me, other than the obvious size difference, the difference between microservices and &quot;large&quot; (?) services is that a single team breaks down their domain into sensible layers, abstractions etc.
评论 #29403384 未加载
choegerover 3 years ago
If I was CTO of a company, microservices would give me nightmares. How do you do due diligence on used free software (licenses and security updates)? How do you plan the resource usage of your whole setup if every developer can add a new autoscaling service? Who is actually keeping track on deployments so we don&#x27;t accidentally overload the system? How do you refactor a cross-service feature consistently? And the worst part: Who keeps track of the n*n contracts between the services?<p>I mean yes, I know that each of these problems can be solved, sometimes in a relatively straightforward manner. But who really has all these aspects covered and doesn&#x27;t run some services that started to smell weirdly a couple of months ago?
评论 #29408314 未加载
roberthahnover 3 years ago
I find people’s reactions to microservices to be fascinating. I have always looked at them with the same framing as Unix userland tools - many small, focused apps that do something really well, coupled with a super generic IPC mechanism - in Unix’s case, using pipes or message queues.<p>But Unix isn’t all small tools. We have servers for the heavy work- like databases.<p>The challenge then becomes; how do you design that IPC mechanism? Maybe it exists! I don’t know the answer yet. But it’s something I think about a lot and I haven’t seen compelling evidence for “microservices are always bad, no exceptions”
评论 #29404938 未加载
samwillisover 3 years ago
“The longer I’m in tech, the more I’m convinced microservices were a technical solution to an organizational problem.”<p>@carnage4life on Twitter<p><a href="https:&#x2F;&#x2F;mobile.twitter.com&#x2F;carnage4life&#x2F;status&#x2F;1311702322024644608" rel="nofollow">https:&#x2F;&#x2F;mobile.twitter.com&#x2F;carnage4life&#x2F;status&#x2F;1311702322024...</a><p>Now, I’ve not had the pleasure of working in an organisation using Microservices and so I’m only informed anecdotally. But I always assumed they where best used as an API boundary between teams, rather than adding more complexity to a teams work.
评论 #29403936 未加载
评论 #29403730 未加载
orefaloover 3 years ago
Conways law is not about structuring... it&#x27;s about domain knowledge.<p>ie. if you work alone on a problem, you can only solve for the issues you know.
daxfohlover 3 years ago
I was going to say that one nice aspect is that rollbacks are less frequent because the size of each deployment is smaller. But I&#x27;ve worked on million line code bases that still do weekly CICD pretty well, so I don&#x27;t know if that advantage really holds water.
KronisLVover 3 years ago
&gt; Never start with a microservice architecture if you have a single team.<p>This is probably a good point, however isn&#x27;t the entirety of the story.<p>Personally, i agree that most teams shouldn&#x27;t start out with microservices, monoliths can be entirely sufficient and are easier to run and reason about. Otherwise you might end up with so much operational complexity that you don&#x27;t have much capacity left to actually develop the software and make sure that it&#x27;s actually good.<p>However, you also need to think about the coupling within your monolith, so that if the need arises, it can be broken up easily. I actually wrote more about this in my blog, in an article called &quot;Moduliths: because we need to scale, but we also cannot afford microservices&quot;: <a href="https:&#x2F;&#x2F;blog.kronis.dev&#x2F;articles&#x2F;modulith-because-we-need-to-scale-but-we-also-cannot-afford-micro-services" rel="nofollow">https:&#x2F;&#x2F;blog.kronis.dev&#x2F;articles&#x2F;modulith-because-we-need-to...</a><p>Where this goes wrong, is that no one actually thinks about this because their code works at that point in time, so they make their PDF report generation logic be tightly coupled to the rest of the codebase, same as with their file upload and handling logic, same with serving the static assets etc., so when suddenly you need to separate the front end from the back end, or extract one of the components because it&#x27;s blocking updating to newer tech (for example, Java 8 to Java 11, everything else works, that one component breaks, so it would be more logical to keep it on the old&#x2F;stable version for a bit, instead for it to block everything else), you just can&#x27;t.<p>Sooner or later, containers also have to be brought up, since they can be a way to do a multitude of applications in a manageable way, but at the same time it&#x27;s easy to do them wrong, perhaps due to not understanding the tech or some of the potential concerns.<p>Many out there think that &quot;doing containers&quot; involves taking their legacy monolith, putting it inside of a container and calling it a day. It isn&#x27;t so, and you&#x27;ll still have plenty of operational challenges if you do that. To do containers &quot;properly&quot;, you&#x27;d need to actually look into how the application is configured, how it handles logging, external services, and how it handles persistent data. And it&#x27;s not the &quot;No true Scotsman&quot; fallacy either, there are attempts to collect some of the more useful suggestions in actionable steps, for example: <a href="https:&#x2F;&#x2F;12factor.net&#x2F;" rel="nofollow">https:&#x2F;&#x2F;12factor.net&#x2F;</a><p>(though those suggestions aren&#x27;t related directly to containers alone, they can work wonderfully on their own, outside of container deployments)<p>Lastly, i&#x27;ve also seen Kubernetes be used as almost something synonymous to containers - in some environments, you can&#x27;t have a conversation about containers without it being mentioned. I&#x27;ve also seen projects essentially fail because people chose it due to its popularity and couldn&#x27;t cope with the complexity it introduced (&quot;Oh hey, now we also need Istio, Kiali, Helm, oh and a Nexus instance to store Helm charts in, and we&#x27;ll need to write them all, and then also have a service mesh and some key value store for the services&quot;), when something simpler, like Docker Swarm or Hashicorp Nomad would have sufficed. I actually have yet another blog topic on the subject, &quot;Docker Swarm over Kubernetes&quot;: <a href="https:&#x2F;&#x2F;blog.kronis.dev&#x2F;articles&#x2F;docker-swarm-over-kubernetes" rel="nofollow">https:&#x2F;&#x2F;blog.kronis.dev&#x2F;articles&#x2F;docker-swarm-over-kubernete...</a><p>(honestly, this also applies outside of the context of containers, for example, picking something like Apache Kafka over RabbitMQ, and then being stuck dealing with its complexity)<p>In conclusion, lots of consideration should be given when choosing both the architecture for any piece of software, as well as the tech to use to get it right. In some ways, this is slower and more cumbersome than just pushing some files to an FTP server that has PHP running there, but it can also be safer and more productive in the long term (configuration drift and environment rot). Sadly, if the wrong choices are made early, the bad design decisions will compound with time.
评论 #29403400 未加载
maxdoover 3 years ago
Yet another “based on my experience” opinion. Based on my experience our service would fail due to performance because we’ll , nodejs is still single thread. Given this we should either duplicate deployment of big service by roles that gives you same level of orchestrating complexity or rewrite in different languages, means hello microservices again :) ps our product was initially written by non tech cofounders that used heroku and microservices from day one. They used a swarm of small services to stay on free tier. So microservices in this use case are cheaper. And yes, it&#x27;s simpler for non experience developer to get up to speed with your backend if it&#x27;s a simple service.
评论 #29407412 未加载
orefaloover 3 years ago
I do not agree with many of your points.<p>I also agree with some of them.