Panji Gautama

Turning Elephant into Colony of Ants - XYZ

XYZ is fictional product inspired by personal experience, that happen went into the journey of monolith to microservices.

#1 Context

Problem Statement

XYZ Codebase has tech debt where the monolith majestically hosts mobile API and Web Backend at the same time. This Big system is highly susceptible to a changing environment. They’re big and slow and unwieldy, tricky to scale horizontally (x-axis scale), costly to scale vertically (y-axis scale), and challenging to scale on the z-axis (e.g. serve multitenancy)

Goal

The intention is to capture initiatives to ensure XYZ can scale following the Scale Cube model, decomposing the monolith into segmented services adhering to domain driven design to ensure we have clarity on Segregation of Duties between services. The expected outcome doesn’t necessarily be a microservices, it could be macro services as AirBnB did, but the final set of services needs to strictly follow y-axis scale design tenet :

#2 Proposal

To put simply, as the intention is on moving off a legacy application to a more scalable codebase, we propose using the famous strangler pattern and creating a routing facade, we are avoiding big bang migration and should demonstrate value early and often in order to ensure that the business supports the migration effort. The routing facade or we call as a strangler facade , can’t be using existing API Gateway because it serve different purpose.

Components and their responsibilities on this scope:

There are multiple strategies for strangling the monolith and incrementally replacing it with microservices / macroservices. Two strategies that being proposed here on the document are:

  1. Implement new features as services.
  2. Break up the monolith by extracting functionality into services.

Ideally, we should implement every new feature in the strangler application rather than in the monolith. You’ll implement a new feature as either a new service or as part of an existing service. This way you’ll avoid ever having to touch the monolith code base. Unfortunately, though, not every new feature can be implemented as a service, that’s why the second approach is needed and very important.

#3 Issues and considerations

<< Previous Post

|

Next Post >>