How do we break monolith applications into microservices? (Strangler pattern)

First of all, we need to have a valid business case and benefit before starting it.

Breaking monolith (also known as Brownfield monolith) application to microservices will involve handling the application layer as well as datastore layer. Application deployment also changes.

There can be one or more transition states before the target state (Fully functional microservices) of the application is achieved.

Existing module structure and known business context can serve as a source for identifying the bounded context which will in turn identify the boundaries of microservices. Pay attention that you are not decoupling the code but the capabilities, hence improving architectural components and choosing better design is alway an option.

A facade will be introduced as an intermediary layer to the application and the new services to maintain the same interface while allowing the new services to evolve as per the best practices. Having a facade as an intermediary layer is also known as “Strangler pattern”, and the facade itself can be called “Strangler facade”.

Datastore can also be refactored e.g. through structural changes & adjustments of referential integrity to isolate it into multiple parts (e.g. schema) to manage access control by the services.
It will not be the final state of the datastore but can help in deciding the data model of planning the migration to the new data store wherever applicable.

A Strangler facade can as well be introduced as a layer between the application/service and datastore to have the required data access pattern. It ensures to break the dependency on the older datastore technology and schema for the new services being introduced.

Posted on LinkedIn:

https://www.linkedin.com/posts/harshit-ksharma_microservices-design-activity-6954393336531030016-DvxV?utm_source=linkedin_share&utm_medium=member_desktop_web

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store