Back to all use cases

AssessmentSoftware / Digital Platforms

Finding the pipelines and transactions that decide the move before choosing the target

SaaS Platform Team

A typical engagement for a team that wants to consolidate on PostgreSQL: documents, aggregation pipelines, transactions and change streams assessed against a JSONB design, with a stay, proxy or leave recommendation.

Overview

A typical engagement starts with a SaaS platform team that runs MongoDB next to PostgreSQL and wants to retire one of them. The reasons vary: licence terms, a hosting bill, or the cost of running two engines. The open question is how much of the MongoDB usage PostgreSQL can absorb.

Challenge

Simple collections move easily. Aggregation pipelines with lookups, multi-document transactions, change streams and BSON types need a decision each, and proxy layers that speak the MongoDB protocol document features they do not support. A compatibility percentage cannot answer whether this application will run, so the answer has to come from the application's own usage.

Environment

A MongoDB replica set or sharded cluster behind several services, a PostgreSQL estate already in production, and application code that uses the MongoDB drivers, aggregation pipelines, sessions and, in places, change streams.

Approach

AceMQ engineers search the code for pipeline stages, transactions and change streams, then profile collections by size, document shape, index use and write rate. Each finding is mapped to a JSONB design, to a MongoDB-compatible proxy on PostgreSQL, or to a reason to stay. A sample collection is loaded into PostgreSQL to test the design and the data-type rules.

Solution

  1. Code and workload inventory of pipeline stages, transactions, change streams and BSON types, with traffic attached to each
  2. Collection profile covering document size, nesting, indexes and write rate, and sharding needs
  3. JSONB and relational design for the main collections, with the fields promoted to columns
  4. Check of the MongoDB-compatible proxy options against the documented unsupported features
  5. Replacement design for change-stream consumers, such as logical decoding or a CDC tool
  6. Written stay, proxy or leave recommendation with a rehearsed-cutover plan and a rollback point

Outcome

The engagement delivers the inventory, a JSONB design for the main collections, a feature-by-feature verdict on the proxy options, and a written recommendation with a phased cutover plan. If a collection or service is better left on MongoDB, the report says so and why.

Technologies

MongoDBPostgreSQLDebezium

Ready for a MongoDB Health Check?

AceMQ's senior MongoDB engineers have handled this exact type of engagement before. Whether you need architectural guidance, hands-on remediation, or an ongoing managed partnership, we're ready to help.