In a world of 24/7 on-demand online access there is growing pressure on modern businesses to make sure their applications are always available, at an acceptable level of responsiveness.
This has resulted in the growing popularity of a type of software architecture known as microservices - so much so that many developers now see this as the ideal way to build enterprise applications.
What exactly are microservices, how can a business benefit from them and at what cost?
Microservices are an approach to developing a single application as a set of lightweight, independent collaborating services (Tweet This!). This is opposed to the 'monolithic' system of software architecture, where the application is rather a single, self-contained unit, capable of performing every step needed to complete a particular function.
The main benefit of using microservices is that, unlike a monolithic architecture style, a change made to a small part of the application does not require the entire structure to be rebuilt and redeployed (Tweet This!). This results in much less, if not zero downtime.
This is great for businesses, because it allows the application to be frequently updated, whilst keeping the rest of the system stable and working. This not only improves user experience, it also significantly reduces the time, effort and stress that inherently comes with having to redeploy a whole system.
Developers also benefit from added flexibility. Because each service is independent, each one can be built in a separate programming language or environment, which allows individual developers to play to their own strengths.
The services themselves are very simple - focusing on doing one thing well - and each service can be built using the best and most appropriate tool for the job, utilising specialised development teams that can operate relatively independently from one another.
Sounds great, doesn't it? Unfortunately, there are a few catches.
Actually implementing microservices is a big challenge. Distributed systems are an order of magnitude more difficult to develop and test against, which can have a big impact on time and cost.
In order for a microservices system to function properly, all of the individual services must be able to communicate with each other, which creates a whole host of concerns that just aren't an issue with a monolithic design.
Also, significant investment is required in training or recruitment. The technical complexity of keeping a microservices system up and running means that ordinary operations teams won't be able to manage alone. It's therefore necessary to have a development team with a strong DevOps background, who can build and deploy systems with the practicalities of operations always in mind.
Netflix Sees Success with Microservices
Nevertheless, some companies have managed to shoulder these costs, resulting in excellent improvements for their product. Netflix is often used as an example - their goal is to decouple as many services as possible, in order to minimize the effect of any downtime or service failure for its users, who expect 24 hour access.
For example, if Netflix's personalization service goes down, then the user interface defaults to the generic recommended movies list instead. This minimizes the snowball effect of one service bringing down others and keeps all other services in use until the problem is repaired.
The Final Decision
For new businesses, because of the complexity and cost of adopting microservices, beginning with a monolithic system will almost always be the preferred option, only considering microservices if and when the need arises.
For established businesses, the decision of whether or not to break apart a monolithic system into microservices is one that requires a very delicate balancing act. The process is definitely subjective, and some businesses will benefit more than others.
Related: Fast, Good, or Cheap. Pick 3?
A good suggestion would be to break off one small service and test run it separately to the rest of the system. This way you can gauge how easy or hard it would be to do the same for more important services.
Author Bio: With an MA in Multimedia Journalism from the University of Sussex, Nick Chowdrey is well-versed in creating content across various platforms, and loves using his skills to educate, inform and entertain. Nick is currently a staff writer at Crunch, the UK's fastest growing accountancy firm. He is also a regular freelance contributor to a number of sites, including Bitcoin news site, CoinDesk and alternative culture site, Vice. Follow Nick on Twitter, Google+, or LinkedIn.