SaaS platform. Byte4Bit. Monolith to asynchronous Lambda microservices.

Xell

A Node.js and TypeScript monolith migrated to asynchronous AWS Lambda microservices, cutting infrastructure cost by roughly 40 percent while improving service boundaries.

Role
Migration lead
Cloud
AWS
Cost
~40% lower
Tests
Jest
Visit the product Index
Fig. 01. Xell on byte4bit.com. The product has no landing of its own.

The problem

The platform ran as a single Node.js and TypeScript deployment that had to be provisioned for its worst minute, not its average one. Most of that capacity sat idle.

I led the migration to asynchronous AWS Lambda microservices, cut infrastructure cost by roughly 40 percent while improving service boundaries, and designed the DynamoDB and MySQL persistence models along with the Jest unit, integration and end-to-end suites.

Node.jsTypeScriptAWS LambdaDynamoDBMySQLJest

Roughly 40 percent less infrastructure cost

Paying per invocation instead of per provisioned hour removed the idle capacity the monolith had to keep standing.

Boundaries that survived the move

The decomposition was an opportunity to fix service boundaries rather than to copy the old shape into more deployables.

A test suite at three levels

Unit, integration and end-to-end suites in Jest are what made a migration of this size reversible one service at a time.

Decisions and the price I paid for them

Asynchronous by default

Most of the monolith's work did not need a caller waiting on it. Making the default asynchronous is what turned peak provisioning into per-invocation cost.

Trade-off accepted

Eventual consistency becomes something the product has to express, and "it is done" is no longer the same moment as "it returned".

Two stores, chosen per access pattern

DynamoDB for the high-volume key-access paths, MySQL where relational queries were genuinely needed, rather than forcing one engine to do both jobs.

Trade-off accepted

Two persistence models to keep in your head, and any query that wants to cross them has to be designed rather than written.

Migrate behind tests, one service at a time

Unit, integration and end-to-end coverage was written before the cut, so each service could move independently and be rolled back on its own.

Trade-off accepted

The migration took longer than a rewrite would have, and for a period both shapes had to be kept working.