Live data from Hacker News

Ask HN: What's your biggest struggle with Microservices?

news.ycombinator.com

31–40 of 77 posts

Re: Ask HN: What's your biggest struggle with Microservices?

#31
post #27

I'm privately skeptical about starting with microservices-first for new application development. I have seen a lot of literature about starting off with a monolith and then breaking that down as you see fit. This makes more sense to me than introducing a ton of complexity up front. Or is it better to deal with that complexity up front and then adding new services/functionality will be easy as time goes on?

I'd recommend starting with a monolith, but pay extreme attention to properly separating modules and hiding them behind a small, well-defined API. Then it will become easier to separate these modules out as necessary.

Re: Ask HN: What's your biggest struggle with Microservices?

#32

Development environment becomes somewhere between extremely hard and impossible to set up. Resign yourself to running tests locally with staging as the only place to test your services talking to each other. This is my experience at a medium size public company on the bay area.

This is common, but it shouldn't be. If you have setup scripts to run each service, or if they're containerized, it's just a little additional work to get to where you can spin them up with a single command.

Re: Ask HN: What's your biggest struggle with Microservices?

#35
Integration testing, dev environments, and data sharing.

When we started switching over to microservices, originally we were going to have some sort of standardized message format, which would include all of the info that service would need to do its job.

However, there were too many people building it too quickly, and it's since devolved into a spaghetti pile where almost every microservice has about 3-4 others on which it is dependent (and a handful on which those are dependent) - to query for some bit of data, set off an async task, etc. This obviously complicates the development environment significantly.

When I want to add a feature to a service it can take hours trying to bring up the correct dependencies, update their configuration, fix the errors that they're returning due to their dependencies being down, and set up the necessary databases and ssh tunnels.

Re: Ask HN: What's your biggest struggle with Microservices?

#36

Convincing people that microservices are not a cure-all but just another design pattern. You have to start out with a monolith and only if you realise along the way that some components might work better as a service (micro or not) you should extract those. Until then, commonplace modularisation will serve you just fine. Once you have more than 1 microservice running infrastructure becomes a huge problem. There's no…

One rules of thumb is "one team one service". If you have multiple teams working on a service then it might start making sense to migrate to multiple microservices.

Re: Ask HN: What's your biggest struggle with Microservices?

#37
post #27

I'm privately skeptical about starting with microservices-first for new application development. I have seen a lot of literature about starting off with a monolith and then breaking that down as you see fit. This makes more sense to me than introducing a ton of complexity up front. Or is it better to deal with that complexity up front and then adding new services/functionality will be easy as time goes on?

I'd recommend starting with a monolith, but pay extreme attention to properly separating modules and hiding them behind a small, well-defined API. Then it will become easier to separate these modules out as necessary.

Whether you work with a monolith or microservices, decoupling is the key, and the best way to ensure decoupling is using the proper abstractions and APIs.

Re: Ask HN: What's your biggest struggle with Microservices?

#39

Development environment becomes somewhere between extremely hard and impossible to set up. Resign yourself to running tests locally with staging as the only place to test your services talking to each other. This is my experience at a medium size public company on the bay area.

Docker has been a lifesaver in this realm. If you do the work to containerize each service (non-insignificant upfront cost), getting all your services running on a local box is as simple as a `docker-compose up`.

Re: Ask HN: What's your biggest struggle with Microservices?

#40
post #16

Our org made all the right decisions at the top, invented their own microservice fabric stuff with way too much tech debt, end result was a very bad (inefficient and painful) development experience with way more technical debt than the monolith we replaced. There was so much fragmentation between each autonomous team that we were forced to standardize on a common framework (think of build/integration pipelines and co…

Overall a net gain, but it made you leave?

That definitely does not sound like an overall net gain.

Post reply on HN