Live data from Hacker News

Microservices should form a polytree

bytesauna.com

1–10 of 121 posts

Re: Microservices should form a polytree

#4
post #3

This actually makes a lot of sense. I have one question though. Why is having 2 microservices depend on a single service a problem?

The explanation given makes sense. If they're operating on the same data, especially if the result goes to the same consumer, are they really different services? On the other hand, if the shared service provides different data to each, is it really one microservice or has it started to become a tad monolithic in that it's one service performing multiple functions?

I like that the author provides both solutions: join (my preferred) or split the share.

Re: Microservices should form a polytree

#7
post #6

Is there any way to actually enforce this in reality? Eventually some leaf service is going to need to hit an API on an upstream node or even just 2 leaf nodes that need to talk to each other.

IAM roles.

Said less snarky, it should be trivial to define and restrict the dependencies of services (Although there are many ways to do that). If its not trivial, that's a different problem.

Post reply on HN