GrabShuguang XiangProblem & solution
Real-time data ingestion in Grab
Summary
Service teams at Grab historically had to dual-write transactional data into databases and Kafka, creating data integrity issues during transaction failures alongside substantial schema maintenance overhead. To overcome these limitations and eliminate burst reads from SQL-based queries, the Caspian team built a real-time ingestion platform synchronising MySQL, Aurora, and DynamoDB directly to Kafka. For MySQL and Aurora, the platform uses Debezium with Kafka Connect on ROW-format binlogs, while DynamoDB changes are captured via DynamoDB streams with auto-scaling AWS Lambda functions. Messages encoded in Protobuf are transported via Kafka and ingested into Amazon S3 using a Golang stream processor. This architecture supports search indexing in Elasticsearch, automated data lake pipelines, cross-region disaster recovery replication, and audit trails.
Context
Service teams had to write transactional data twice (to Kafka and databases), risking data inconsistency on failed transactions, struggling with schema maintenance, and causing database read spikes from SQL-based pipeline queries.
Approach / What changed
Grab implemented an event-driven ingestion platform combining Debezium for MySQL and Aurora binlogs, AWS Lambda producers for DynamoDB streams, Kafka messaging with Protobuf encoding, and Golang stream processors dumping data to S3.
Takeaways
Using Debezium integrated with Kafka Connect reduced database reads by 90 percent for the Grab Search indexing pipeline.
AWS Lambda was chosen over a single-threaded Kafka Connect DynamoDB connector because Lambda dynamically auto-scales concurrency to handle partitioned DynamoDB stream surges.
MySQL and Aurora binlogs preserve global ordering across records, whereas DynamoDB streams guarantee consistent ordering only within the same partition.
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.