Microservices architecture as a large-scale refactoring tool

  • If you have a functional monolith, you cannot afford to throw out all its current value and rebuild it from scratch.
  • Instead, you should do a cost/benefit analysis and then rebuild parts of it as microservices accordingly.
  • To refactor a monolith into microservices architecture, you need to break it into single responsibilities or services in an incremental fashion (to limit risk), replacing local function calls with a tool such as a REST operation to make a remote call for a microservice to integrate them; then remove the legacy code, slimming down the monolith.
  • Most of the time, splitting a monolith also means splitting the database it consumes. Ideally, avoid sharing the database among multiple applications to avoid data duplication.

Full post here, 10 mins here