EPX: Real-Time MySQL Change Capture and Kafka Sync Architecture
EPX is a high‑availability, high‑performance data pipeline that captures MySQL binlog changes in real time, parses and filters them, and streams unified JSON events to Kafka for downstream services, while providing monitoring, alerting, backup, and migration capabilities across many business units.
EPX is a high‑availability, high‑performance data pipeline that captures MySQL binlog changes in real time and streams them to Kafka for downstream consumption.
It implements MySQL master‑slave replication principles: the slave creates I/O and SQL threads, reads binlog from the master, writes to a relay log, and replays statements to keep data consistent.
EPX mimics a MySQL slave, sends a dump request to the master, receives binary log streams, parses and filters them, transforms the events into a unified JSON format, and writes them to Kafka.
The architecture consists of ConfigManager, TaskManager, EventParse (based on Alibaba Canal), EventHandler, KafkaWriter, and PositionManager, all coordinated via Zookeeper for load balancing and offset tracking.
Key functions include real‑time change monitoring (INSERT, UPDATE, DELETE), offline statistics and backup to Hive, database migration support, latency and traffic monitoring, and customizable anomaly alerts.
High‑availability is achieved through multiple worker clusters, multi‑data‑center deployment, automatic load balancing, and fast failover, aiming for five‑nine availability.
EPX is currently used across 32 departments at the company, supporting search, recommendation, data warehousing, real‑time metrics, and critical field change subscriptions, with over 1,131 tables monitored.
Future plans focus on further latency reduction, additional Kafka outputs, MySQL master‑slave failover, and continued architectural optimizations.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Beike Product & Technology
As Beike's official product and technology account, we are committed to building a platform for sharing Beike's product and technology insights, targeting internet/O2O developers and product professionals. We share high-quality original articles, tech salon events, and recruitment information weekly. Welcome to follow us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
