Disruptive technologies, innovation, digital transformation – we are bombarded by these buzzwords on a daily basis. A pathbreaking concept that took the development environment by storm a few years back was the onset of microservices. It has become the default architectural pattern. Netflix says they have over 700 microservices that’s making their platform super energized. When other microservices examples come from giants like Amazon, Twitter, PayPal who have tried and tested it, the power of microservices architecture is proven. So, should every organization jump on this bandwagon and ditch their monolithic architecture?
Before we venture there, let’s bring the uninitiated up to speed with what the microservices architecture is all about.
What is Microservices Architecture?
Microservices architecture or microservices, as it is more commonly called, breaks down an application into a number of small, independent sub-applications. Each sub-application or single-purpose module has a specific operation and is responsible for at least one business function. Each microservice, usually has about 100 lines of code (else it becomes too unwieldy to manage, much like a monolithic architecture) and communicates with other services through APIs. By combining different microservices together, a fully functional application emerges.
It can be best illustrated by this microservices example, you could use a payments service from Provider A, a search service from Provider B and a reviews and rating service from Provider C. This right here is independence in action in an ecommerce situation. Therefore, there must a contract to adhere between different modules, the rule is a set of standards that all APIs in microservices must conform to, that makes them easily communicate with each other.
This API based microservices architecture makes it obvious why it’s agile and scalable because a change in one sub-application does not require updates in other sub-applications. You can build a system by coupling the best possible services from different vendors and there is no vendor-lock in. Of course, the downside is having to manage so many different vendors or service providers. Both, in the benefits of microservices architecture as well as its drawbacks, is where microservices fundamentally differ from a monolithic architecture.
Monolithic software is designed as a single-tiered software system, from a single provider. All components (database and user interface) are combined into a single program. The challenge then is once built, applications are unscalable. Any update, requires the whole system to be rebuilt and tested. This prevents it from using different technologies and makes it quite inflexible and resistant to change.
The concept explained through Microservices examples
We’ve already mentioned Netflix and its 700 microservices. Amazon’s AWS (cloud microservices) is a result of its migration from a monolithic architecture starting in 2001. Its retail website was architected in multiple tiers, each with numerous components. But all tiers were tightly coupled together to form a monolith architecture.
At the beginning this worked very well but as more code got added on with more and more developers working on new features, the architecture got madly complex. This is a natural progression that most organizations will have experienced.
In 2001, Amazon realized that with its current system it was not able to meet its growing retail base. So, it began on a path that would be revolutionary. Their developers analyzed the code and began to split it into units that served a single function. For instance, a single service was developed for the Buy button and similarly another service for the search function and another for the shipping functionality. Separate small teams of developers were assigned ownership for specific services. Each function would communicate through web-based APIs and this became the common rule for the evolving microservices culture. Now, each function could iterate independently of each other and innovations became must faster. The rest as they say is history – Amazon was valued at $941.19 billion in February 2020.
From Microsoft to IBM, many software vendors and service providers have moved over to a microservices architecture. Coco-cola, Uber, Spotify and numerous others have decoupled their services and built flexible architecture to scale up and also become less susceptible to any large-scale failures.
Are Microservices right for you?
The advantages of microservice architecture are many-fold but does that mean every business should jump on this bandwagon? The clinching argument should not be because your competitors are doing it, rather does it fall in line with your business requirements.
What should be noted is that while there are many successes, most of them are from product companies who had already been through many iterations with their products, realized the challenges that arose from complexity and worked on solutions, one of them being the development of independent modules. Not everyone has such complexity. Modernize legacy systems only if they tick these boxes.
You don’t need it if…
- Your business does not have any complex issues that justifies moving to a new architecture
- You don’t have a team size proportional to having independent teams handling different services.
- If your current system does not require to be broken down into smaller services then why invest in changing the architecture?
You need it if …
- You find that your monolithic application is not scalable and is affecting manageability and delivery speed.
- If today’s programming languages make your tech stack outdated and you find you need to rewrite them for the changing business requirements.
- If certain applications must be reused across different business applications.
- If your product or service needs to be agile and be frequently updated.
Need more clarity? Contact our experts to give you further insights on how to modernize your integration or consolidate your systems.