Thoughts on Amazon Prime Video's microservices to monolith transition

·

2 min read

I read the blog article, read DHH's post, watched Fireship's video, and this is just me collecting my thoughts.

I don't think DHH is making a case against microservices. In the first line of the article he says "I won't deny there may well be cases where a microservices-first architecture makes sense". However, he does say that the use cases are "few and far in between" and this is definitely different from the case-by-case suggestion that the Prime Video article makes.

In a way, the Prime Video article shows the benefits and tradeoffs of competing architectures while DHH is just showing the benefits of monoliths.

I've heard similar sentiments to DHH's point from Sam Newman on this topic. Sam Newman has written 2 books on making microservices and even he believes startups in general are better off starting with a monolith.

More interestingly, he has an interview with Martin Fowler where he says that his default is a monolith. He would then make it modular and then make microservices from it one-by-one, which is similar to what DHH suggests with the Rust example (and point b) in his article. Sam Newman does make some really good points as well in that interview for why he'd make microservices.

I really like Sam Newman's point that monoliths are actually distributed systems since they also rely on services separated by a network. For example, a database is not always on the same "monolith" as the application; nor is the client (a browser or mobile app). In fact, if you're building for the web then you are building a distributed system. The most basic web architecture is the client-server architecture which is a distributed system by definition. A monolith is just a simpler distributed system. Plus, you might also be using 3rd party solutions for authentication, payments, search, etc. which means your custom software may just be one component of a larger application. Distributed systems bring a lot of overhead and this is pointed out by the Amazon Prime Video article. As a result, it may be wise to design your custom software as a monolith over a microservice to lower the complexity.

IMHO what I find interesting about the Amazon Prime Video article given the current environment is that it emphasizes the cost reduction they got from the microservice to monolith transition. This is not 2020/ 2021 anymore (nor is it the 2010s) where interest rates were low and money was cheap. The economic realities have changed and to see Amazon release this case-study is very thought provoking.

These are just my 2 cents :)