News for hackers. Stuff that matters.
Re:Ask HN: How do you keep track of releases/deployments of ... by bhouston on Tuesday April 20, 2021 @08:07AM (#26873475)
We just made all the microservices into one big monorepo and we deploy all at the same time.

To be honest we tried to avoid the monorepo but it was hellish. Maybe if each microservices was larger and our team was larger but then are they microservices any more?

Re:Ask HN: How do you keep track of releases/deployments of ... by lovedswain on Tuesday April 20, 2021 @08:23AM (#26873605)
The biggest difficulty I've experienced is "librification", where some common code ends up in a little library, and soon that library is not so little any more, and not long after starts to look like half of every service. I can maintain discipline when working on small systems alone, but on a team there will always be one lazy person or urgent need which means eventually some shared component gains enough gravity to start sucking code out of their nice isolated homes

Giving up and dumping everything into a monorepo, that's not going to help at all. At that point probably better off just giving up any hope of carefully split up and individually managed services

Re:Ask HN: How do you keep track of releases/deployments of ... by bhouston on Tuesday April 20, 2021 @10:53AM (#26875514)
These libraries already exist whether you write them or you use someone else's. In our case most of our micro services are node.js based so Koa is in every microservice and we use middleware for authentication -- and thus if the authentication system evolves (moving to JWT or a microservice gateway) we have to evolve that middleware everywhere.

Same with our consistent logging system.

Libraries are better than unique code everywhere for the same task - allows you to fix a bug once and to do consistency checking.

Re:Ask HN: How do you keep track of releases/deployments of ... by rgoulter on Wednesday April 21, 2021 @03:06AM (#26886289)
The problem isn't "some code which different services use is in a library".

The problem is an not-ideal "the code which is in libraries shared by different services is tightly-coupled to particular services". e.g. changing the shared library might break some service which depends on it.

Obviously, you don't want code like that. But it's easy to write code which is slightly coupled; and then when you're in a hurry, to increase the coupling.

Re:Ask HN: How do you keep track of releases/deployments of ... by mewpmewp2 on Tuesday April 20, 2021 @09:07AM (#26874055)
I don't get the first paragraph you are saying. This lazy person puts some random code into a shared component, or... ?

Wouldn't this urgent need mean that they put this code into the microservice that needs this urgent update as opposed to going through the effort to make it available for everyone to use?

Re:Ask HN: How do you keep track of releases/deployments of ... by slifin on Tuesday April 20, 2021 @05:47PM (#26882227)
This video was interesting to me

https://youtu.be/pebwHmibla4

Re:Ask HN: How do you keep track of releases/deployments of ... by Cthulhu_ on Tuesday April 20, 2021 @08:13AM (#26873528)
Microservice is a misnomer; it should have a responsibility, but that could be 10 lines of code or 10 million.

Anyway, it sounds like you have a distributed monolith. If you cannot maintain and deploy a microservice independently, it should not be a microservice.

Re:Ask HN: How do you keep track of releases/deployments of ... by notwedtm on Tuesday April 20, 2021 @08:52AM (#26873895)
I don't build microservices anymore. All of the reasons listed in this thread tend to cause bottlnecks. I aim for domain services. Define your domains, and build a program to service it.
Re:Ask HN: How do you keep track of releases/deployments of ... by UK-Al05 on Tuesday April 20, 2021 @10:43AM (#26875349)
That's microservices. Microservices handle a bounded domain. At least in traditional advice for splitting microservices. The microservice provide an api for that domain.
Re:Ask HN: How do you keep track of releases/deployments of ... by jblwps on Tuesday April 20, 2021 @11:55AM (#26876356)
Doesn't a "service" handle a domain?
Re:Ask HN: How do you keep track of releases/deployments of ... by UK-Al05 on Tuesday April 20, 2021 @12:26PM (#26876848)
Putting micro in front of service was a bad idea. Lots of people have the wrong idea because of that.
Re:Ask HN: How do you keep track of releases/deployments of ... by goodpoint on Tuesday April 20, 2021 @11:45AM (#26876182)
No, that's SOA. Microservices are almost always described as quite small.
Re:Ask HN: How do you keep track of releases/deployments of ... by UK-Al05 on Tuesday April 20, 2021 @12:22PM (#26876777)
The "Building Microservices" book, which used to be the goto book for microservices suggests on page 31 to page 38 that bounded domains are a good model for microservices.

The main difference between SOA and microservices is dump pipes vs smart pipes. Not service size. As explained in that book.

Most people trying to implement microservices seem to have not read much about them outside of blogs.

Re:Ask HN: How do you keep track of releases/deployments of ... by ex_amazon_sde on Tuesday April 20, 2021 @12:55PM (#26877266)
Quoting some book does not change the fact that most people understand SOA as being team or domain-bound and microservices as being much smaller.
Re:Ask HN: How do you keep track of releases/deployments of ... by UK-Al05 on Tuesday April 20, 2021 @01:01PM (#26877336)
I'm assuming most people adopting micro-services weren't even around when SOA was a big thing.

People not reading the literature then implementing it badly isn't problem with the idea. In the same way that not studying calculus then doing badly isn't a problem of calculus.

Most of these issues around microservices like how to split them so they don't cause issues, are known and solved problems. Just people have not read the literature other than the odd "blog". Like don't do microservices, for your first iteration. Backwards compaitble apis, and understand your bounded contexts from your first iteration before you try.

They end up creating chatty nano services with tons of version fixed cross dependencies.

Re:Ask HN: How do you keep track of releases/deployments of ... by tdeck on Wednesday April 21, 2021 @01:12AM (#26885652)
Interesting because I always thought SOA was just a slightly older term for microservices.
Re:Ask HN: How do you keep track of releases/deployments of ... by bhouston on Tuesday April 20, 2021 @10:46AM (#26875404)
> Anyway, it sounds like you have a distributed monolith. If you cannot maintain and deploy a microservice independently, it should not be a microservice.

We can maintain and deploy them independently, but it was annoying to try to track which version was deployed where and having to check it out independently, etc.

The overhead was incredibly high. So we plopped them all into a single monorepo as sub projects. We can still update each one individually but we know what is live on the website is what is in the head of that branch.

As someone whose last website was a monolith (Clara.io), we do feel we are getting the benefits of micro services with little of their downsides now. It is like night and day.

It may be we have a lot of micro services for the size of our team - 20+ micro services and a team size of around 12.

Re:Ask HN: How do you keep track of releases/deployments of ... by BurningFrog on Tuesday April 20, 2021 @10:13AM (#26874954)
One "wisdom" I hear is that the benefit of microservices is organizational:

One microservice per team, so you cut down on intra-team friction, and the team can manage their own releases.

Re:Ask HN: How do you keep track of releases/deployments of ... by beastcoast on Tuesday April 20, 2021 @11:13AM (#26875779)
What people miss is that micro services/SOA is an organizational concept more than anything. At Amazon, SOA is tied to the concept of the two pizza team. Each 2PT completely owns a collection of related services, owns the roadmap for those services, and can make deployments independently of any other team. If your company doesn’t have enough engineers to justify at least say 5-10 scrum teams then you might not be large enough to need microservices.
Re:Ask HN: How do you keep track of releases/deployments of ... by ex_amazon_sde on Tuesday April 20, 2021 @11:50AM (#26876277)
Spot on! This is the right granularity.
Re:Ask HN: How do you keep track of releases/deployments of ... by dfcowell on Wednesday April 21, 2021 @05:33AM (#26887266)
Microservices are a solution for scaling teams, not software or infrastructure.

(In other words, you're 100% spot on!)

Re:Ask HN: How do you keep track of releases/deployments of ... by myzie on Tuesday April 20, 2021 @08:16AM (#26873545)
+1 to this. In our case we say "deploy all" but use Zim[1] to automatically determine which services have associated changes. This keeps the overall deploy quick.

This is comparable to CloudFormation or Terraform in terms of determining whether something is up-to-date, but more general purpose.

[1] https://github.com/fugue/zim/

Re:Ask HN: How do you keep track of releases/deployments of ... by JensRantil on Saturday May 01, 2021 @12:03PM (#27007346)
"Microservices" is a tool to solve problems. The goal isn't microservices, the goal is to solve those problems. Example of problems it might solve: Unclear ownership, slow innovation, unstable software or orthogonal scaling of features.
Re:Ask HN: How do you keep track of releases/deployments of ... by nicoburns on Tuesday April 20, 2021 @09:03AM (#26874011)
Perhaps they shouldn't be microservices. What would be the disadvantage if you combined your microservices into a monolith? Or perhaps 4-5 "macroservices"?
Re:Ask HN: How do you keep track of releases/deployments of ... by jayd16 on Tuesday April 20, 2021 @10:07AM (#26874879)
In this case I think the disadvantages would be you're locked into one machine type and your blast radius is a bit wider.
Re:Ask HN: How do you keep track of releases/deployments of ... by taneq on Wednesday April 21, 2021 @10:54AM (#26890453)
I was going to make some sarcastic response to the effect of "iT's EvErGReeN" but this is basically the only answer. You don't do individual releases of your microservices any more than you do individual releases of the classes/functions in your C++ project.