SlideShare a Scribd company logo
Brought to you by
Aggregator Leaf Tailer:
Bringing Data to Your Users with
Ultra Low Latency
Jeffery Utter
Staff Developer at theScore
Jeffery Utter
Staff Developer, theScore
■ Built half of a distributed database
■ P99.*s matter to 100% of users
■ Wrote my first line of Java at age 30-something
■ I lead a double-life as a double-bassist
Table of Contents
■ What is Aggregator, Leaf, Tailor:
■ Goals and Constraints
■ Why not < insert your favorite (distributed) database >
■ Datadex
■ Performance Tips
● Java
● RocksDB
■ Overview
● Architecture
● Future
■ Conclusion
Aggregator, Leaf, Tailer
Aggregator, Leaf, Tailer
■ Term started getting use in 2019
■ Largely promoted by Rockset
● Rockset Concepts, Design & Architecture [1]
● Aggregator Leaf Tailer: An Alternative to Lambda Architecture for Real-Time Analytics [2]
● Rockset’s Aggregator-Leaf-Tailer Architecture for SQL on semi structured data [3]
■ Prior Art
● Facebook: Science and the Social Graph (2008) [4]
● Serving Facebook Multifeed: Efficiency, performance gains through redesign (2015) [5]
● FollowFeed: LinkedIn's Feed Made Faster and Smarter (2016) [6]
■ Aggregator — Low latency aggregation of data stored in one or more Leaf
■ Leaf — All data stored and indexed in one or more leaf
■ Tailer — Pulls new data from various sources and inserts it into the leaves
Aggregator, Leaf, Tailer
Goals & Constraints
Goals & Constraints
■ Low latency
■ Low operational complexity
● Ease of maintenance
● Ease of deployment (in all
geolocations)
■ Developer ergonomics
■ Scalability
Why Not …?
Traditional RDBMS (Postgres)
■ Duplication of effort to populate databases
■ Operational overhead - database setup, maintenance, scaling
■ Implicit shared “schema”
■ Good scalability via hosted offerings
■ Operational overhead for on-prem
Cloud NoSQL (MongoDB)
Kafka-native (Rockset/kSQL)
■ Not an exact match with our querying needs (kSQL has no secondary
indexes)
■ Both seem geared towards analytic workflows
■ Operational overhead for on-prem
Datadex
■ Aggregator — Low latency aggregation of data stored in one or more Leaf
■ Leaf — All data stored and indexed in one or more leaf
■ Tailer — Pulls new data from various sources and inserts it into the leaves
Aggregator, Leaf, Tailer
Aggregator, Leaf, Tailer
■ Aggregator — gRPC Java
■ Leaf — RocksDB
■ Tailer — Kafka
■ zGC
■ Careful memory allocations
■ GRPC Streaming
■ Double-edged sword
■ “Bypasses” service mesh
Low Latency
■ Single codebase
■ Single deployable unit (for now)
■ Instances managed by Kubernetes Operator
■ Deploy / Release / Upgrade cycle similar to other backend applications
Low Operational Complexity
■ Simple configuration through CRD
■ Elixir Client library
■ Simple query “language”
■ “Watch” feature to stream updates to downstream services
Developer Ergonomics
Scalability
■ Fast scale-out through snapshot/backup/restore mechanism
■ Future improvements to independently scale Aggregator/Leaf/Tailer
Performance Tips
Java
Minimize Allocations
Ops/sec Error
Before 3,053.990 ± 742.316
After 3,964.574 ± 240.020
~ 30% Increase
Throughput
■ Re-use buffers for key
serialization/deserialization
■ Re-use buffer for reading values - up to
a certain size (fastGet)
RocksDB
Ruthlessly Narrow
Search Range
After
Before
Resources
1. Rockset Concepts, Design & Architecture:
https://rockset.com/Rockset_Concepts_Design_Architecture.pdf
2. Aggregator Leaf Tailer: An Alternative to Lambda Architecture for Real-Time Analytics:
https://rockset.com/blog/aggregator-leaf-tailer-an-architecture-for-live-analytics-on-event-streams/
3. Rockset’s Aggregator-Leaf-Tailer Architecture for SQL on semi structured data:
http://www.hpts.ws/papers/2019/RocksetHPTS19.pdf
4. Facebook: Science and the Social Graph
https://www.infoq.com/presentations/Facebook-Software-Stack/ (about 53 minutes in)
5. Serving Facebook Multifeed: Efficiency, performance gains through redesign:
https://engineering.fb.com/2015/03/10/production-engineering/serving-facebook-multifeed-efficiency-performance-gains-
through-redesign/
6. FollowFeed: LinkedIn's Feed Made Faster and Smarter:
https://engineering.linkedin.com/blog/2016/03/followfeed--linkedin-s-feed-made-faster-and-smarter
Realtime Indexing for Fast Queries on Massive Semi-Structured Data:
https://www.p99conf.io/session/realtime-indexing-for-fast-queries-on-massive-semi-structured-data/
Brought to you by
Jeffery Utter
jeff@jeffutter.com
@jeffutter

More Related Content

PDF
Redpanda and ClickHouse
PPTX
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
PPTX
Sizing MongoDB Clusters
PDF
Dynamic Partition Pruning in Apache Spark
PDF
cLoki: Like Loki but for ClickHouse
PDF
Substrait Overview.pdf
PPTX
Evening out the uneven: dealing with skew in Flink
PPTX
Apache Kafka Best Practices
Redpanda and ClickHouse
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Sizing MongoDB Clusters
Dynamic Partition Pruning in Apache Spark
cLoki: Like Loki but for ClickHouse
Substrait Overview.pdf
Evening out the uneven: dealing with skew in Flink
Apache Kafka Best Practices

What's hot (20)

PPT
Step-by-Step Introduction to Apache Flink
PPTX
Dynamo and BigTable in light of the CAP theorem
PPTX
Kibana overview
PDF
Low latencytradingsystem by_barunsharma
PPTX
Programming in Spark using PySpark
PDF
Ninja Build: Simple Guide for Beginners
PDF
Introduction to Redis
PDF
Airflow presentation
PDF
Adventures in Observability - Clickhouse and Instana
PDF
Introducing ELK
PDF
ClickHouse Deep Dive, by Aleksei Milovidov
PDF
Spark overview
PDF
The Parquet Format and Performance Optimization Opportunities
PDF
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...
ODP
Elasticsearch for beginners
PDF
Apache Iceberg - A Table Format for Hige Analytic Datasets
PPTX
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
PDF
Apache Spark Core – Practical Optimization
PDF
Apache Airflow
PPTX
Envoy and Kafka
Step-by-Step Introduction to Apache Flink
Dynamo and BigTable in light of the CAP theorem
Kibana overview
Low latencytradingsystem by_barunsharma
Programming in Spark using PySpark
Ninja Build: Simple Guide for Beginners
Introduction to Redis
Airflow presentation
Adventures in Observability - Clickhouse and Instana
Introducing ELK
ClickHouse Deep Dive, by Aleksei Milovidov
Spark overview
The Parquet Format and Performance Optimization Opportunities
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...
Elasticsearch for beginners
Apache Iceberg - A Table Format for Hige Analytic Datasets
Squirreling Away $640 Billion: How Stripe Leverages Flink for Change Data Cap...
Apache Spark Core – Practical Optimization
Apache Airflow
Envoy and Kafka
Ad

Similar to Aggregator Leaf Tailer: Bringing Data to Your Users with Ultra Low Latency (20)

PPTX
Apache Spark Core
PDF
700 Queries Per Second with Updates: Spark As A Real-Time Web Service
PDF
700 Updatable Queries Per Second: Spark as a Real-Time Web Service
PDF
Introduction to Apache Flink
PDF
🐬 The future of MySQL is Postgres 🐘
PDF
Introduction to Postrges-XC
PPTX
Capacity Planning
PPTX
Apache Spark for Beginners
PDF
Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F...
PDF
Understanding Hadoop
PPTX
Architectures, Frameworks and Infrastructure
PPTX
Big Data Processing with Apache Spark 2014
PPTX
Apache Spark on HDinsight Training
PDF
Spark Driven Big Data Analytics
PPT
11. From Hadoop to Spark 1:2
PPT
Big_data_analytics_NoSql_Module-4_Session
PDF
Running Cassandra in AWS
PPTX
This is training for spark SQL essential
PDF
Jump Start on Apache Spark 2.2 with Databricks
PDF
Complex Ephemeral Caching With Redis: Jeff Pollard
Apache Spark Core
700 Queries Per Second with Updates: Spark As A Real-Time Web Service
700 Updatable Queries Per Second: Spark as a Real-Time Web Service
Introduction to Apache Flink
🐬 The future of MySQL is Postgres 🐘
Introduction to Postrges-XC
Capacity Planning
Apache Spark for Beginners
Scalable Monitoring Using Prometheus with Apache Spark Clusters with Diane F...
Understanding Hadoop
Architectures, Frameworks and Infrastructure
Big Data Processing with Apache Spark 2014
Apache Spark on HDinsight Training
Spark Driven Big Data Analytics
11. From Hadoop to Spark 1:2
Big_data_analytics_NoSql_Module-4_Session
Running Cassandra in AWS
This is training for spark SQL essential
Jump Start on Apache Spark 2.2 with Databricks
Complex Ephemeral Caching With Redis: Jeff Pollard
Ad

More from ScyllaDB (20)

PDF
Understanding The True Cost of DynamoDB Webinar
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
PDF
New Ways to Reduce Database Costs with ScyllaDB
PDF
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
PDF
Powering a Billion Dreams: Scaling Meesho’s E-commerce Revolution with Scylla...
PDF
Leading a High-Stakes Database Migration
PDF
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
PDF
Securely Serving Millions of Boot Artifacts a Day by João Pedro Lima & Matt ...
PDF
How Agoda Scaled 50x Throughput with ScyllaDB by Worakarn Isaratham
PDF
How Yieldmo Cut Database Costs and Cloud Dependencies Fast by Todd Coleman
PDF
ScyllaDB: 10 Years and Beyond by Dor Laor
PDF
Reduce Your Cloud Spend with ScyllaDB by Tzach Livyatan
PDF
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
PDF
Vector Search with ScyllaDB by Szymon Wasik
PDF
Workload Prioritization: How to Balance Multiple Workloads in a Cluster by Fe...
PDF
Two Leading Approaches to Data Virtualization, and Which Scales Better? by Da...
PDF
Scaling a Beast: Lessons from 400x Growth in a High-Stakes Financial System b...
PDF
Object Storage in ScyllaDB by Ran Regev, ScyllaDB
PDF
Lessons Learned from Building a Serverless Notifications System by Srushith R...
Understanding The True Cost of DynamoDB Webinar
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
New Ways to Reduce Database Costs with ScyllaDB
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Powering a Billion Dreams: Scaling Meesho’s E-commerce Revolution with Scylla...
Leading a High-Stakes Database Migration
Achieving Extreme Scale with ScyllaDB: Tips & Tradeoffs
Securely Serving Millions of Boot Artifacts a Day by João Pedro Lima & Matt ...
How Agoda Scaled 50x Throughput with ScyllaDB by Worakarn Isaratham
How Yieldmo Cut Database Costs and Cloud Dependencies Fast by Todd Coleman
ScyllaDB: 10 Years and Beyond by Dor Laor
Reduce Your Cloud Spend with ScyllaDB by Tzach Livyatan
Migrating 50TB Data From a Home-Grown Database to ScyllaDB, Fast by Terence Liu
Vector Search with ScyllaDB by Szymon Wasik
Workload Prioritization: How to Balance Multiple Workloads in a Cluster by Fe...
Two Leading Approaches to Data Virtualization, and Which Scales Better? by Da...
Scaling a Beast: Lessons from 400x Growth in a High-Stakes Financial System b...
Object Storage in ScyllaDB by Ran Regev, ScyllaDB
Lessons Learned from Building a Serverless Notifications System by Srushith R...

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Big Data Technologies - Introduction.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
cuic standard and advanced reporting.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Machine learning based COVID-19 study performance prediction
PDF
Approach and Philosophy of On baking technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
sap open course for s4hana steps from ECC to s4
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Big Data Technologies - Introduction.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
Review of recent advances in non-invasive hemoglobin estimation
cuic standard and advanced reporting.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Unlocking AI with Model Context Protocol (MCP)
The Rise and Fall of 3GPP – Time for a Sabbatical?
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine learning based COVID-19 study performance prediction
Approach and Philosophy of On baking technology
Spectral efficient network and resource selection model in 5G networks
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf
sap open course for s4hana steps from ECC to s4

Aggregator Leaf Tailer: Bringing Data to Your Users with Ultra Low Latency

  • 1. Brought to you by Aggregator Leaf Tailer: Bringing Data to Your Users with Ultra Low Latency Jeffery Utter Staff Developer at theScore
  • 2. Jeffery Utter Staff Developer, theScore ■ Built half of a distributed database ■ P99.*s matter to 100% of users ■ Wrote my first line of Java at age 30-something ■ I lead a double-life as a double-bassist
  • 3. Table of Contents ■ What is Aggregator, Leaf, Tailor: ■ Goals and Constraints ■ Why not < insert your favorite (distributed) database > ■ Datadex ■ Performance Tips ● Java ● RocksDB ■ Overview ● Architecture ● Future ■ Conclusion
  • 5. Aggregator, Leaf, Tailer ■ Term started getting use in 2019 ■ Largely promoted by Rockset ● Rockset Concepts, Design & Architecture [1] ● Aggregator Leaf Tailer: An Alternative to Lambda Architecture for Real-Time Analytics [2] ● Rockset’s Aggregator-Leaf-Tailer Architecture for SQL on semi structured data [3] ■ Prior Art ● Facebook: Science and the Social Graph (2008) [4] ● Serving Facebook Multifeed: Efficiency, performance gains through redesign (2015) [5] ● FollowFeed: LinkedIn's Feed Made Faster and Smarter (2016) [6]
  • 6. ■ Aggregator — Low latency aggregation of data stored in one or more Leaf ■ Leaf — All data stored and indexed in one or more leaf ■ Tailer — Pulls new data from various sources and inserts it into the leaves Aggregator, Leaf, Tailer
  • 8. Goals & Constraints ■ Low latency ■ Low operational complexity ● Ease of maintenance ● Ease of deployment (in all geolocations) ■ Developer ergonomics ■ Scalability
  • 10. Traditional RDBMS (Postgres) ■ Duplication of effort to populate databases ■ Operational overhead - database setup, maintenance, scaling
  • 11. ■ Implicit shared “schema” ■ Good scalability via hosted offerings ■ Operational overhead for on-prem Cloud NoSQL (MongoDB)
  • 12. Kafka-native (Rockset/kSQL) ■ Not an exact match with our querying needs (kSQL has no secondary indexes) ■ Both seem geared towards analytic workflows ■ Operational overhead for on-prem
  • 14. ■ Aggregator — Low latency aggregation of data stored in one or more Leaf ■ Leaf — All data stored and indexed in one or more leaf ■ Tailer — Pulls new data from various sources and inserts it into the leaves Aggregator, Leaf, Tailer
  • 15. Aggregator, Leaf, Tailer ■ Aggregator — gRPC Java ■ Leaf — RocksDB ■ Tailer — Kafka
  • 16. ■ zGC ■ Careful memory allocations ■ GRPC Streaming ■ Double-edged sword ■ “Bypasses” service mesh Low Latency
  • 17. ■ Single codebase ■ Single deployable unit (for now) ■ Instances managed by Kubernetes Operator ■ Deploy / Release / Upgrade cycle similar to other backend applications Low Operational Complexity
  • 18. ■ Simple configuration through CRD ■ Elixir Client library ■ Simple query “language” ■ “Watch” feature to stream updates to downstream services Developer Ergonomics
  • 19. Scalability ■ Fast scale-out through snapshot/backup/restore mechanism ■ Future improvements to independently scale Aggregator/Leaf/Tailer
  • 21. Java
  • 22. Minimize Allocations Ops/sec Error Before 3,053.990 ± 742.316 After 3,964.574 ± 240.020 ~ 30% Increase Throughput ■ Re-use buffers for key serialization/deserialization ■ Re-use buffer for reading values - up to a certain size (fastGet)
  • 25. Resources 1. Rockset Concepts, Design & Architecture: https://rockset.com/Rockset_Concepts_Design_Architecture.pdf 2. Aggregator Leaf Tailer: An Alternative to Lambda Architecture for Real-Time Analytics: https://rockset.com/blog/aggregator-leaf-tailer-an-architecture-for-live-analytics-on-event-streams/ 3. Rockset’s Aggregator-Leaf-Tailer Architecture for SQL on semi structured data: http://www.hpts.ws/papers/2019/RocksetHPTS19.pdf 4. Facebook: Science and the Social Graph https://www.infoq.com/presentations/Facebook-Software-Stack/ (about 53 minutes in) 5. Serving Facebook Multifeed: Efficiency, performance gains through redesign: https://engineering.fb.com/2015/03/10/production-engineering/serving-facebook-multifeed-efficiency-performance-gains- through-redesign/ 6. FollowFeed: LinkedIn's Feed Made Faster and Smarter: https://engineering.linkedin.com/blog/2016/03/followfeed--linkedin-s-feed-made-faster-and-smarter Realtime Indexing for Fast Queries on Massive Semi-Structured Data: https://www.p99conf.io/session/realtime-indexing-for-fast-queries-on-massive-semi-structured-data/
  • 26. Brought to you by Jeffery Utter jeff@jeffutter.com @jeffutter