Strangler Fig Read-Only Migration with Debezium CDC

Prerequisite: Familiarity with the concepts introduced in Part 5 — Eav Schema Migration. Review it first if the terminology in this part is unfamiliar. Phase 1 is the safest phase of the migration — by design. No write operation touches the new microservices. Magento remains the source of truth for all data modifications. The only thing Phase 1 does is prove that your microservices can serve reads faster and more reliably than Magento. ...

May 13, 2026 · 13 min · Lê Tuấn Anh

Magento Migration: Shared DB, CDC, or Event Bus?

Magento Migration: Shared DB, CDC, or Event Bus? Why Go running against Magento’s MySQL is faster at the compute layer but still bottlenecked at the EAV query layer — and what actually fixes it. The single deciding factor between CDC (Option B) and Event Bus (Option C): who owns the PHP Magento codebase. This post is part of the Composable Commerce Migration series — a step-by-step playbook for migrating Magento 2 to Go microservices. For the full migration execution guide, see Part 6: Phase 1 Strangler Fig. ...

July 18, 2026 · 14 min · Lê Tuấn Anh

Composable E-Commerce Migration: Overcoming Tech Debt

Composable E-Commerce Migration: Overcoming Tech Debt See the 21-service e-commerce architecture blueprint for the domain boundaries this migration targets. In theory, MACH (Microservices, API-first, Cloud-native, Headless) and Composable Commerce are the “holy grail” of the e-commerce industry. However, when systems scale to process millions of transactions, issues regarding data consistency, domain decomposition, and observability costs surface. This guide details the lessons and architectural patterns from migrating a monolithic Magento application into a 21-service Go microservices platform. ...

July 6, 2026 · 9 min · Lê Tuấn Anh

Saga Pattern in Go — Temporal, Outbox Pattern & Debezium

The Saga Pattern coordinates distributed transactions across microservices by decomposing a large transaction into a sequence of local transactions. If any step fails, the system automatically executes compensating transactions in reverse order to undo completed steps. Each local transaction must be idempotent. Prerequisite: Part 8 of the System Design Masterclass. Read Part 7: Idempotent API Design first — compensating transactions in Saga must be idempotent. What You’ll Learn Temporal Workflow Determinism: How Temporal’s event sourcing workflow engine replays Go code, and why random functions or time sleeps crash workers. Debezium EventRouter Tuning: The exact JSON configuration keys needed to customize Kafka routing keys and prevent partition ordering issues. Pivot State Analysis: Identifying the “point of no return” in a distributed saga where compensations are no longer allowed. What Are the Problems with 2PC in Microservices? Key Concept: Two-Phase Commit (2PC) is a blocking protocol with a coordinator single point of failure. If the coordinator crashes between the Prepare and Commit phases, all participants are blocked indefinitely with locks held — a catastrophic failure mode in microservices. These are the same core banking distributed transaction challenges seen in legacy systems. ...

June 18, 2026 · 7 min · Lê Tuấn Anh

Real-Time Inventory: Kafka, CDC & Redis for E-Commerce

Real-Time Inventory Topology: CDC, Kafka, and Redis Real-time inventory synchronization is the process of propagating stock count changes from the system of record (database) to all sales channels — web storefront, mobile app, WMS, ERP — in sub-second time. Instead of batch ETL jobs that run every hour, a CDC + Kafka pipeline streams every committed stock change as an event, eliminating overselling and stale stock displays. Handling this during a flash sale — where thousands of users attempt to purchase a highly contested SKU simultaneously — is a pinnacle architectural challenge. Traditional synchronous database updates collapse under lock contention. ...

June 8, 2026 · 10 min · Lê Tuấn Anh

Why Migrate Magento to Microservices: Zero-Downtime Guide

Why Migrate Magento to Microservices: Zero-Downtime Blueprint “Let’s rewrite everything to Microservices.” This sentence usually precedes multimillion-dollar engineering failures. When a legacy application like a massive Magento e-commerce store is holding up the financial weight of a company, executing a “Big Bang” cutover is practically suicidal. Instead of burning the old house down before the new one is built, we employed a meticulous 3-Phase Strangler Fig Pattern. We allowed our new distributed microservice ecosystem to gradually wrap around the old Magento monolith, intercepting its traffic piece by piece until the legacy server became a hollow shell. For a detailed breakdown of overcoming tech debt and managing eventual consistency during such transitions, see our guide on Composable Commerce Migration. ...

April 14, 2026 · 15 min · Lê Tuấn Anh