Live data from Hacker News

You want microservices, but do you need them?

docker.com

141–150 of 151 posts

Re: You want microservices, but do you need them?

#141

Earlier quoted context omitted.

What characteristics define "legacy hell"? I'm curious, and the specific list of problems and pain points (if--big if!--everyone there agrees what they are) can help more clearly guide the decisions as to what the next architecture should look like--SoA, monolithic, and so on.

Try 20+ year of git history. (yes they migrated to git from svn). The biggest obstacle is changing people's mindsets from legacy programming to modern DevOps workflow. Making them believe it's worth the effort.

Say more? That sounds like an old codebase, and poor programming practices. What about the codebase and your struggles with it suggests that a rearchitecture is in order? What about it suggests that microservices might be the right solution?

I apologize if that sounds critical; it's not meant to be. Microservices/SoA are often the best available solution given human and technical constraints--I'm not skeptical, just curious.

Re: You want microservices, but do you need them?

#142

Earlier quoted context omitted.

Try 20+ year of git history. (yes they migrated to git from svn). The biggest obstacle is changing people's mindsets from legacy programming to modern DevOps workflow. Making them believe it's worth the effort.

Say more? That sounds like an old codebase, and poor programming practices. What about the codebase and your struggles with it suggests that a rearchitecture is in order? What about it suggests that microservices might be the right solution? I apologize if that sounds critical; it's not meant to be. Microservices/SoA are often the best available solution given human and technical constraints--I'm not skeptical, just…

I never said microservices were a solution, I said a service-oriented architecture is a giant leap forwards for a legacy platform.

This whole thread is about how microservices are often abused when they're not necessary, and to clarify my point, I completely agree with that.

Re: You want microservices, but do you need them?

#143
post #117

Earlier quoted context omitted.

Well the canonical example is WhatsApp, but there are loads of other success stories if you care to look. Small teams, big results is a characteristic that I’m very interested in, in our post-ZIRP reality.

I'm familiar with Whatsapp and its relationship with erlang (there's RabbitMQ as well, which I always forget when asked..) But they're the only real case studies If I were to say "Go", people can point to big projects like Docker, Kubernetes, etcd, Googles internal use, and a few others (Uber?) Erlang just doesn't have that sort of buy in, which is concerning because it's been around longer than Go (as a FOSS languag…

The ideas in Erlang keeps getting (poorly) reinvented.

So it remains a “secret” weapon and I am fine with that. Not everything have to be validated by popularity in order to be unreasonably effective.

Re: You want microservices, but do you need them?

#144

I am a big fan of 'do one thing and one thing well' -- that UNIX philosophy. Whether it's a program that does something well... or simply a function/procedure --- it all depends on the problem I/we are trying to solve. I never liked using the word "Microservices" but my aim has always to build SIMPLE solutions. I learn new words in this world. For the most part I am building "Miniservices" but there are a few that ar…

I personally think ZeroMQ is severely underutilized. Fixes so many problems. But it can be hard to encourage adoption. It’s not HTTP, or a conventional queue system. Requires lots of explanations, thinking, and eventually meetings.

I made a lot of uses for the Push-Pull pattern in ZeroMQ.. but there was others used as well here and there (Pub-Sub, etc)

However -- I cannot praise the use of ROUTER-DEALER !! What a GREAT pattern for sending large chunks of data without waiting for a reply for each.

HTTP is not fit for such a task.

However - I totally get you! Trying to explain certain decisions really does take up time and effort. Before you know it, I have lost 4 hours one day, a few another, etc.

In the end you ask if I should have done something mediocre... but everyone understands.

("mediocre" is not the correct word to use. I mean I could have gone with Kafka or RabbitMQ. It's just an extra layer which would have involved infrastructure and further delays (at that time))

Re: You want microservices, but do you need them?

#145
post #61

Earlier quoted context omitted.

I see a lot of value in spinning up microservices where the database is global across all services (and not inside the service) but I struggle more to see the value of separate core transactional databases for separate services unless/until the point where two separate parts of the organizations are almost two separate companies that cannot operate as a single org/single company. You lose data integrity, joining abil…

> I see a lot of value in spinning up microservices where the database is global across all services (and not inside the service) This issue with this is schema evolution. As a very simple example, let's say you have a User table, and many microservices accessing this table. Now you want to add an "IsDeleted" column to implement soft deletion; how do you do that? First you need to add the actual column to the databas…

I get your point around the soft deletion example but that sounds more like poor module separation + relational query abstraction/re-use rather than a shared database issue. Whether it's through a service, a module or a library, leaky abstraction boundaries will always cause issues. I see your point about separately versioning separate services which I think can make certain kinds of migrations more tractable -- but it comes at the expense of making it heavier and prolonging the duration of supporting two systems.

The difference I generally see with shared-state microservices is that now you introduce a network call (although you have a singular master for your OLTP state), and with isolated state microservices, now you are running into multiple store synchronization issues and conflict resolution. Those tradeoffs are very painful to make and borderline questionable to me without a really good reason to sacrifice them (reasons I rarely see but can't in good faith say never happen).

Pertaining to your IoT example -- that's definitely a spot where I see a reason to move out of the cozy RDBMS, which is an access pattern that is predominated by reads and writes of temporal data in a homogenous row layout and seemingly little to no updates -- a great use case for a columnar store such as Clickhouse. I've resisted moving onto it at $MYCORP because of the aforementioned paranoia about losing RDBMS niceties (and our data isn't really large enough for vertical scaling to not just work) but I could see that being different if our data got a lot larger a lot more quickly.

Maybe putting it together, there are maybe only several reasons I've seen where microservices are genuinely the right tool for a specific job (and which create value even with shared state/distributed monolith):

1) [Shared state] Polyglot implementation -- this is the most obvious one that's given leverage for me at other orgs; being able to have what's functionally a distributed monolith allows you to use multiple ecosystems at little to no ongoing cost of maintenance. This need doesn't happen for me that often given I often work in the Python ecosystem (so being able to drop down into cython, numba, etc is always an option for speed and the ecosystem is massive on its own), but at previous orgs, spinning up a service to make use of the Java ecosystem was a huge win for the org over being stuck in the original ecosystem. Aside from that, being able to deploy frontend and backend separately is probably the simplest and most useful variant of this that I've used just about everywhere (given I've mostly worked at shops that ship SPAs).

2) [Shared state] SDLC velocity -- as a monolith grows it just gets plain heavy to check out a large repository, set up the environment run tests, and have that occur over and over again in CI. Being able to know that a build recipe and test suite for just a subset of the codebase needs to occur can really create order of magnitude speed ups in wall to wall CI time which in my experience tends to be the speed limit for how quickly teams can ship code.

3) [Multi-store] Specialized access patterns at scale -- there really are certain workloads that don't play that well with RDBMS in a performant and simple way unless you take on significant ongoing maintenance burden -- two I can think of off the top of my head are large OLAP workloads and search/vector database workloads; no real way of getting around needing to use something like ElasticSearch when Postgres FTS won't cut it, and maybe no way around using something like Clickhouse for big temporal queries when it would be 10x more expensive and brittle to use postgres for it; even so, these still feel more like "multiple singleton stores" rather than "one store per service"

4) [Multi-store] Independent services aligned with separate lines of revenue -- this is probably the best case I can think of for microservices from a first principles level. Does the service stand on its own as a separate product and line of revenue from the rest of the codebase, and is it actually sold by and operated by the business that independently? If so, it really is and should be its own "company" inside a company and it makes sense for it to have the autonomy and independence to consume its upstream dependencies (and expose dependencies to its downstream) however it sees fit. When I was at AWS, this was a blaringly obvious justification, and one that made a lot of intuitive sense to me given that so much of the good stuff that Amazon builds to use internally is also built to be sold externally.

5 [Multi-store] Mechanism to enforce hygiene and accountability around organizational divisions of labor - to me, this feels like the most questionable and yet most common variant that I often see. Microservices are still sexy and have the allure of creating high visibility career advancing project track records for ambitious engineers, even if at the detriment to the good of the company they work for. Microservices can be used as a bureaucratic mechanism to enforce accountability and ownership of one part of the codebase to a specific team to prevent the illegibility of tragedy of the commons -- but ultimately, I've often found that the forces and challenges that lead to those original tragedy of the commons are not actually solved any better in the move to microservices and if anything the cost of solving it is actually increased.

Re: You want microservices, but do you need them?

#146
post #41

I would really like to send this article out to all the developers in my small company (only 120+ people, about 40 dev & test) but the political path has been chosen and the new shiny tech has people entranced. What we do (physics simulation software) doesn’t need all the complexity (in my option as a long time software developer & tester) and software engineering knowledge that splitting stuff into micro services re…

If you have workloads with different shapes, microservices make sense. If not, do the monolith thing as long as you can. But if you're processing jobs that need hand off to a GPU, just carve out a service for it. Stop lamenting over microservices. If you've got 100+ engineers and different teams own different things, try microservices. Otherwise, maybe keep doing the monolith. If your microservice is as thin as leftp…

Indeed, that's whatthe article captures here:

>> Microservices make sense in very specific scenarios where distinct business capabilities need independent scaling and deployment. For example, payment processing (security-critical, rarely updated) differs fundamentally from recommendation engine (memory-intensive, constantly A/B tested). These components have different scaling patterns, deployment cycles, and risk profiles, which justify separate services.

Re: You want microservices, but do you need them?

#147

I would really like to send this article out to all the developers in my small company (only 120+ people, about 40 dev & test) but the political path has been chosen and the new shiny tech has people entranced. What we do (physics simulation software) doesn’t need all the complexity (in my option as a long time software developer & tester) and software engineering knowledge that splitting stuff into micro services re…

Try sharing it with them anyway!:D

Re: You want microservices, but do you need them?

#148

I'm helping a company get out of legacy hell right now. And instead of saying we need microservices, let's start with just a service oriented architecture. That would be a huge step forward. Most companies should be perfectly fine with a service oriented architecture. When you need microservices, you have made it. That's a sign of a very high level of activity from your users, it's a sign that your product has been s…

That's the right approach. This is what the article suggests:

>> For most systems, well-structured modular monoliths (for most common applications, including startups) or SOA (enterprises) deliver comparable scalability and resilience as microservices, without the distributed complexity tax. Alternatively, you may also consider well-sized services (macroservices, or what Gartner proposed as miniservices) instead of tons of microservices.

Re: You want microservices, but do you need them?

#149

I’m always shocked when engineers smitten with the microservices bug try to insist that converting a simple, reliable, in-process function call to a network hop plus serialization plus retry and back off and circuit breaker logic is going to be faster. I’m sure that there are situations where microservices are appropriate, but I’ve never seen one. Mostly I see engineers playing in a sandbox of complexity and then shi…

Well said!

Every service boundary replaces a function call with a network request. That one choice cascades into distributed transactions, eventual consistency, and operational overhead most teams don't need. ¯\_(ツ)_/¯

Re: You want microservices, but do you need them?

#150
post #143

Earlier quoted context omitted.

I'm familiar with Whatsapp and its relationship with erlang (there's RabbitMQ as well, which I always forget when asked..) But they're the only real case studies If I were to say "Go", people can point to big projects like Docker, Kubernetes, etcd, Googles internal use, and a few others (Uber?) Erlang just doesn't have that sort of buy in, which is concerning because it's been around longer than Go (as a FOSS languag…

The ideas in Erlang keeps getting (poorly) reinvented. So it remains a “secret” weapon and I am fine with that. Not everything have to be validated by popularity in order to be unreasonably effective.

Sounds like haskell.
Post reply on HN