Microservices use cases

Monolith to microservices and containerization: four situations we are asked to handle.

Typical situations we're asked to handle. Client work is confidential; see American National for a published project.

Get a quote

Get a migration quote.

Monolith to microservices: Microservices are a cost you take on to get something specific.

Work emails only · Fixed price once the scope is agreed ·

The short answer

Teams bring monolith questions to Ace8 when a decision is already on the table. Four situations stand out: a full rewrite is proposed, microservices are on the roadmap before the boundaries are drawn, a distributed design costs more than it returns, and an application has to run in containers without being re-architected. Ace8 works in slices, with tests first, and tells you when the answer is to leave the monolith whole.

Which Microservices situation are you in?

Four typical situations, each with its trigger and first step. The sections below cover the risks, the approach and the fit.

Use caseTriggerFirst step
A full rewrite of the monolith is proposed and the business cannot pauseFowler: full replacement often goes badlyFixed-price assessment
Microservices are on the roadmap, but nobody has drawn the module boundariesFowler: boundaries are hard to get right at the startFixed-price assessment
A distributed design costs more than it returns and the team asks whether to merge backPrime Video: one service moved into a single processFixed-price assessment
A Java monolith has to run in containers, but config, sessions and files live on the server12-factor: sticky sessions break the stateless modelFixed-price assessment

Who can help refactor a monolith into microservices without a big-bang rewrite?

An engineering partner who moves one capability at a time behind a routing layer, with the monolith kept for rollback. Fowler, AWS and Microsoft all describe this strangler fig approach, and Fowler writes that full replacement often goes badly.

SituationA full rewrite of the monolith is proposed and the business cannot pause
TriggerFowler: full replacement often goes badly
First stepFixed-price assessment, tests before any change
Delivered byThe AceMQ engineering team
ServiceMonolith to microservices

The situation

A CTO has a Java monolith that is hard to change, and an architect has proposed a rewrite as microservices. Users still need new features every quarter, nobody can describe all the behavior the old system has, and the business will not accept a long freeze.

What makes it urgent

Martin Fowler's Strangler Fig Application page (dated 22 August 2024) says the simple-sounding plan of replacing a legacy system in one step usually goes badly, because replacements take a long time, users need new features meanwhile, and much of the existing behavior is unwanted. It recommends incremental modernization with temporary architecture that lets old and new coexist. AWS Prescriptive Guidance describes three steps, transform, coexist and eliminate, with an HTTP proxy at the edge of the monolith. The Azure Architecture Center says the pattern might not suit a system whose requests cannot be intercepted, a small system that is simple to replace, or a case where the original must be decommissioned quickly.

Risks and constraints

  • The routing layer becomes a single point of failure or a bottleneck if it is not designed for the load.
  • The old and new systems share data stores and call each other, so cross-system dependencies break if nobody owns them.
  • A capability is moved without tests on the old behavior, so differences show up in production.
  • The monolith is never deleted and the team runs both systems indefinitely.

How Ace8 handles it

Step 1

Assess

Fixed-price first phase. We map dependencies and data access to find seams, score each module for split or stay, and rank the capabilities that could move first. We also say which modules should not move.

Step 2

Migrate

Characterization tests first. We add the routing layer, extract one capability with its own data, run old and new paths side by side, and shift traffic in stages. A senior engineer reviews every diff, and each step has a way back.

Step 3

Run

AceMQ supports the new stack 24/7 after go-live, including the messaging layer if the services use RabbitMQ or Kafka.

What you get

  • Dependency and data-access map of the monolith
  • Split-or-stay score per module, with an extraction order
  • Characterization tests for the first capability
  • Routing layer and one extracted service, with a rollback path
  • Runbook and support handover

A fit when

  • The system must stay live while it changes, and a rewrite freeze is not acceptable.
  • You can intercept requests at the edge, through a gateway or proxy, and you can change the legacy code.

Not a fit when

  • The system is small and simple enough that replacing it whole is cheaper than running two paths.
  • Requests cannot be intercepted and nobody can change the legacy code or its database.

Sources

Planning this for your own applications? Get a fixed scope and price before anything moves.

Should we split a Java monolith into microservices or make it a modular monolith first?

If the boundaries are not clear and stable, make the monolith modular first and split later. Fowler warns that service boundaries are hard to get right early and costly to move once they are services, and Microsoft lists poorly aligned boundaries as a microservices antipattern.

SituationMicroservices are on the roadmap, but nobody has drawn the module boundaries
TriggerFowler: boundaries are hard to get right at the start
First stepFixed-price assessment, tests before any change
Delivered byThe AceMQ engineering team
ServiceMonolith to microservices

The situation

An engineering director has been told the application will become microservices. The code has tangled packages, tables used by many modules, and no agreed domain model. Two teams already disagree about where the first service should be cut.

What makes it urgent

Martin Fowler's MonolithFirst page (dated 3 June 2015) says microservices work well only with good, stable service boundaries, that these are hard to get right at the start even for experienced architects, and that moving functionality between services is much harder than inside a monolith. He calls his own advice tentative and says starting with microservices makes sense only if the team already has relevant experience. The Azure Architecture Center lists implementing microservices without a deep understanding of the business domain as an antipattern, and tells teams to evaluate whether they have the skills to succeed.

Risks and constraints

  • A first cut at the wrong place leaves services that change together and call each other constantly.
  • Services that share a database schema stay coupled, so the independence the split was meant to buy never arrives.
  • The team takes on distributed-system costs, such as tracing, eventual consistency and on-call, before it has the skills.
  • Boundaries decided by reporting lines rather than by the domain model.

How Ace8 handles it

Step 1

Assess

Fixed-price first phase. We map packages, call paths and table access, propose module boundaries, and score each for split or stay against your release, scaling and team signals.

Step 2

Change

Characterization tests first. We enforce the boundaries inside the monolith: separate modules, no direct reads of another module's tables, calls only through defined interfaces. A senior engineer reviews every diff. For many Java applications this runs on Java 21 and Spring Boot.

Step 3

Run

AceMQ supports the application 24/7 after go-live. If a module later has to leave, the boundary is already drawn and tested.

What you get

  • Proposed module map with the evidence behind each boundary
  • Split-or-stay score per module
  • Boundary rules and a check that fails when they are broken
  • First module separated inside the monolith, with tests
  • Written criteria for when a module should become its own service

A fit when

  • Leadership wants microservices, and the team cannot yet say where the cuts belong.
  • The pain is tangled code and slow change, not a need to scale one part independently.

Not a fit when

  • You already have clear domain boundaries and a measured need to scale or release one part alone.
  • The monolith is a vendor product you cannot change.

Sources

Get a quote

Planning this for your own applications?

Send your work email and what you run. An engineer, not a sales script, replies within one business day with scope and next steps.

  • Fixed price for the first phase
  • Tests written before any code change
  • A senior engineer reviews every change
  • AceMQ supports the new stack 24/7

Work emails only · Fixed price once the scope is agreed ·

Should we move microservices back into a monolith?

Sometimes, when measurements show the split costs more than it gives. Prime Video's own engineers did this for one monitoring service and wrote that the choice has to be made case by case.

SituationA distributed design costs more than it returns and the team asks whether to merge back
TriggerPrime Video: one service moved into a single process
First stepFixed-price assessment, tests before any change
Delivered byThe AceMQ engineering team
ServiceMonolith to microservices

The situation

A platform lead runs a set of small services that were split early. Orchestration and the data passed between services drive most of the bill, a few services always scale together, and every change touches several repositories.

What makes it urgent

Marcin Kolny of Prime Video wrote in a post dated 22 March 2023 that the team's audio and video monitoring tool began as distributed components orchestrated by AWS Step Functions and hit a hard scaling limit at around 5% of the expected load. The two most expensive operations were the orchestration workflow and data passing between components. The team moved all components into a single process on Amazon ECS and reported an infrastructure cost reduction of over 90%. The post adds that whether to use microservices or a monolith has to be decided case by case. The original page on primevideotech.com now redirects, so the link above is the Internet Archive copy. These are Prime Video's results for one service, not Ace8's and not a general expectation.

Risks and constraints

  • Merging services without measuring first removes the independent scaling and deployment that some of them need.
  • In the Prime Video post, the merged service's detectors scale only vertically within an instance, and the team cloned the service to handle growth, so a merge changes how you scale.
  • Shared data stores and hidden calls make a merge harder than the diagram suggests.
  • The team debates architecture in the abstract and never measures cost, latency or release friction per service.

How Ace8 handles it

Step 1

Assess

Fixed-price first phase. We measure per service where the cost and the friction are: calls between services, data moved, release coupling, and which services always scale together. We then score each cluster for merge or keep.

Step 2

Change

Characterization tests first. We merge one cluster of services into a module of a single deployable, keep the old services running side by side for comparison, and cut over in stages. A senior engineer reviews every diff, and each step is reversible.

Step 3

Run

AceMQ supports the application 24/7 after go-live, including any messaging that remains between the parts you keep separate.

What you get

  • Per-service cost and coupling measurements from your own environment
  • Merge-or-keep score per service cluster
  • Characterization tests around the first cluster
  • First cluster merged, with a rollback path
  • Runbook and support handover

A fit when

  • Several services always change, deploy and scale together, and the network between them is most of the cost.
  • You can measure where the money and the release friction go.

Not a fit when

  • The services are owned by different teams that need to release on their own schedules.
  • One service needs to scale far beyond the rest, so keeping it separate is the point.

Sources

How do you containerize a Java application without re-architecting it?

Run the monolith as one container and change only what breaks there: configuration from the environment, session and file state off the process, JVM memory settings, and a clean shutdown on SIGTERM. Splitting into services is a separate decision.

SituationA Java monolith has to run in containers, but config, sessions and files live on the server
Trigger12-factor: sticky sessions break the stateless model
First stepFixed-price assessment, tests before any change
Delivered byThe AceMQ engineering team
ServiceMonolith to microservices

The situation

A team has been told the Java application must run on the company container platform this year. It reads properties files from the server, keeps sessions in memory behind a sticky load balancer, writes uploads to local disk, and has never been run with a memory limit.

What makes it urgent

The Twelve-Factor App says config should be strictly separated from code and stored in environment variables, and its processes factor calls sticky sessions a violation and recommends storing session data in a datastore such as Memcached or Redis. The Oracle JDK 21 java documentation says the JVM detects container memory and processor limits by default on Linux, and gives 25 percent as the default for MaxRAMPercentage. Kubernetes sends SIGTERM to the main process in each container, then KILL once the grace period expires. Spring Boot can build an image with Cloud Native Buildpacks through mvn spring-boot:build-image, which needs access to a Docker daemon.

Risks and constraints

  • Sessions in process memory are lost when a container restarts or is replaced.
  • Files written to local disk disappear with the container, or differ between replicas.
  • A heap sized for the host, or left at a default percentage, wastes memory or gets the process killed at the container limit.
  • In-flight requests are cut off when the platform stops the container because the app does not handle SIGTERM.

How Ace8 handles it

Step 1

Assess

Fixed-price first phase. We list per application what blocks a container: local files, sticky sessions, hard-coded config, app-server dependencies and the Java version. The usual order is Java upgrade first, then image.

Step 2

Change

Characterization tests first. We externalize configuration, move session and file state out of the process, set JVM memory against the container limit, add health endpoints and shutdown handling, and build the image. A senior engineer reviews every diff, and the app is load tested in the container before cutover.

Step 3

Run

AceMQ supports the application 24/7 after go-live, including image patching and incident handling.

What you get

  • Container-readiness findings per application
  • Config, session and file-state changes with tests
  • Image build (Dockerfile or buildpack) and JVM memory settings
  • Health and shutdown behavior checked in a container
  • Runbook for rebuilding and patching images

A fit when

  • A platform deadline requires containers and the application is not going to be split this year.
  • The code can be changed, and the Java version is current or about to be upgraded.

Not a fit when

  • The application is a packaged vendor product you cannot change.
  • It is already stateless, reads its config from the environment and runs well under a memory limit.

Sources

Frequently asked questions

What is the strangler fig approach to a monolith?

A proxy or gateway in front of the monolith sends traffic for one capability at a time to a new service, while the monolith handles the rest. AWS Prescriptive Guidance calls the steps transform, coexist and eliminate.

When should you not use the strangler fig pattern?

Microsoft's Azure Architecture Center says it might not suit systems where requests cannot be intercepted, small systems that are simple to replace, or cases where the original must be decommissioned quickly.

Is a modular monolith a real alternative to microservices?

For many applications it is. Martin Fowler's MonolithFirst page argues that service boundaries are hard to get right at the start and that moving functionality between services is harder than inside a monolith.

Can a monolith run in a container?

Yes. Containerizing is packaging, and a monolith in a container is still a monolith. The usual fixes are configuration from the environment, session and file state outside the process, and JVM memory set against the container limit.

Get a fixed scope and price before anything moves.

A fixed-price assessment gives you the inventory, the risk score and a phased plan.