Application Modernization & Microservices
In today’s era of digital transformation application modernization is one of the key strategies towards the path of digital transformation. So, what does it means by application modernization, is it to change the look and feel of the application or move it to cloud or migrate to software product or service and get rid of legacy application? Or maybe all of it? And answers to these questions will vary but in general application modernization means to preserve the business value of the application at the same time make it agile in nature to update/upgrade to meet constantly changing demands of market. And Cloud being de facto platform for modern applications, migration to the cloud is one of the to way achieve the agility for an application.
Let’s look at high level various approaches to migrate applications to cloud available that enterprises are adopting based on their cloud adoption maturity. At the same time, it should be noted that enterprise cloud maturity is not the only deciding factor for choosing the migration strategy for application.
Fig. a Cloud Maturity vs. Application Migration Strategy
Before we discuss in detail about Microservices as rearchitecting approach of application modernization lets quickly understand each migration strategy.
Rehost: Often referred to as a “lift-and-shift” migration. This option doesn’t require code changes, and lets you migrate your existing apps to cloud rapidly.
Refactor: Often referred to as “repackaging,” refactoring requires minimal changes to apps and specifically to application configuration, so that it can deployed on PaaS or Containers. This approach is also known as Replatform.
Rearchitect: Rearchitecting for migration focuses on modifying and extending app functionality and the code base to optimize the app architecture for cloud such that it can take maximum benefits of cloud services to achieve scalability, flexibility and resiliency.
Rebuild: Rebuild takes things a step further by rebuilding an app from scratch leveraging cloud native technologies like serverless functions, cognitive services, database etc.
As mentioned above microservices are application re-architecting approach to cloud migration. In other words, it is an architectural approach to divide monolithic application into small services or micro services. Please note the word micro does not imply the size of the service in terms of line of code or number of functions. It defines the subset of functionality decoupled from rest application modules or services.
How microservices are different than monolithic application?
- A monolithic application contains domain-specific functionality and is normally divided into functional layers like web, business, and data.
- You scale a monolithic application by cloning it on multiple servers/virtual machines/containers.
- A microservice application separates functionality into separate smaller services.
- The microservices approach scales out by deploying each service independently, creating instances of these services across servers/virtual machines/containers.
Following are the key characteristics of the microservices which helps us further understand how we should design the microservices as we split the monolithic application.
Small and Business Focused: Microservices should be built to serve specific business function. For example, an ecommerce application can have different microservices called catalog service, payment service, order processing services etc. aligned to business component of application.
Loosely Coupled: Microservices should be independent of each other such that it can be deployed and scaled rapidly and frequently.
Defined End Points: Microservices should have standard endpoint for all its consumer through which it communicates to its consumer and vice versa.
Black Boxed or Self-Contained: Microservices underlying details of their complexity, dependency and implementation should be independent of each other.
Polyglot: Microservices are polyglot in nature, each microservice can be developed and run on its own set of technology.
With all these characteristics of microservices stated above below are key advantages of microservices over monolithic application:
- Overcome performance issues by design.
- Allows flexibility in scaling specific business component or function.
- Avoids longer cycles for regression testing as features can be developed independently.
- Overcome unscheduled downtime of entire system due to bottlenecks.
- Allows rolling updates and makes problem identification and debugging easier.
- Flexible to adopt right suitable technology and programming language.
- Divides big teams into smaller teams working independently.
- Reduces dependency and help improve productivity among development teams.
At the same time all these benefits do not comes free and microservices has certain cons that we should consider while deciding adoption of microservices approach. Following are some of these drawbacks of microservices:
- Increased complexity in communication between different services.
- Eventual consistency and state management across services.
- Increase in resource utilization and management.
- More technology and relevant skills to maintain.
- Testing and deployment complexity increases.
In order to decide whether microservices architecture is right approach for your application or not right evaluation of its pros and cons should be done specific to business application and here at iLink we help our customers to make right decision by providing right justification to recommended approach.