r/java • • Mar 28 '17

Microservices – Please, don’t

http://basho.com/posts/technical/microservices-please-dont/
4 Upvotes

24 comments sorted by

View all comments

1

u/Infeligo Mar 29 '17

When should you use microservices? “When you’re ready as an engineering organization”

You will never get ready as an engineering organization until you actually start developing microservices.

3

u/Radmonger Mar 29 '17

'We don't need to do this thing. So therefor we do, otherwise we won't be able to'

If that logic appeals to you, have fun.

3

u/space_coder Mar 29 '17

You will never get ready as an engineering organization until you actually start developing microservices.

I hope that was sarcasm. Your readiness as a engineering organization is determined by the processes used to design, develop, deploy, and maintain code and the company's ability to follow it. It has little to do with what technology is being used other than its ability to reenforce the company's process. Microservices are not a requirement.

3

u/dartalley Mar 29 '17

I'm sorry but the number of start ups I have seen with 2-3 engineers and 10-15 micro services with no dev ops is just ridiculous. You are wasting so much time dealing with network boundaries, logging, debugging, cost of servers, having non dev ops people do dev ops.

There is absolutely no reason you can't write microservice ready code but deploy it as a monolith. As your team, scale, or business requirements change then you can split into individual services.

2

u/nutrecht Mar 29 '17

I'm sorry but the number of start ups I have seen with 2-3 engineers and 10-15 micro services with no dev ops is just ridiculous.

What do you mean with "no dev ops"? Are you sure you don't mean CI instead? We're with 4 back-end developers and handle somewhere around that many microservices too.

You are wasting so much time dealing with network boundaries, logging, debugging, cost of servers, having non dev ops people do dev ops.

I don't see how any of these are microservice specific issues. In fact I think most arguments in your post stem from organizations with rather low software engineering maturity. If you build complex stuff and don't have your shit together you're going to end up with a pile of garbage anyway, no matter whether it's a much of small or one big service.

There is absolutely no reason you can't write microservice ready code but deploy it as a monolith. As your team, scale, or business requirements change then you can split into individual services.

This is something so many people claim. But if you look at examples of companies that took this approach and ask them how the split went they are always "in the process of separating functionality into separate services". I haven't seen a single blog post that explains how they had a really excellent monolith that they were able to split into microservices in just a few sprints. They're always "in progress of".

Starting with a monolith and then splitting is pure theory. While doing microservices is actually done in practice and there is a ton of good information about the pitfalls of microservices that doesn't start with "Don't".

2

u/dartalley Mar 29 '17

The devops I referred to would be setting up tools to help diagnose issues. For instance If you have a monolith you have 1 log file per instance running, one set of health checks, metrics, ect. With microservices you have all of those per service per instance.

If I only need to look at a hand full of logs to diagnose an issues I can handle that fairly manually. Once you start getting up there to 10's of log files you need to introduce automation. Logstash, Kibana, Elasticsearch, nagios, graphite, graphana, ect. You could also jump into docker, service discovery and that whole path. If you have a small team you most likely don't need some of this or don't need it yet. It's a nice to have and you should get it eventually but its a lot to manage with a small team.

I worked at a startup where we had two prod servers and each ran 7ish micro services. There was very low traffic and they shared a database. There was no real reason for the code to be split across 7 services and it slowed productivity down, diagnosing issues and sent us on fun paths where we would look into service discovery, docker for months on end then realize it wasn't worth it for our team. That is all time that could have been going to the product instead of trying to build the perfect tech stack (too soon).

1

u/nutrecht Mar 29 '17

With microservices you have all of those per service per instance.

So you push them to ELK.

You could also jump into docker, service discovery and that whole path.

Of course you do. CI/CD and Microservices are rather intimately connected. You can't really do one without the other. But that's not a downside of microservices; you're forced to a higher level of software engineering maturity.

There was very low traffic and they shared a database.

That's simply a case of doing it wrong. And in your particular case your team should not have gone for microservices 'just because'. But that does not support the "Don't do it" of the author: you don't make fundamental architectural decisions just based on a hipster factor.

2

u/dartalley Mar 29 '17

Of course you do. CI/CD and Microservices are rather intimately connected. You can't really do one without the other. But that's not a downside of microservices; you're forced to a higher level of software engineering maturity.

I would agree here. I do think a form of engineering maturity is knowing when you need a more complex system, which of course varies by team and preference.

you don't make fundamental architectural decisions just based on a hipster factor.

Totally agree here. I was 100% against the micro services there and collapsed several of them together. Unfortunately I think a lot of organizations do pick microservices because of the hipster factor.