GrabYichao WangProblem & solution
How We Simplified Our Data Ingestion & Transformation Process
Summary
Grab evolved its real-time data ingestion pipeline after an initial architecture built on Spark Streaming and Python encountered operational complexity, node failures, and data loss from S3 eventual consistency. Because the streaming workload primarily handled event partitioning and ORC file generation, the team consolidated these tasks directly into an existing Golang processing service. They implemented sharded concurrent maps for high-throughput partitioning and optimized heap allocations to resolve memory bottlenecks. This refactor removed intermediate Avro conversions and intermediate storage hops. The simplified Go pipeline eliminated data loss and reduced processing lag from up to 13 minutes down to approximately 1 minute.
Context
Grab's initial real-time data ingestion pipeline suffered from operational complexity on EMR, 4-to-13-minute processing lags, and data loss caused by Spark Streaming interacting with hourly S3 prefixes and eventual consistency at high volumes.
Approach / What changed
Grab eliminated Spark Streaming, Python components, and intermediate Avro encoding by implementing event partitioning with sharded concurrent maps and direct Protobuf-to-ORC encoding within an optimized Golang transformation service.
Takeaways
Using Spark Streaming to consume objects from S3 caused data loss at over one terabyte per hour due to S3 eventual consistency and hourly prefix boundaries.
Replacing the multi-stage pipeline simplified the conversion chain from Protobuf -> Avro -> ORC directly to Protobuf -> ORC.
Using sharded concurrent maps in Golang coupled with heap allocation profiling allowed the service to maintain high write throughput and low read latency without memory exhaustion.
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.