SOF --:--NYC --:--

~/cases/monolith-to-microservices

professional, anonymized

Decomposing a legacy Java monolith into microservices

Moving core capabilities out of an aging application-server monolith into modular Spring Boot services on Kubernetes, without stopping the business.

diagram
Strangler pattern: traffic moves to new services one capability at a time.oldnewdeploysTrafficusers, integrationsTraffic routingshifts per capabilityLegacy monolithshrinks over timeSpring Boot servicesone capability at a timeDocker on KubernetesGitLab CI/CD + Ansiblesame pipeline forevery service
Strangler pattern: traffic moves to new services one capability at a time.

NOTE: a generalized write-up of a problem class I have worked on. Client names, data and internal details are omitted on purpose.

Context

An enterprise system had grown for years as a single application-server deployment. Releases were slow and risky, and a change in one area could break an unrelated feature. The business needed new capabilities faster, but the monolith made every release a big event.

Constraints

  • The business could not pause while the system was replaced.
  • Teams still had to ship features during the migration.
  • Operations had to run the new services with tooling they could support.
  • Existing integrations had to keep working throughout.

Decision

Replace the monolith gradually instead of rewriting it.

  1. Identify business capabilities and pick service boundaries around them, not around technical layers.
  2. Move one capability at a time into its own Spring Boot service, packaged with Docker and deployed on Kubernetes.
  3. Route traffic to the new service only once it matched the old behaviour.
  4. Automate builds and deployments with GitLab CI/CD and Ansible, so every service shipped the same way.

Trade-offs

  • Running old and new side by side cost extra effort in routing and data synchronisation.
  • Services added operational overhead: more deployments and more to monitor.
  • In return, each step could be released, observed and rolled back on its own, and teams stopped blocking each other.

Outcome

Core capabilities now live in modular services with independent releases and a repeatable deployment pipeline. A team of seven engineers works on them in parallel, and I led the architecture and the stakeholder communication that turned business requirements into deliverables.

What I would stress

Decide how data ownership moves with each service before you move the code. It is the part that is hardest to change later.