Databases 16 min read

How Lufax Achieved a Zero‑Downtime, 100% Oracle‑to‑MySQL Migration

Lufax completed a two‑year, zero‑downtime, 100% Oracle‑to‑MySQL migration across its entire financial platform, detailing the dual‑write strategy, fine‑grained batch switching, tool‑driven automation, and the resulting cost and operational benefits for over 45 million users and supporting critical transaction services.

Efficient Ops
Efficient Ops
Efficient Ops
How Lufax Achieved a Zero‑Downtime, 100% Oracle‑to‑MySQL Migration

Lufax Full‑Site Oracle Removal Achievements

Lufax finished a two‑year, 100% Oracle‑to‑MySQL migration, taking the last Oracle instance offline last month and replacing all production databases without any service degradation, risk, or downtime.

The migration covered all products—including funds, online lending, and trust—affecting core financial systems such as accounting, payments, trading, and asset management.

Four Key Characteristics of Lufax’s Oracle Removal

Online migration without service degradation, minimizing impact on users.

Zero‑fault, zero‑risk replacement of every production database.

Complete migration completed within two years, demonstrating rapid execution.

A proprietary framework and tooling that coordinated hundreds of developers, ensuring high‑quality code and change management.

Dual‑Write and Switch Scheme

The core idea is to use dual‑write and traffic‑switching mechanisms to replace the commercial database while keeping services online.

Key steps include fine‑grained code refactoring to separate business logic from SQL, batch‑by‑batch rollout, and independent traffic switches for each batch.

Rapid Application Traffic Switching Between Oracle and MySQL

The migration follows three states: initial Oracle write service, a brief intermediate state (under 10 seconds) ensuring the last Oracle transaction commits, and final synchronization to MySQL with full data consistency checks.

After the final sync, traffic is switched to MySQL, which also parses MySQL binlogs to keep Oracle in sync for rollback safety.

Fine‑Grained Batch Splitting for Complex Financial Systems

Large legacy financial applications are split into fine‑grained batches; each batch is migrated independently, allowing controlled risk and gradual rollout.

Service‑Oriented Architecture for Parallel Batch Migration

Core services (accounting, user, trading, asset, fund) are exposed via synchronous and asynchronous calls. Each development team manages its own migration pace, enabling large‑scale coordinated rollout.

Oracle’s powerful features are gradually replaced by MySQL and other storage engines (e.g., ES, TiDB) where appropriate, improving query performance and reducing costs.

Benefits of 100% Oracle Removal for Core Financial Systems

Significant reduction in IT operational costs.

Reduced vendor lock‑in and reliance on proprietary database features.

Enhanced engineering capabilities through architecture refactoring and service‑orientation.

Improved automation, tooling, and development platform maturity.

Database Operating Cost Comparison Before and After Migration

Prior to migration (2015‑2016) Lufax invested heavily in IOE hardware. After migration, hardware costs dropped dramatically, with MySQL and other open‑source databases incurring minimal expense while maintaining high performance.

Implementation of Lufax’s Migration Solution

The project followed a “people‑rules‑tools” closed loop: senior engineers defined rules, developers built tools to enforce them, and the tools automated the migration workflow.

Hundreds of developers participated in the planning phase, while a core team of fewer than ten engineers built the migration platform and middleware.

Personnel Investment

Over 24 months, about 400 developers were involved, with roughly 10 core contributors managing the tooling and middleware. The migration of tens of thousands of tables was performed by two engineers using an automated platform.

Approximately 40% of development effort focused on SQL refactoring, which was largely automated by a custom SQL conversion tool that transformed Oracle SQL to MySQL syntax.

Automation and Tooling Highlights

Automated performance testing, dual‑write mechanisms, and incremental data validation ensured seamless cut‑over. The platform also handled schema changes without locking tables, providing transparent migration for production workloads.

automationmysqlOracledatabase migrationzero downtimefinancial systems
Efficient Ops
Written by

Efficient Ops

This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.