This is an excerpt from the upcoming Book Club episode with Sam Newman and Martin Fowler debating (maybe) moving to microservices. The episode is based on a conversation between the two about Sam’s most recent book Monolith to Microservices.
Martin Fowler: I often imagine that when people think of advocates of microservices, they think of these people who are determined to use microservices in every situation. “There’s a 1,000-line program here. We’ve got to break it down into 10 100-line programs.” And yet as I know too well, I’ve actually only ever heard you complain of people not using microservices when they shouldn’t have done. I don’t think I’ve ever heard you complain of the opposite. So, maybe you should talk about when people should actually even consider using microservices because I don’t think I’ve actually ever heard you state that argument.
Sam Newman: Oh, okay. So, if you want one quick answer for when you should use microservices, it’s when you’ve got a really good reason. I know that sounds like a trite answer. Of course, we wouldn’t use them for a bad reason.
Martin Fowler: Please.
Sam Newman: But I guess what I mean by that is, there’s a danger in our industry that we often focus on the activity, not the outcome. We focus on the tech tool, not the thing the tech tool lets us do. And so, for me, a microservice architecture is a conscious choice you have made to kind of implement something in that style because of some outcome you’re looking for. There’s some benefit you think a microservice architecture is going to give you. So, my qualifying criteria is going to be, “What is the thing you think it’s going to give you?”
I could talk about the things that microservice architectures can give a lot. It gives you more options around how to scale up applications. It gives you this lovely property of independent deployability. When implemented correctly, it can really help isolate the surface area of failure, what some people call kind of limiting the blast radius, which can help make applications more robust. I mean, ultimately, you could argue that this is a James Lewis quote, “microservice architectures buy you options, and fundamentally, when you buy into microservice architecture, you’re buying into a whole other series of options and choices that you can make.” I think in James’ quote the “buys you options” is quite deliberate though, right? Options, great. We all have options but “buy” implies a cost and they do have a cost.
Stay tuned for the entire Book Club episode “Martin Fowler and Sam Newman debate (maybe) moving to microservices.”
Upgrade your microservices knowledge by listening to this spirited conversation between two living legends: Sam Newman and Martin Fowler. The two touch upon the main reasons for using or not using microservices, and, if you do decide to use microservices, what else you should change along the way to fully benefit from the switch, plus much more. The interview is based on Sam Newman’s new book Monolith to Microservices.