SlideShare a Scribd company logo
1 of 13
Google Mesa
Sameer Tiwari
Hadoop Architect, Pivotal Inc.
stiwari@pivotal.io @sameertech Aug 12, 2014
What is Mesa?
● Geo-Replicated, Near Real-Time, Scalable
Data Warehousing for Google’s Internet
Advertising Business.
● Ok so what is it really?
o Its an Atomic, Consistent, Available, Near Real
Time, Scalable Store
Salient features
● DW for Ad serving at Google
● Metadata on BigTable
● Data on Colossus
● Trillions of Queries/day, Millions/second
● Support Multiple indexes
● Runs on tens of thousands machines across
geos
Data Model
● Table are specified by Table Schemas
● Table Schema by, Key and Value Space
o K, V are sets
o Each is represented as column tuples
o Specifies an aggregation function
● Each Col stored separately
● For consistency updates are multi-versioned
and batched for throughput
● Data is amenable to aggregation
Data Model
● Pre-aggregates data into Deltas (no
repeated row keys/delta) and applies a
version
● Compaction is multi-level
● A Controller handles updates/ maintenance,
works with BigTable
Controller
● 4 sub-systems
o Updates
o Compaction
o Checksum
o Schema change
● Does not do any work, only schedules it
Storage and Indexes
- AO, log structured, read-only
- Rows organized as compressed row-blocks
- Indexes have starting entry of the row-block
- Naive lookup
- Binary Search on index to find row-
blocks
- Binary Search on the row-blocks
Query sub system
● Limited Query engine with Filtering/Predicate
● Used by higher level systems
Dremel/MySQL
● Has multiple stateless Query Servers
● Works on both the BigTable and Colossus
● Provides nice sharding and LB mechanism
● Groups similar queries to a subset of
Servers
Multi Datacenter Deployment
● Tables are multi-versioned
o (Serve old data while new is in-progress)
● Committer is stateless and sends updates to
multiple Datacenters
o Built on top of versionsDB. - Globally replicated and
consistent store build on top of distributed Paxos.
● Data goes async across Mesa instances
● Only Metadata is sync-repl using Paxos-
versionsDB
Optimizations
● Delta pruning - similar to Filter pushdown
● Resume-Key, Key per data block
o Data is returned a block at a time, so if a
QueryServer dies, another one can pick it up.
● Parallelizing workloads: Uses MR to shard
o While writing delta, Mesa sample row-keys which is
used to figure out the right number of
Mappers/Reducers.
o The workers are the same 4 workers scheduled by
the Controller
Optimizations
● Schema changes - two techniques
o Create, Copy, Replay and delete - Expensive
o Link and add default values - This is used in Mesa
● New Instances of Mesa use P2P
mechanisms to come up and online.
Handling Data Corruption
● Mesa runs on ~50K boxes
● Online - During updates.
o Fact: Each Mesa instance is logically same but
physically may differ in deltas
o Check chksums of indexes/data
o Row-order, key-range, aggregate values should be
same, across instances
● Offline
o Run global chksums of all indexes
Reference
http://static.googleusercontent.com/media/rese
arch.google.com/en/us/pubs/archive/42851.pdf

More Related Content

What's hot

Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Dharma Shukla
 
Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Imesh Gunaratne
 
Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)Akash Agrawal
 
Airflow Clustering and High Availability
Airflow Clustering and High AvailabilityAirflow Clustering and High Availability
Airflow Clustering and High AvailabilityRobert Sanders
 
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...Ceph Community
 
Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?Johnny Miller
 
5 things you didn't know nginx could do
5 things you didn't know nginx could do5 things you didn't know nginx could do
5 things you didn't know nginx could dosarahnovotny
 
Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...
Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...
Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...KTN
 
Dreaming Infrastructure
Dreaming InfrastructureDreaming Infrastructure
Dreaming Infrastructurekyhpudding
 
Building a Self-Service Big Data Pipeline
Building a Self-Service Big Data PipelineBuilding a Self-Service Big Data Pipeline
Building a Self-Service Big Data PipelineDataWorks Summit
 
Docker Security Overview
Docker Security OverviewDocker Security Overview
Docker Security OverviewSreenivas Makam
 
Google Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep diveGoogle Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep diveAkash Agrawal
 
Composable data for the composable enterprise
Composable data for the composable enterpriseComposable data for the composable enterprise
Composable data for the composable enterpriseMatt McLarty
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDBMongoDB
 
Royal IHC corporate presentation
Royal IHC corporate presentationRoyal IHC corporate presentation
Royal IHC corporate presentationRoyal IHC
 
Monitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialMonitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialTim Vaillancourt
 
The automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm ChartsThe automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm ChartsAna-Maria Mihalceanu
 
Benchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsBenchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsNGINX, Inc.
 
Log management with ELK
Log management with ELKLog management with ELK
Log management with ELKGeert Pante
 

What's hot (20)

Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019Cosmos DB at VLDB 2019
Cosmos DB at VLDB 2019
 
Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1
 
Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)Kubernetes & Google Kubernetes Engine (GKE)
Kubernetes & Google Kubernetes Engine (GKE)
 
Airflow Clustering and High Availability
Airflow Clustering and High AvailabilityAirflow Clustering and High Availability
Airflow Clustering and High Availability
 
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
Ceph Day London 2014 - Best Practices for Ceph-powered Implementations of Sto...
 
Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?Why does my choice of storage matter with cassandra?
Why does my choice of storage matter with cassandra?
 
5 things you didn't know nginx could do
5 things you didn't know nginx could do5 things you didn't know nginx could do
5 things you didn't know nginx could do
 
Apache phoenix
Apache phoenixApache phoenix
Apache phoenix
 
Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...
Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...
Digital Security by Design: Security and Legacy at Microsoft - Matthew Parkin...
 
Dreaming Infrastructure
Dreaming InfrastructureDreaming Infrastructure
Dreaming Infrastructure
 
Building a Self-Service Big Data Pipeline
Building a Self-Service Big Data PipelineBuilding a Self-Service Big Data Pipeline
Building a Self-Service Big Data Pipeline
 
Docker Security Overview
Docker Security OverviewDocker Security Overview
Docker Security Overview
 
Google Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep diveGoogle Kubernetes Engine (GKE) deep dive
Google Kubernetes Engine (GKE) deep dive
 
Composable data for the composable enterprise
Composable data for the composable enterpriseComposable data for the composable enterprise
Composable data for the composable enterprise
 
Agility and Scalability with MongoDB
Agility and Scalability with MongoDBAgility and Scalability with MongoDB
Agility and Scalability with MongoDB
 
Royal IHC corporate presentation
Royal IHC corporate presentationRoyal IHC corporate presentation
Royal IHC corporate presentation
 
Monitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_TutorialMonitoring_with_Prometheus_Grafana_Tutorial
Monitoring_with_Prometheus_Grafana_Tutorial
 
The automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm ChartsThe automation challenge: Kubernetes Operators vs Helm Charts
The automation challenge: Kubernetes Operators vs Helm Charts
 
Benchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and ResultsBenchmarking NGINX for Accuracy and Results
Benchmarking NGINX for Accuracy and Results
 
Log management with ELK
Log management with ELKLog management with ELK
Log management with ELK
 

Similar to Google mesa

Kylin and Druid Presentation
Kylin and Druid PresentationKylin and Druid Presentation
Kylin and Druid Presentationargonauts007
 
Introduction to NoSql
Introduction to NoSqlIntroduction to NoSql
Introduction to NoSqlOmid Vahdaty
 
CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®confluent
 
Apache Hive for modern DBAs
Apache Hive for modern DBAsApache Hive for modern DBAs
Apache Hive for modern DBAsLuis Marques
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...InfluxData
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics PlatformN Masahiro
 
Change data capture
Change data captureChange data capture
Change data captureRon Barabash
 
A tour of Amazon Redshift
A tour of Amazon RedshiftA tour of Amazon Redshift
A tour of Amazon RedshiftKel Graham
 
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftBest Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftSnapLogic
 
Ledingkart Meetup #4: Data pipeline @ lk
Ledingkart Meetup #4: Data pipeline @ lkLedingkart Meetup #4: Data pipeline @ lk
Ledingkart Meetup #4: Data pipeline @ lkMukesh Singh
 
Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Ashnikbiz
 
NoSQL Solutions - a comparative study
NoSQL Solutions - a comparative studyNoSQL Solutions - a comparative study
NoSQL Solutions - a comparative studyGuillaume Lefranc
 
Azure DocumentDB Overview
Azure DocumentDB OverviewAzure DocumentDB Overview
Azure DocumentDB OverviewAndrew Liu
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesJon Meredith
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychThe Software House
 

Similar to Google mesa (20)

Kylin and Druid Presentation
Kylin and Druid PresentationKylin and Druid Presentation
Kylin and Druid Presentation
 
Presto
PrestoPresto
Presto
 
Introduction to NoSql
Introduction to NoSqlIntroduction to NoSql
Introduction to NoSql
 
CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®
 
Dwh faqs
Dwh faqsDwh faqs
Dwh faqs
 
Megastore by Google
Megastore by GoogleMegastore by Google
Megastore by Google
 
Apache Hive for modern DBAs
Apache Hive for modern DBAsApache Hive for modern DBAs
Apache Hive for modern DBAs
 
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
Wayfair Storefront Performance Monitoring with InfluxEnterprise by Richard La...
 
Technologies for Data Analytics Platform
Technologies for Data Analytics PlatformTechnologies for Data Analytics Platform
Technologies for Data Analytics Platform
 
Change data capture
Change data captureChange data capture
Change data capture
 
A tour of Amazon Redshift
A tour of Amazon RedshiftA tour of Amazon Redshift
A tour of Amazon Redshift
 
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftBest Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
 
Ledingkart Meetup #4: Data pipeline @ lk
Ledingkart Meetup #4: Data pipeline @ lkLedingkart Meetup #4: Data pipeline @ lk
Ledingkart Meetup #4: Data pipeline @ lk
 
Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus Powering GIS Application with PostgreSQL and Postgres Plus
Powering GIS Application with PostgreSQL and Postgres Plus
 
NoSQL Solutions - a comparative study
NoSQL Solutions - a comparative studyNoSQL Solutions - a comparative study
NoSQL Solutions - a comparative study
 
Azure DocumentDB Overview
Azure DocumentDB OverviewAzure DocumentDB Overview
Azure DocumentDB Overview
 
Running MySQL in AWS
Running MySQL in AWSRunning MySQL in AWS
Running MySQL in AWS
 
Front Range PHP NoSQL Databases
Front Range PHP NoSQL DatabasesFront Range PHP NoSQL Databases
Front Range PHP NoSQL Databases
 
try
trytry
try
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danych
 

Google mesa

  • 1. Google Mesa Sameer Tiwari Hadoop Architect, Pivotal Inc. stiwari@pivotal.io @sameertech Aug 12, 2014
  • 2. What is Mesa? ● Geo-Replicated, Near Real-Time, Scalable Data Warehousing for Google’s Internet Advertising Business. ● Ok so what is it really? o Its an Atomic, Consistent, Available, Near Real Time, Scalable Store
  • 3. Salient features ● DW for Ad serving at Google ● Metadata on BigTable ● Data on Colossus ● Trillions of Queries/day, Millions/second ● Support Multiple indexes ● Runs on tens of thousands machines across geos
  • 4. Data Model ● Table are specified by Table Schemas ● Table Schema by, Key and Value Space o K, V are sets o Each is represented as column tuples o Specifies an aggregation function ● Each Col stored separately ● For consistency updates are multi-versioned and batched for throughput ● Data is amenable to aggregation
  • 5. Data Model ● Pre-aggregates data into Deltas (no repeated row keys/delta) and applies a version ● Compaction is multi-level ● A Controller handles updates/ maintenance, works with BigTable
  • 6. Controller ● 4 sub-systems o Updates o Compaction o Checksum o Schema change ● Does not do any work, only schedules it
  • 7. Storage and Indexes - AO, log structured, read-only - Rows organized as compressed row-blocks - Indexes have starting entry of the row-block - Naive lookup - Binary Search on index to find row- blocks - Binary Search on the row-blocks
  • 8. Query sub system ● Limited Query engine with Filtering/Predicate ● Used by higher level systems Dremel/MySQL ● Has multiple stateless Query Servers ● Works on both the BigTable and Colossus ● Provides nice sharding and LB mechanism ● Groups similar queries to a subset of Servers
  • 9. Multi Datacenter Deployment ● Tables are multi-versioned o (Serve old data while new is in-progress) ● Committer is stateless and sends updates to multiple Datacenters o Built on top of versionsDB. - Globally replicated and consistent store build on top of distributed Paxos. ● Data goes async across Mesa instances ● Only Metadata is sync-repl using Paxos- versionsDB
  • 10. Optimizations ● Delta pruning - similar to Filter pushdown ● Resume-Key, Key per data block o Data is returned a block at a time, so if a QueryServer dies, another one can pick it up. ● Parallelizing workloads: Uses MR to shard o While writing delta, Mesa sample row-keys which is used to figure out the right number of Mappers/Reducers. o The workers are the same 4 workers scheduled by the Controller
  • 11. Optimizations ● Schema changes - two techniques o Create, Copy, Replay and delete - Expensive o Link and add default values - This is used in Mesa ● New Instances of Mesa use P2P mechanisms to come up and online.
  • 12. Handling Data Corruption ● Mesa runs on ~50K boxes ● Online - During updates. o Fact: Each Mesa instance is logically same but physically may differ in deltas o Check chksums of indexes/data o Row-order, key-range, aggregate values should be same, across instances ● Offline o Run global chksums of all indexes