GrabJohan KokProblem & solution
Data First, SLA Always
Summary
Grab's Data Engineering team transitioned from periodic batch ETL ingestion to a real-time change data capture architecture called Trailblazer after dataset sizes exceeded the petabyte mark. The previous system caused severe JDBC timeouts and heavy CPU loads when executing chunked or full-scan queries on unindexed upstream MySQL tables. To solve this, MySQL binary logs are captured via Debezium on Kafka Connect, buffered in Kafka, and ingested into a data lake using Spark Structured Streaming. Checkpoints are decoupled from local storage and persisted in a Redis cluster to simplify ingestion offset overrides and handle ephemeral compute clusters. The system incorporates extensive health monitoring across Airflow, Datadog, and custom services to maintain stream liveliness and avoid Kafka retention breaches.
Context
Grab's batch ETL Loader application struggled as data surpassed petabyte scale, causing JDBC timeouts on growing tables and high CPU load when querying MySQL tables lacking proper update timestamps or indexes.
Approach / What changed
Built Trailblazer, a change data capture pipeline that uses Debezium to stream MySQL binary logs into Kafka, consumes them via Spark Structured Streaming into a data lake, and manages checkpoints externally in Redis.
Takeaways
Externalizing Spark checkpoint management to Redis allows operators to alter starting offsets without modifying S3 metadata and prevents state loss when clusters terminate.
Comparing ingested Kafka topic-partition offsets against total end offsets detects stream divergence before messages exceed Kafka's retention window.
Airflow automates stream restarts and retries when transient infrastructure issues, such as DNS resolution failures or broker disk exhaustion, terminate Spark jobs.
Source and freshness
- Source
- engineering.grab.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.