Live data from Hacker News

Goodbye Microservices: From 100s of problem children to 1 superstar

segment.com

131–140 of 782 posts

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#131
post #105

Before you go down the path of splitting your app up into microservices you should grok erlang/BEAM/OTP. Lots of thinking went into its creation that leads to highly reliable real time systems and at the very least some of the ideas can be lifted in informing how to best design things. (But really, you should probably just use it instead.)

Or just use Erlang/Elixir etc and you will have your microsrevices platform without k8s and most of the pain :)

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#132

I've always said if the Linux kernel can be a giant monolith, in C no less, than there's maybe 100 web applications in the world that need to be split into multiple services. I've worked with microservices a lot. It's a never-ending nightmare. You push data consistency concerns out of the database and between service boundaries. Fanning out one big service in parallel with a matching scalable DB is by far the most sa…

You push data consistency concerns out of the database and between service boundaries. Gotta put that CS Masters to work somehow. Can't just sit here doing plumbing all day every day. Maybe there could be a software development corollary to the Politician's Syllogism[1], or even just a webdev one. 1. https://en.wikipedia.org/wiki/Politician%27s_syllogism

there's also this: https://www.karllhughes.com/posts/plumbing

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#133

Microservices are an organizational and design choice that is intended to mirror the structure of the teams or engineers, the actual human beings doing this stuff. It seems like Segment didn’t really understand this at all, and instead decided to have seemingly arbitrary and rediculous service boundaries that had no relationship to the real world. See also people who create poor abstractions in their code and other s…

> it’s an article about how bad Segment’s engineering team is

That's totally unnecessary and reflects poorly on you for having said so.

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#134
post #26

Not that I disagree with microservices easily going awry, the problem here seems to be traced to shared library code. Each microservice should be as standalone as possible. Your contract with that service is the service contract. Not some shared library. As soon as you have shared library, you now have coordinated deployments. And that is just not fun and will cause problems. The trick here is that this does mean you…

There is commonality across those 140 services that they extracted into a shared library so they weren’t copying that commonality 140 times.

The fix, then, is to put that commonality into a new microservice the other microservices call.

The more I read about the problems people have with microservices, the more I'm convinced they've never read about flow-based programming.

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#135

Microservices are an organizational and design choice that is intended to mirror the structure of the teams or engineers, the actual human beings doing this stuff. It seems like Segment didn’t really understand this at all, and instead decided to have seemingly arbitrary and rediculous service boundaries that had no relationship to the real world. See also people who create poor abstractions in their code and other s…

As a principal engineer at Segment with over 20 years’ experience at successful companies large and small, I can personally attest to the fact that our team is incredibly talented and thoughtful. We make our engineering decisions very carefully and are highly evidence driven. Our choices are highly pragmatic and we investigate and analyze the trade-offs whenever we make a significant change such as this. I’m proud of…

[deleted]

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#136

Microservices are an organizational and design choice that is intended to mirror the structure of the teams or engineers, the actual human beings doing this stuff. It seems like Segment didn’t really understand this at all, and instead decided to have seemingly arbitrary and rediculous service boundaries that had no relationship to the real world. See also people who create poor abstractions in their code and other s…

I don't they think are worse than anyone else. It takes courage to write about failures and micro services are a complex thing to get right.

It would be fascinating to see this posted 6 months from now but with a man's name and picture on the byline and see if the comments are so negative.

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#137

Earlier quoted context omitted.

Not really. For example, it's easier to mock a microservice, than a module, for testing purposes. Let's say you have component A and component B, A depends on B (dependency implemented via runtime sync or async call), B is computationally intensive or has certain requirements on resources that make it harder or impossible to test on developer's machine. You may want to test only A: with monolithic architecture you'll…

Mocking modules for unit testing has been a solved problem for decades in almost every language.

Mocking modules for unit testing - yes. Testing the specific build artifact with a module replaced by a mock - no, it is not.

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#138

Microservices are an organizational and design choice that is intended to mirror the structure of the teams or engineers, the actual human beings doing this stuff. It seems like Segment didn’t really understand this at all, and instead decided to have seemingly arbitrary and rediculous service boundaries that had no relationship to the real world. See also people who create poor abstractions in their code and other s…

As a principal engineer at Segment with over 20 years’ experience at successful companies large and small, I can personally attest to the fact that our team is incredibly talented and thoughtful. We make our engineering decisions very carefully and are highly evidence driven. Our choices are highly pragmatic and we investigate and analyze the trade-offs whenever we make a significant change such as this. I’m proud of…

OP can correct me if I'm wrong, but I believe the comment around Segements engineering team was most likely referencing the original decision to create hundreds of microservices in the first place.

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#139
post #4

I'm not sure what they've been left with is a monolith after all. I would say they just have a new service, which is the size of what they should have originally attempted before splitting. In particular, as to their original problem, the shared library seems to be the main source of pain and that isn't technically solved by a monolith, along with not following the basic rule of services "put together first, split la…

Agreed. Reading about their setup and comparing with some truly large scale services I work with, I'm left with the idea that Segment's service is roughly the size of one microservice on our end. Perhaps the takeaway is don't go overboard with fragmenting services when they conceptually fulfill the same business role. And regardless of the architecture of the system, there are hard state problems to deal with in asso…

The most telling fact is that it "took milliseconds to complete running the tests for all 140+ of our destinations". I've never worked on a single service whose tests ran that fast, given that the time spent by the overhead of the test framework and any other one-time initialization can take a few seconds just itself. It's great to have tests that run fast, but that's a bit ridiculous.

Some rules of thumb I just came up with:

Number of repos should not exceed number of developers.

Number of tests divided by number of developers should be at least 100.

Number of lines of code divided by number of repos should be at least 5000.

Your tests should not run faster than the time it takes to read this sentence.

A single person should not be able to memorize the entire contents of a single repo, unless that person is Rain Man.

Re: Goodbye Microservices: From 100s of problem children to 1 superstar

#140

Microservices are an organizational and design choice that is intended to mirror the structure of the teams or engineers, the actual human beings doing this stuff. It seems like Segment didn’t really understand this at all, and instead decided to have seemingly arbitrary and rediculous service boundaries that had no relationship to the real world. See also people who create poor abstractions in their code and other s…

Nothing you said addresses the issues they mentioned: > In early 2017 we reached a tipping point with a core piece of Segment’s product. It seemed as if we were falling from the microservices tree, hitting every branch on the way down. Instead of enabling us to move faster, the small team found themselves mired in exploding complexity. Essential benefits of this architecture became burdens. As our velocity plummeted,…

They used microservices to paper over poor testing hygiene and software architecture. Forking one service into a bunch of different flavors of the same service multiplied the maintenance complexity. Services/microservices that are tightly coupled to shared libraries with lots of surface area are an anti-pattern. Instead, I would make the shared libraries into a service, and make a standard interface for the destinations as plugins.
Post reply on HN