Table of contents
- Migrating from Monolithic to Microservice
- 🍯 Contributors:
- Community and Social Footprints :
A monolithic application is built as a single unified unit while a microservices architecture is a collection of smaller, independently deployable services.
Which one is right for you? It depends on many factors.
we can learn about monolithic and microservice architecture from our previous blogs
A monolithic architecture is the traditional unified model for the design of a software program.
Advantages of a monolithic architecture
Disadvantages of a monolithic architecture
Slower development speed
Barrier to technology adoption
Lack of flexibility
Micro Service is an architecture that allows developers to develop and deploy services independently. Each service running has its own process and this achieves the lightweight model to support business applications.
Advantages of microservices
Highly maintainable and testable
Disadvantages of microservices
Exponential infrastructure costs
Added organizational overhead
Lack of standardization
Migrating from Monolithic to Microservice
Scalability is one of the primary motivations for moving to a microservice architecture.
The 8-Step Migration Process
- Identify logical components.
- Flatten and refactor components.
- Identify component dependencies.
- Identify component groups.
- Create an API for the remote user interface.
- Migrate component groups to macro services (move component groups to separate projects and make separate deployments).
- Migrate macro services to microservices.
- Deployment and Testing
Identify logical components.
In this stage, we have to identify
- data objects
- data actions
- job to perform and use cases
Flatten and refactor components.
After all the modules have been uniquely identified and grouped, it is time to organize the groups internally. Components that duplicate functionality must be addressed before implementing the microservice.
Identify component dependencies.
After the components have been identified and reorganized to prepare for the migration, the system architect should identify the dependencies between the components.
Identify component groups.
After the dependencies have been identified, We should focus on grouping the components into cohesive groups that can be transformed into microservices, or, at least, macroservices.
Create an API for the remote user interface.
The remote user interface is intended as the sole mode of communication between the system, its components, and the system's users. It is vitally important that this interface be scalable and well-planned to avoid problems as the system evolves over time.
Migrate component groups to macroservices
Macroservices have a more relaxed posture toward sharing data repositories and allow more complex interactions with data objects. It may therefore be useful to consider their use as an interim step toward migrating to full microservices. The main reason for not moving directly to microservices is complexity.
Migrate macro services to microservices.
The process of pulling the components, data objects, and functions out of the monolithic system and into macro services will provide insight into how these components can be further separated into microservices. Remember, each microservice maintains its own datastore and performs only a small set of actions on the data objects within that datastore.
Deployment and Testing
Once a macro service or microservice is ready for deployment, the next step involves integration testing and deployment. The monolithic system must be configured to use the new service for its data needs rather than its legacy data store.
Keep Learning , Keep Growing
Community and Social Footprints :
Did you find this article valuable?
Support Cloudnloud Tech Community by becoming a sponsor. Any amount is appreciated!