SKYLIFTAI
SkyliftAI MigDB โ€” Deep Dive

Bi-Directional
Continuous
Replication

A full-stack architecture that synchronises your databases and application layer simultaneously across US and European regions โ€” with zero data loss and intelligent conflict resolution.

๐Ÿ‡บ๐Ÿ‡ธ US-East-1
โ–ถ CDC
CDC โ—€
EU-West-1 ๐Ÿ‡ฎ๐Ÿ‡ช
โ†”
Activeโ€“Active
Both Regions Write
<1s
Cross-Region
Replication Lag
4
Stack Layers
Synchronised
AI
Conflict Detection
& Resolution

More Than Database Sync โ€”
It's Full-Stack Continuity

Bidirectional continuous replication means both regions operate as active primaries simultaneously. Users in New York and Dublin write to their local databases โ€” and every change flows in both directions, in real time, across the entire application stack. SkyliftAI MigDB orchestrates this end-to-end: from the user-facing application layer, through the API gateway, down to the CDC pipeline and the database itself.

"True bidirectional replication isn't just a database feature โ€” it's an architectural commitment. The application layer must be designed to route, tolerate, and reconcile concurrent writes from multiple regions." โ€” SkyliftAI Architecture Principles, 2025

The Four Layers of Bidirectional Replication

๐Ÿ–ฅ๏ธ
Layer 1 โ€” Application Layer
The user-facing application is deployed in both regions. A global load balancer (Route 53 / Cloudflare) routes users to their nearest region. Write requests hit the local application instance, which writes to the local database. SkyliftAI ensures application state โ€” sessions, caches, queues โ€” stays consistent across regions.
Activeโ€“Active Geo-Routing Session Sync Cache Invalidation
๐Ÿ”Œ
Layer 2 โ€” API & Middleware Layer
Regional API gateways process and validate requests before they reach the database. SkyliftAI injects a lightweight replication-awareness middleware that tags each write with a region identifier and timestamp. This metadata enables the CDC layer to perform deterministic conflict resolution without guesswork.
API Gateway Region Tagging Write Stamping Idempotency Keys
โšก
Layer 3 โ€” Powerful CDC Pipeline
SkyliftAI's Powerful CDC engine captures every committed transaction from the database redo logs in real time. Bidirectional Extract processes run on both sides simultaneously โ€” US-to-EU and EU-to-US โ€” with loop prevention ensuring that changes replicated from Region A are not re-replicated back from Region B.
Log-Based CDC Loop Prevention Trail Files Parallel Apply
โš–๏ธ
Conflict Detection & Resolution (CDR)
When two regions update the same row simultaneously, SkyliftAI's AI-powered CDR engine detects the conflict and applies the configured resolution strategy โ€” last-write-wins, source-wins, custom business logic, or manual escalation. Every conflict is logged with full context for audit and model improvement.
Last-Write-Wins Custom Logic Audit Trail AI Resolution
๐Ÿ—„๏ธ
Layer 4 โ€” Database Layer
Amazon RDS instances in both regions serve as the authoritative stores. Both are always writable. SkyliftAI manages supplemental logging configuration, sequence advancement to prevent primary key collisions across regions, and schema synchronisation to ensure DDL changes propagate safely in both directions.
Amazon RDS Supplemental Logging Sequence Safety DDL Propagation
๐Ÿ“Š
Observability Layer
Every layer emits metrics to CloudWatch in both regions. SkyliftAI's unified ReplicationOps dashboard aggregates lag, conflict rates, trail file health, and API write distribution in a single pane of glass. AI-powered anomaly detection fires proactive alerts before replication lag becomes a business problem.
CloudWatch Lag Alerts Conflict Rate AI Anomaly

Full-Stack Bidirectional Flow

How a write in New York propagates to Dublin โ€” and vice versa โ€” across every layer of the stack.

End-to-End Bidirectional Replication โ€” All Layers
๐Ÿ‡บ๐Ÿ‡ธ US-East-1
๐Ÿ‘ค
US Application
React / Angular Frontend
๐Ÿ”€
Load Balancer
Route 53 Geo-routing
๐Ÿ”Œ
API Gateway (US)
Region-tagged writes
๐Ÿท๏ธ
SkyliftAI Middleware
Write stamps + idempotency
โšก
CDC Extract (US)
Log capture โ†’ Trail Files
๐Ÿ”„
Data Pump (USโ†’EU)
Encrypted transfer
๐Ÿ—„๏ธ
Amazon RDS (US)
Primary ยท Always Writable
SYNC FLOWS
โ†’ App State Sync โ†’
โ† App State Sync โ†
โ†” Session / Cache โ†”
โ†’ API Write Tags โ†’
โ† API Write Tags โ†
โ†” CDR Engine โ†”
โ†’ CDC USโ–ถEU โ†’
โ† CDC EUโ–ถUS โ†
โ†” Schema DDL Sync โ†”
โš–๏ธ CONFLICT
RESOLUTION
๐Ÿ“Š UNIFIED
MONITORING
EU-West-1 ๐Ÿ‡ฎ๐Ÿ‡ช
๐Ÿ‘ค
EU Application
React / Angular Frontend
๐Ÿ”€
Load Balancer
Cloudflare / Route 53
๐Ÿ”Œ
API Gateway (EU)
Region-tagged writes
๐Ÿท๏ธ
SkyliftAI Middleware
Write stamps + idempotency
โšก
CDC Extract (EU)
Log capture โ†’ Trail Files
๐Ÿ”„
Data Pump (EUโ†’US)
Encrypted transfer
๐Ÿ—„๏ธ
Amazon RDS (EU)
Primary ยท Always Writable

How the Application Layer
Participates in Replication

The application layer is not a passive bystander in bidirectional replication โ€” it is an active participant. SkyliftAI MigDB provides a lightweight SDK and middleware that makes your application replication-aware without requiring a redesign of your core business logic.

Application Write Lifecycle โ€” US User Updates a Record
๐Ÿ‘ค
US User
Write request
โ–ถ
HTTPS
๐Ÿ–ฅ๏ธ
US App Server
Business logic
โ–ถ
Internal
๐Ÿ”Œ
API Gateway
Validate + route
โ–ถ
Inject
๐Ÿท๏ธ
SkyliftAI SDK
Stamp + idempotency
โ–ถ
Write
๐Ÿ—„๏ธ
RDS (US)
Committed โœ“
โšก
CDC Extract
Reads redo log
โ–ถ
Trail File
โš–๏ธ
CDR Engine
Conflict check
โ–ถ
Apply
๐Ÿ—„๏ธ
RDS (EU)
Replicated โœ“
โ–ถ
Invalidate
๐Ÿ”„
Cache Sync
EU cache updated
โ–ถ
Serve
๐Ÿ‘ค
EU User
Sees update <1s
โ†‘ The same flow runs in reverse simultaneously: EU writes propagate to US in parallel โ†‘
๐Ÿท๏ธ
Write Stamping & Region Tagging
Every write is tagged at the API layer with a region identifier (us-east-1 / eu-west-1), a high-precision timestamp, and an idempotency key. These metadata fields travel with the transaction through the CDC pipeline, enabling the conflict resolution engine to make deterministic decisions without ambiguity.
origin: "us-east-1" | ts: 1740392141.823 | idem: "usr_8a2f_upd"
๐Ÿ”„
Session & Cache Synchronisation
Application-level caches (Redis / ElastiCache) and user sessions are synchronised via SkyliftAI's Cache Sync module. When a write is replicated to the EU region, the Cache Sync module fires a targeted cache invalidation or update to the EU Redis cluster, ensuring EU users always read fresh, consistent data.
CACHE_INVALIDATE eu-west-1 key="user:8a2f:profile"
๐Ÿšฆ
Read/Write Routing Intelligence
SkyliftAI's middleware intercepts database calls and routes them intelligently: writes always go to the local region's primary RDS (for minimum latency), while reads can optionally be served from either region based on staleness tolerance. Applications declare their consistency requirements per operation; the router enforces them automatically.
@SkyliftWrite(region=LOCAL) @SkyliftRead(staleness=500ms)
๐Ÿ”
Idempotent Replication Safety
In a bidirectional architecture, the same message could theoretically be applied twice โ€” once from the originating write, once re-replicated back. SkyliftAI's idempotency layer detects and silently drops duplicate applications using the origin tag and idempotency key, making the entire replication pipeline exactly-once safe at the application level.
SKIP: duplicate idem key "usr_8a2f_upd" from origin us-east-1

When Both Regions Write
the Same Row

In a true active-active architecture, conflicts are not edge cases โ€” they are expected. SkyliftAI's AI-powered Conflict Detection & Resolution (CDR) engine handles them transparently, consistently, and with full auditability.

โฑ๏ธ
Last-Write-Wins (LWW)
The default strategy for most non-critical data. The transaction with the later high-precision timestamp wins. SkyliftAI uses NTP-synchronised clocks across regions with microsecond precision, making LWW reliable even for near-simultaneous writes. The losing transaction is preserved in the conflict log.
RESOLVE LWW: EU ts=1740392141.899 wins over US ts=1740392141.823
๐Ÿ 
Source-Region-Wins
For data types with a clear "home" region โ€” e.g., US customer records are mastered in US, EU inventory is mastered in EU โ€” source-wins rules ensure that the owning region always prevails regardless of timing. Tables are assigned a master region in the SkyliftAI configuration at the schema level.
TABLE users: master=us-east-1 โ†’ US always wins on PK conflict
๐Ÿค–
AI-Powered Custom Logic
For complex business data โ€” financial balances, inventory counts, reservation states โ€” SkyliftAI executes custom Python resolution functions at conflict time. The function receives both conflicting row versions and the full write metadata, and returns the resolved value. The AI engine can suggest resolution functions based on column semantics.
def resolve_balance(us_row, eu_row): return max(us_row, eu_row)
๐Ÿ“‹
Manual Escalation & Audit
Conflicts that exceed a configurable severity threshold โ€” e.g., financial transactions above a value limit โ€” are escalated to a human reviewer via the SkyliftAI dashboard. The conflict is held in a pending queue, both versions preserved, until a human approves a resolution. Every conflict and resolution is immutably logged.
ESCALATE: order_id=7291 value=$48,200 โ†’ pending human review

Why Bidirectional Replication
Changes Everything

Beyond the technical architecture, bidirectional continuous replication delivers measurable business outcomes โ€” from sub-millisecond user experience to regulatory compliance and disaster recovery that is always tested and always ready.

<20ms
Local Write Latency
Users always write to their local region. New York writes to US-East-1, Dublin writes to EU-West-1. No cross-Atlantic round trips for write operations โ€” local latency only.
99.999%
Availability SLA
If either region goes dark, the other continues serving 100% of traffic with zero data loss. Failover is automatic and instant โ€” there is no "standby" to promote; both regions are always primary.
0
Single Points of Failure
No primary/replica hierarchy means no single point of failure. The loss of any node, AZ, or entire region triggers automatic rerouting at the load balancer with zero RTO and near-zero RPO.
GDPR
Data Residency Compliance
SkyliftAI's table-level residency controls allow EU user PII to be stored in EU-West-1 only, with US operations replicated without PII fields. GDPR and data localisation requirements are enforced at the replication layer.
2ร—
Read Throughput
With two fully synchronised, always-current database primaries, read traffic can be distributed across both regions globally โ€” effectively doubling read throughput without any additional infrastructure investment.
AI
Self-Healing Pipeline
SkyliftAI's ReplicationOps AI continuously monitors lag, trail file health, and conflict rates. When anomalies are detected, it diagnoses and auto-remediates common issues โ€” adding Replicat threads, adjusting batch sizes, clearing trail file backlogs โ€” without human intervention.

When to Deploy Bidirectional
Continuous Replication

Use Case Industry Application Layer Need Replication Value
Global e-commerce platform Retail Cart & order sync across regions Sub-20ms local writes, zero cart loss on failover
Cross-border banking FinServ Balance updates, FX transactions Deterministic conflict resolution on financial rows
SaaS multi-tenant platform Technology Tenant data isolation + session sync GDPR residency + 99.999% per-tenant availability
Healthcare patient records Healthcare EHR access, clinical data writes Always-on access, HIPAA-compliant residency rules
Global inventory management Logistics Stock levels updated from both regions Source-wins by region prevents oversell conflicts
Real-time gaming leaderboards Gaming Score writes from global player base LWW conflict resolution + 2ร— read throughput
Post-merger IT consolidation M&A Two legacy apps writing to unified DB Gradual convergence with zero cutover downtime

Every Region a Primary.
Every Write Guaranteed.

SkyliftAI MigDB's bidirectional continuous replication architecture gives your business the freedom to operate globally without compromise โ€” on performance, on availability, or on data integrity.

โ†” Active
Both regions always writable
<1s
Cross-region replication lag
4 layers
App + API + CDC + DB synchronised
AI CDR
Intelligent conflict resolution