Readit News logoReadit News
trishume · 6 years ago
It seems like most or all of the benefits listed in this post could have been achieved just as easily by changing code in their monolith. Like the ElasticSearch optimizations and the decoupling from the relational database.

Similarly the benefits they do tie explicitly to microservices like scoped errors and tests can also be achieved in monoliths with simple filters on the errors and tests being run, without all the work of splitting out the service.

seperman · 6 years ago
I do not disagree with your comment. As I mentioned in the article the main reasons to break into micro-services are:

1. Independent releases 2. Easier for on-boarding new engineers 3. Scale micro-services independently

The rest of the article is about how to use the breakout opportunity to make major changes to the code and the data-structure. The goal is for the users of the service to have an aha moment of "Search is so much faster after the breakout!".

gitgud · 6 years ago
Microservices are almost completely opposed to agile development. They require a strong architecture before implementation and are much harder to reconfigure regardless of versioning. The running system is also hard to manage.
simplify · 6 years ago
How is it easier to on-board new engineers? You mentioned but did not explain this point.
drbojingle · 6 years ago
How many engineers do you have and what's your growth in manpower like?
ryan_j_naughton · 6 years ago
I don't disagree.

Micro-services to us roughly translate to k8/kubernetes deployments. By splitting the monolith into separate deployments we had more granularity in responding to web traffic vs inventory processing pipeline traffic.

In our case we did happen to have a new repository for it, but the same could have been achieved with better separation of concerns and refactoring within a monorepo/monolith.

But if you are already separating concerns to that level (e.g. only some parts of a service's code base are allowed to talk to X data store and other parts are only allowed to talk to Y data store), then why not break them out into separate services.

You get follow on benefits of the service separation including different teams can worry about fewer moving parts and can more easily work independently. Having well defined service boundaries implies properly versioned APIs. This is in stark contrast to having implicit APIs internal to a single service that often result from object oriented access patterns.

socialist_coder · 6 years ago
Totally.

It does seem like they had a good reason for splitting out search though: "We needed to release search updates independently and changes were frequent."

But yeah, I'm not sure why they are attributing the perf gains to the microservices. Very curious...

seperman · 6 years ago
The performance gains of the API were not the by-product of cutting into micro-services. Basically this article is about "We had some issues with the monolith, we cut it into micro-services and also did these other changes along the way that saved us money and gave us performance boost. Changes that we could have done in the monolith but they were less risky and easier to do in the micro-service in comparison to doing them in the monolith."
flukus · 6 years ago
Did they explain what was stopping them from releasing search updates quickly from a stable branch of the monolith? Not that I disagree with the approach, deployment units are the best place to put application boundaries, but it doesn't seem like a good enough reason to re architect an application.
Marinlemaignan · 6 years ago
Looking for some buzzy headline maybe ?
bobm_kite9 · 6 years ago
Why is microservices so much more popular right now than, say, distributed processing via the actor model? It feels like splitting things up with HTTP boundaries is a lot of work, less flexible and precludes a lot of re-use. Is it just because of advances in tooling lately like Kubernetes and docker?
seperman · 6 years ago
That is a great question. Kubernetes and docker and the recent addition of service mesh layer definitely do make things easier for micro-services. However as another commenter mentioned, Microservices are typically an organizational rather than technical feature. We do use pubsub pattern for distributed processing widely. Regarding the http boundaries point that you brought up, we use gRPC instead of HTTP for most services.
skohan · 6 years ago
Conceptually microservices is about building loosely-coupled components. Client agnostic interfaces are a part of that, but using HTTP is just an implementation detail.

HTTP makes sense from the standpoint that if you want to have a lot of flexibility over how and where your services are run, they can be addressed the same way whether they're running on one box in your living room or distributed across several data centers.

aylmao · 6 years ago
Interesting article, though I wish there were more details on why this was cheaper, and where the hundreds of thousands of dollars saved annually came from.
seperman · 6 years ago
Mainly saved in infrastructure costs: Elasticsearch and Kubernetes resources.
ryan_j_naughton · 6 years ago
Also from Fair here.

A lot of the cost savings were because we could decrease the size of our elasticsearch cluster. This was mostly due to the flattening of the elasticsearch document schema, which improved performance dramatically but also allowed us to run significantly fewer ES nodes.

yandrypozo · 6 years ago
I went straight searching for advises on how to avoid a distributed monolith, but no luck, looks like most of the micro-services now days are just distributed monolith.

Let's share advises about it: https://medium.com/unbabel/your-distributed-monoliths-are-se...

argd678 · 6 years ago
This is cutting it close to say microservice, it’s just two services and they don’t fan out or have a lot of the complexity that causes the down sides; such as fan outs that require tracing to debug, requires too many services to startup on your laptop for dev, load testing and tuning, common libraries that cause systemic failures or require world rebuilds when modified, service to service authentication...
seperman · 6 years ago
This is a very simplified version of our architecture just for the purpose of this article. We have exactly 83 micro-services currently.
tutfbhuf · 6 years ago
Writing new code is faster than understanding existing code.

Different teams should have enough room to not step on each other toes.

Soft boundaries tend to be overruled over time, because of human laziness.

mnd999 · 6 years ago
I’m not so sure, I’d rather start from what is there, understand it and go from there.

Sure, if you start over you may we’ll get there faster but you’ll probably repeats some of the same mistakes all over again.

skohan · 6 years ago
I think the temptation to "rewrite the whole thing" is often strong with a large legacy project, and often doesn't pan out as well as it seems because while it is effective at eliminating a lot of the cruft and architectural missteps of the legacy codebase, it also means throwing out all of the subtle behaviors and edge-case-handling which has been built up over years of iteration.

I am a proponent of the disposable-code philosophy though: no system should be considered "off limits", and a healthy codebase should probably be completely rewritten every couple of years. It should just be done incrementally, in a modular way in most cases rather than throwing out the whole thing and starting again.

profalseidol · 6 years ago
Can you view Microservices in the same light as multiple companies? Just like when your monolith calls on a third party API that does the payment for you - ain't that also a microservices that happens to involves 2 different individual companies?
seperman · 6 years ago
Hmm, not sure if I'm completely following... Yeah you can consider them separate entities if they are truly decoupled.
raptorraver · 6 years ago
Good read, thanks!

I’d be interested to know how long this all took and how many developers were involved.

seperman · 6 years ago
It took over a quarter of the year with one engineer 100% dedicated to it and between 1 to 3 other engineers involved part-time over different stages of the project.