What are Microservices (MS)? – Any guesses? As the name suggests, any business requirement that can be broken into a “Micro” level and implemented as a “Service” accessible by any 3rd party or technology / functional layers can be treated as MS.
A typical MS example heard is a layered cake. If you slice one (logical) piece out of that cake, that layered component is a complete cake-like MS conceptually.
If your current system or application falls in any of the below categories, then it is eligible for upgradation or migration to the MS model:
- Old legacy technology stacks
- Heavy / decoupled business logic layer
- Performance bottlenecks
- Scalability issue
- High Maintenance cost
- High feature release cycles from Dev to Prod
Below are the Pros of moving to the MS model:
- Simple to deploy
- Easy to understand
- Faster defect fixing
- Minimized risk of changes
Below are the Cons of using the MS model:
- Increase in Testing complexity due to distributed deployment model
- Fault tolerance, latency due to multiple MS
- For complex enterprise applications, integration & management can be a bit complex
- Complex Use cases design & implementation can be tough
- Communication between the MSs
Monolithic to Microservices Architecture
In the early ’90s, most of the legacy applications were developed using the Monolithic Architecture approach. They had their benefits such as easy maintenance, easy skillset availability, normal NFR requirements. However, over the last few years, business needs/demands have changed drastically. Productivity & efficiency has taken the front seat, putting more focus on DevOps, SecDevOps. Customers started seeing the benefits of moving to Microservices-based architecture, which helps them save Opex cost (and ZERO Downtime).
Generally, each business functionality is broken down into a single (small) independent code, MS. Currently, all the enterprises are focusing on migrating or upgrading their current backend layer. As this will be a small piece of code, if there are any failures or errors, or defects, only that business flow will be impacted (rather than the complete website).
The prerequisites of finalizing the implementation approach are to have a robust design approach. The logical/functional design needs to be mapped as per business requirements to be easy to trace, maintain & enhance in the future.
Below are a few of the critical challenges being faced while implementing MS-based architecture:
- Integration testing
- Cyclic dependencies
- Managing Microservices
- Complex team communications
- Complex business system communications
MS should be used wisely based on the various parameters that are discussed above. MS has many benefits for DevOps communities, which own development & operation cycles. Are they the best choice for huge, complex enterprise applications? That is still under debate.
Most industries are going ahead, taking a “baby step” approach, which helps them gauge the pros/cons of the MS model as per their business requirements (and various other factors such as time to market, operational cost, etc.). But from what we have gathered and understood, it is worth your consideration and time.
About the Author
Vaibhav Mandrawadker, Director-Client Services, Cloud ADM - App Dev