GrabRoman AtachiantsProblem & solution
Querying Big Data in Real-time with Presto & Grab's TalariaDB
Summary
Grab developed TalariaDB to support real-time SQL querying over high-velocity event streams while maintaining predictable sub-second latencies and low infrastructure costs. The distributed time-series store retains only the most recent hour of data and integrates directly with Presto via its PrestoThriftService interface. Internally, TalariaDB uses the Go-based Badger key-value store to maintain an in-memory key index of metric names and timestamps while mapping columnar event payloads directly to disk. Ingestion occurs by processing pre-partitioned event batches written to Amazon S3 via SQS notifications. By combining a zero-copy decoder with parallel split evaluation across gossiping cluster nodes, the architecture scales horizontally while serving millions of events per second.
Context
Grab needed to query at least 2 to 3 terabytes of high-velocity real-time event data per hour using SQL with predictable low latency and low cost, to enable fast decision-making when experiments impact platform metrics.
Approach / What changed
Grab built TalariaDB, a distributed time-series data store written in Go that ingests columnar event batches from S3 via SQS notifications, stores them in Badger LSM-trees with time-based eviction, and exposes data to Presto via the Presto Thrift Connector.
Takeaways
TalariaDB uses Badger's key-value store to keep lexicographically ordered metric and timestamp keys in memory while memory-mapping columnar event batches for zero-copy retrieval.
Ingestion delegates partitioning and batch creation to upstream pipeline services, allowing TalariaDB to ingest files directly from S3 upon receiving SQS notifications.
Presto queries TalariaDB instances in parallel using the Presto Thrift Connector, while nodes maintain cluster membership via the Gossip protocol and register in Route 53.
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.