Gated migration to managed cloud with row reconciliation as the acceptance test, and log-based replication keeping two engines in agreement through a durable event backbone.
Discuss a similar buildTwo related pieces of engineering. Moving a database onto managed cloud and proving nothing was lost, then building the replication layer that keeps two different database engines in agreement through an event backbone rather than a batch window.
The migration half covers a managed PostgreSQL instance moved to a target platform under a gated sequence: establish the target version, capture evidence, dump while the source is live, record row counts before anything is deleted, verify the archive, restore, reconcile, and only then tear down in dependency order.
The replication half runs change data capture from PostgreSQL logical decoding and from SQL Server change tables into a single replicated event backbone, with schema compatibility enforced at publish time so a breaking change is rejected before a consumer sees it.
Modernization fails in two predictable places, and neither is the copy itself.
The requirement was a migration path with a verifiable acceptance test, and a replication architecture where adding a consumer costs nothing and a schema change cannot silently break one.
For the migration, every step that could destroy information was placed behind a gate, and the acceptance test was defined before the work began: row counts per table taken from the source before deletion, reconciled against the target after restore.
For replication, log-based capture rather than query-based polling. Reading the write-ahead log or the change tables means the source database carries no additional query load, and every change is captured including deletes, which a polling query cannot see.
The replication topology first, then the migration sequence, because the two answer different questions.
The alternatives that were rejected, and what each one would have cost.
Polling puts read load on the source, misses deletes entirely, and depends on a reliable modified-timestamp that many schemas do not have. Reading the log captures every change including deletes and adds no query load. The cost is the replication slot, which is a real operational obligation and is documented as one.
Point-to-point works until the third consumer, then every schema change becomes a coordinated release across teams. Publishing once to a durable log means a new consumer is a subscription, and replay is available because the log retains history rather than discarding a message once delivered.
A breaking schema change that reaches a consumer at runtime is discovered by an outage. Checking compatibility when the producer publishes moves that failure to deploy time, where it is a rejected merge request instead of an incident.
Factor 1 means a broker loss is data loss. Factor 3 with a minimum of 1 accepts writes that only one broker has, which reintroduces the same exposure under failure. Requiring two in-sync replicas means an acknowledged write survives a broker loss, at the cost of rejecting writes when two brokers are down, which is the correct trade for a system of record.
A restore can succeed and be incomplete. Counts taken from the source before deletion and reconciled after restore are the only evidence that survives the teardown, which is why they are captured before anything is destroyed rather than after.
Measured on this build. Nothing here is a client outcome or a contracted result.
This project is the reference implementation behind two Fortis service lines.
Legacy database migration and the platform layer that makes the result durable, with a verifiable acceptance test rather than an assurance.
Event-driven replication with a durable log and replay, the pattern that holds integrity when a consumer or a broker is unavailable rather than assuming both are up.
Migration into and out of managed cloud database services, with cost exposure at teardown treated as an engineering concern.
The failure modes that are silent by default: stopped capture agents, retained write-ahead log, statistics counters that report an empty database, and resources that bill after they look gone.