SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Introduction to Presto on
Docker at scale
2020
Federico Palladoro
About Me
Fede Palladoro
Devops & Data Infra Lead @ Jampp
@fedepalladoro
fede@jampp.com
● Intro to Jampp data stack
● Previous Presto setup on EMR
● Migration to containers
● Orchestrators: Nomad vs Kubernetes
● Presto monitoring
Agenda
What do we do at
Jampp?
#1 #2
User
Acquisition
Find more people to install
and use an app.
App
Retargeting
Re-engage existing users.
Real time bidding (RTB)
Ad exchange
ad spot available
impression
< 70ms
Max Latency
Win!
bid
Participant 1
Participant N
.
.
.
auction
Auction Bid Impression Click
Install /
Event
Ad-Tech funnel
■ Each step decreases volume by an order of magnitude
■ The data criticality increases with each step.
■ We can sample auctions to optimize costs but under no circumstances can we lose
clicks, installs or events.
■ Each table has different access patterns and needs a different partitioning scheme.
+1000/h
Presto Queries
1,8TB-6TB
Total cluster memory
150TB
Data processed by
ELBs per day
1M/s
Auctions received
+1.7 billion
Tracked events per day
3
Presto Clusters
Some numbers
An overview of our
Data Infrastructure
Our pipeline operational unit
■ One pipeline per event type.
■ Focused on modularity and separation of concerns.
■ Having them separated allows us to optimize for cost without fear of losing critical
messages.
Internal
Data Source
ETLs and data insertion
■ Spark and Hive are very reliable for ETLs and insertion.
■ We use the Hive Metastore as the main interface between engines.
■ Airflow is an amazing tool for scheduling and orchestration.
■ Storing data on S3 allows us to decouple compute from storage
Presto is the main interface with our Data Warehouse
Through the years it became the main method of
interacting with the Data Warehouse for every team in
the company.
● Feeding our Machine Learning algorithms
● Building automatic audience segments
● Ad-Hoc queries through Apache Superset
● Templated reports through a custom UI
● Monitoring data quality
Presto
AWS EMR clusters
■ 1 ETL cluster (Spark/Hive/Tez)
■ 2 or 3 Presto clusters
■ Data stored on S3, we don’t use
HDFS
■ Each cluster is auto scalable
depending the load
■ Shared EMRFS on DynamoDB table
■ Shared Hive Metastore on RDS
The bad
● Troublesome interaction between YARN (Hive, Spark) and non YARN
apps (Presto).
● Low update frequency for fast pacing applications.
● Limited Presto support (i.e: no monitoring, no autoscaling on fleets)
The good
● Provisions out of the box many popular Big Data tools.
● Flexibility to tune applications and shape clusters as needed.
● Mainstream applications are frequently added to the app catalog, like
PrestoSQL v338!
AWS Elastic
MapReduce The ugly
● They upgraded the OS to Amazon Linux 2 without EMR version change
Getting down to business
Moving Presto to
containers
What?
Why?
● Why self-managed and Docker?
○ Lower costs (no EMR fees, no cluster overhead)
○ Quicker version upgrades
○ Local/ci environments just like prod/stg
○ Simpler configuration management
● Why PrestoSQL?
○ Community and user focused
○ Growing at a faster pace, more active contributors
○ Some known bugs already fixed (like hive bucketed tables)
○ Improved features like Cost Based Optimizer (CBO) and Security
● We decided to do two mayor changes:
○ Switch from PrestoDB to PrestoSQL
○ Take ownership of cluster provisioning and maintenance
Building our
docker image
● Based on the offical PrestoSQL image
● Dynamic configuration
○ Presto config and catalog files with templated values
○ Parameters and secrets stored on AWS SSM Parameter
store
○ Segmentio’s chamber to load parameters as env vars on
runtime
○ Unix’s envsubs to render final config files
● Additional tools like java agent for monitoring
Dynamic
configuration
Orchestrator
candidates
● The Tao of HashiCorp
● Orchestration with low complexity
● Support for non-container workloads
● Limited community - less known
● We already have it running
● Great community and tool ecosystem
● Industry-standard solution and battle tested
● High complexity, lot of internal “moving parts”
● Simple to spin-up using EKS/GKE/AKS
Presto setup on Nomad:
Infra level
■ Elastic autoscaling group
for each component
■ Consul: Service discovery
+ Distributed KV
■ Control plane with Consul
& Nomad
■ Traefik as API Gateway /
HTTP Proxy
Presto setup
on Nomad:
App level
Extra
Features
● Nomad job templating with Hashicorp Levant
○ Terraform-like workflow using a single template and a variable
file per cluster/environment
● Autoscaling:
○ Application level: Nomad native support (CPU based)
○ Cluster level: Nomad official autoscaler agent
● Graceful scale-in of Presto workers
○ Autoscaling group hooks
○ Local node script
○ Put new status on presto node state endpoint /v1/info/state
Local
testing
Kubernetes
Operators
● Custom resource that extends k8s API
● Useful to ease maintenance on staful/complex workloads (a.k.a
Day 2)
● Presto operators:
○ Falarica’s presto operator (open source, just released)
○ Starburst presto operator (official, licenced/enterprise)
Helm charts
● Reusable templates of YAML artifacts
● Reduce duplicated code on multi-cluster environments
● Useful for resource creation/deployment (a.k.a Day 1)
● Presto on Helm:
○ PrestoSQL helm chart (non-official, open source)
○ Starburst helm chart (official, licenced/enterprise)
Kubernetes
on AWS EKS
Presto on
Kubernetes
operator
Presto on
Kubernetes
operator
Monitoring stack
● We expose low level metrics with JMX java agent for Prometheus.
● Developed a custom exporter to get user level usage metrics from
/v1/query endpoint
● Prometheus stack collects mbeans attributes.
● Grafana for dashboards and custom searches.
HTTP
Scraper
Low level (JMX)
● Memory pools, Heap usage.
● Garbage collection frequency and duration.
● Cluster size and nodes status.
● Active, Pending and Blocked queries.
User level (HTTP API)
● Finished, canceled and failed queries per user.
● Normalized query analytics to detect usage patterns.
Monitoring
relevant
metrics
● Leverage CBO to improve query performance.
● Evaluate the usage of a Presto gateway to manage query
routing to multiple clusters.
● Enable autoscaling from Prometheus metrics.
● Define SLI’s and SLO’s to measure reliability.
● Evaluate Presto on k8s + AWS Fargate (serverless containers)
Next
steps
● Segment.io chamber: https://github.com/segmentio/chamber
● The Tao of Hashicorp: https://www.hashicorp.com/tao-of-hashicorp
● Nomad tutorial: https://learn.hashicorp.com/tutorials/nomad/get-started-install
● PrestoSQL helm chart: https://hub.helm.sh/charts/stable/presto/0.2.1
● Starburst helm chart: https://docs.starburstdata.com/latest/k8s/overview.html
● Falarica’s presto operator: https://github.com/falarica/steerd-presto-operator
● Starburst presto operator:
https://docs.starburstdata.com/latest/kubernetes/overview.html
● AWS EKS Architecture:
https://aws.amazon.com/quickstart/architecture/amazon-eks/
Link
references
Thanks!!
fede@jampp.com
We are hiring!!
jampp.com/jobs
@fedepalladoro

Mais conteúdo relacionado

Mais procurados

Distributed Kafka Architecture Taboola Scale
Distributed Kafka Architecture Taboola ScaleDistributed Kafka Architecture Taboola Scale
Distributed Kafka Architecture Taboola ScaleApache Kafka TLV
 
uReplicator: Uber Engineering’s Scalable, Robust Kafka Replicator
uReplicator: Uber Engineering’s Scalable,  Robust Kafka ReplicatoruReplicator: Uber Engineering’s Scalable,  Robust Kafka Replicator
uReplicator: Uber Engineering’s Scalable, Robust Kafka ReplicatorMichael Hongliang Xu
 
Easily Build a Smart Pulsar Stream Processor_Simon Crosby
Easily Build a Smart Pulsar Stream Processor_Simon CrosbyEasily Build a Smart Pulsar Stream Processor_Simon Crosby
Easily Build a Smart Pulsar Stream Processor_Simon CrosbyStreamNative
 
Flink forward-2017-netflix keystones-paas
Flink forward-2017-netflix keystones-paasFlink forward-2017-netflix keystones-paas
Flink forward-2017-netflix keystones-paasMonal Daxini
 
Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...
Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...
Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...HostedbyConfluent
 
Data pipeline with kafka
Data pipeline with kafkaData pipeline with kafka
Data pipeline with kafkaMole Wong
 
Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015Monal Daxini
 
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/Sec
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/SecNetflix Keystone - How Netflix Handles Data Streams up to 11M Events/Sec
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/SecPeter Bakas
 
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...Paul Brebner
 
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at UberDisaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at Uberconfluent
 
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015Monal Daxini
 
Netflix Keystone—Cloud scale event processing pipeline
Netflix Keystone—Cloud scale event processing pipelineNetflix Keystone—Cloud scale event processing pipeline
Netflix Keystone—Cloud scale event processing pipelineMonal Daxini
 
Scalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERScalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERShuyi Chen
 
Building real time Data Pipeline using Spark Streaming
Building real time Data Pipeline using Spark StreamingBuilding real time Data Pipeline using Spark Streaming
Building real time Data Pipeline using Spark Streamingdatamantra
 
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
Hadoop summit - Scaling Uber’s Real-Time Infra for  Trillion Events per DayHadoop summit - Scaling Uber’s Real-Time Infra for  Trillion Events per Day
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per DayAnkur Bansal
 
Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014Monal Daxini
 
From a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised LandFrom a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised LandRan Silberman
 
The Netflix Way to deal with Big Data Problems
The Netflix Way to deal with Big Data ProblemsThe Netflix Way to deal with Big Data Problems
The Netflix Way to deal with Big Data ProblemsMonal Daxini
 
Introduction to Streaming Distributed Processing with Storm
Introduction to Streaming Distributed Processing with StormIntroduction to Streaming Distributed Processing with Storm
Introduction to Streaming Distributed Processing with StormBrandon O'Brien
 

Mais procurados (20)

Distributed Kafka Architecture Taboola Scale
Distributed Kafka Architecture Taboola ScaleDistributed Kafka Architecture Taboola Scale
Distributed Kafka Architecture Taboola Scale
 
uReplicator: Uber Engineering’s Scalable, Robust Kafka Replicator
uReplicator: Uber Engineering’s Scalable,  Robust Kafka ReplicatoruReplicator: Uber Engineering’s Scalable,  Robust Kafka Replicator
uReplicator: Uber Engineering’s Scalable, Robust Kafka Replicator
 
Easily Build a Smart Pulsar Stream Processor_Simon Crosby
Easily Build a Smart Pulsar Stream Processor_Simon CrosbyEasily Build a Smart Pulsar Stream Processor_Simon Crosby
Easily Build a Smart Pulsar Stream Processor_Simon Crosby
 
Flink forward-2017-netflix keystones-paas
Flink forward-2017-netflix keystones-paasFlink forward-2017-netflix keystones-paas
Flink forward-2017-netflix keystones-paas
 
Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...
Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...
Use ksqlDB to migrate core-banking processing from batch to streaming | Mark ...
 
Data pipeline with kafka
Data pipeline with kafkaData pipeline with kafka
Data pipeline with kafka
 
Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015Netflix Keystone Pipeline at Samza Meetup 10-13-2015
Netflix Keystone Pipeline at Samza Meetup 10-13-2015
 
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/Sec
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/SecNetflix Keystone - How Netflix Handles Data Streams up to 11M Events/Sec
Netflix Keystone - How Netflix Handles Data Streams up to 11M Events/Sec
 
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...ApacheCon2019 Talk: Kafka, Cassandra and Kubernetesat Scale – Real-time Ano...
ApacheCon2019 Talk: Kafka, Cassandra and Kubernetes at Scale – Real-time Ano...
 
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at UberDisaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
Disaster Recovery for Multi-Region Apache Kafka Ecosystems at Uber
 
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015
Netflix Keystone Pipeline at Big Data Bootcamp, Santa Clara, Nov 2015
 
Netflix Keystone—Cloud scale event processing pipeline
Netflix Keystone—Cloud scale event processing pipelineNetflix Keystone—Cloud scale event processing pipeline
Netflix Keystone—Cloud scale event processing pipeline
 
Scalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBERScalable complex event processing on samza @UBER
Scalable complex event processing on samza @UBER
 
Building real time Data Pipeline using Spark Streaming
Building real time Data Pipeline using Spark StreamingBuilding real time Data Pipeline using Spark Streaming
Building real time Data Pipeline using Spark Streaming
 
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
Hadoop summit - Scaling Uber’s Real-Time Infra for  Trillion Events per DayHadoop summit - Scaling Uber’s Real-Time Infra for  Trillion Events per Day
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
 
Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014Netflix at-disney-09-26-2014
Netflix at-disney-09-26-2014
 
From a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised LandFrom a kafkaesque story to The Promised Land
From a kafkaesque story to The Promised Land
 
Apache Kafka Streams
Apache Kafka StreamsApache Kafka Streams
Apache Kafka Streams
 
The Netflix Way to deal with Big Data Problems
The Netflix Way to deal with Big Data ProblemsThe Netflix Way to deal with Big Data Problems
The Netflix Way to deal with Big Data Problems
 
Introduction to Streaming Distributed Processing with Storm
Introduction to Streaming Distributed Processing with StormIntroduction to Streaming Distributed Processing with Storm
Introduction to Streaming Distributed Processing with Storm
 

Semelhante a Big data Argentina meetup 2020-09: Intro to presto on docker

Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2aspyker
 
Netflix Data Pipeline With Kafka
Netflix Data Pipeline With KafkaNetflix Data Pipeline With Kafka
Netflix Data Pipeline With KafkaSteven Wu
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...javier ramirez
 
Processing 19 billion messages in real time and NOT dying in the process
Processing 19 billion messages in real time and NOT dying in the processProcessing 19 billion messages in real time and NOT dying in the process
Processing 19 billion messages in real time and NOT dying in the processJampp
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned Omid Vahdaty
 
Netflix keystone streaming data pipeline @scale in the cloud-dbtb-2016
Netflix keystone   streaming data pipeline @scale in the cloud-dbtb-2016Netflix keystone   streaming data pipeline @scale in the cloud-dbtb-2016
Netflix keystone streaming data pipeline @scale in the cloud-dbtb-2016Monal Daxini
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthNicolas Brousse
 
Building a real-time, scalable and intelligent programmatic ad buying platform
Building a real-time, scalable and intelligent programmatic ad buying platformBuilding a real-time, scalable and intelligent programmatic ad buying platform
Building a real-time, scalable and intelligent programmatic ad buying platformJampp
 
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...Rob Skillington
 
Amazon aws big data demystified | Introduction to streaming and messaging flu...
Amazon aws big data demystified | Introduction to streaming and messaging flu...Amazon aws big data demystified | Introduction to streaming and messaging flu...
Amazon aws big data demystified | Introduction to streaming and messaging flu...Omid Vahdaty
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...GetInData
 
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...NETWAYS
 
Public Cloud Workshop
Public Cloud WorkshopPublic Cloud Workshop
Public Cloud WorkshopAmer Ather
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesAlexander Penev
 
How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...
How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...
How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...Amazon Web Services
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uberconfluent
 
Building Analytic Apps for SaaS: “Analytics as a Service”
Building Analytic Apps for SaaS: “Analytics as a Service”Building Analytic Apps for SaaS: “Analytics as a Service”
Building Analytic Apps for SaaS: “Analytics as a Service”Amazon Web Services
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015aspyker
 

Semelhante a Big data Argentina meetup 2020-09: Intro to presto on docker (20)

Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
Netflix Data Pipeline With Kafka
Netflix Data Pipeline With KafkaNetflix Data Pipeline With Kafka
Netflix Data Pipeline With Kafka
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
Processing 19 billion messages in real time and NOT dying in the process
Processing 19 billion messages in real time and NOT dying in the processProcessing 19 billion messages in real time and NOT dying in the process
Processing 19 billion messages in real time and NOT dying in the process
 
Presto
PrestoPresto
Presto
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Netflix keystone streaming data pipeline @scale in the cloud-dbtb-2016
Netflix keystone   streaming data pipeline @scale in the cloud-dbtb-2016Netflix keystone   streaming data pipeline @scale in the cloud-dbtb-2016
Netflix keystone streaming data pipeline @scale in the cloud-dbtb-2016
 
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a MonthUSENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
USENIX LISA15: How TubeMogul Handles over One Trillion HTTP Requests a Month
 
Building a real-time, scalable and intelligent programmatic ad buying platform
Building a real-time, scalable and intelligent programmatic ad buying platformBuilding a real-time, scalable and intelligent programmatic ad buying platform
Building a real-time, scalable and intelligent programmatic ad buying platform
 
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
 
Amazon aws big data demystified | Introduction to streaming and messaging flu...
Amazon aws big data demystified | Introduction to streaming and messaging flu...Amazon aws big data demystified | Introduction to streaming and messaging flu...
Amazon aws big data demystified | Introduction to streaming and messaging flu...
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
 
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced ...
 
Public Cloud Workshop
Public Cloud WorkshopPublic Cloud Workshop
Public Cloud Workshop
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
 
How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...
How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...
How Netflix Uses Amazon Kinesis Streams to Monitor and Optimize Large-scale N...
 
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ UberKafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
Kafka Summit NYC 2017 - Scalable Real-Time Complex Event Processing @ Uber
 
Building Analytic Apps for SaaS: “Analytics as a Service”
Building Analytic Apps for SaaS: “Analytics as a Service”Building Analytic Apps for SaaS: “Analytics as a Service”
Building Analytic Apps for SaaS: “Analytics as a Service”
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015
 

Último

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 

Último (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Big data Argentina meetup 2020-09: Intro to presto on docker

  • 1. Introduction to Presto on Docker at scale 2020 Federico Palladoro
  • 2. About Me Fede Palladoro Devops & Data Infra Lead @ Jampp @fedepalladoro fede@jampp.com
  • 3. ● Intro to Jampp data stack ● Previous Presto setup on EMR ● Migration to containers ● Orchestrators: Nomad vs Kubernetes ● Presto monitoring Agenda
  • 4. What do we do at Jampp?
  • 5. #1 #2 User Acquisition Find more people to install and use an app. App Retargeting Re-engage existing users.
  • 6. Real time bidding (RTB) Ad exchange ad spot available impression < 70ms Max Latency Win! bid Participant 1 Participant N . . . auction
  • 7. Auction Bid Impression Click Install / Event Ad-Tech funnel ■ Each step decreases volume by an order of magnitude ■ The data criticality increases with each step. ■ We can sample auctions to optimize costs but under no circumstances can we lose clicks, installs or events. ■ Each table has different access patterns and needs a different partitioning scheme.
  • 8. +1000/h Presto Queries 1,8TB-6TB Total cluster memory 150TB Data processed by ELBs per day 1M/s Auctions received +1.7 billion Tracked events per day 3 Presto Clusters Some numbers
  • 9. An overview of our Data Infrastructure
  • 10. Our pipeline operational unit ■ One pipeline per event type. ■ Focused on modularity and separation of concerns. ■ Having them separated allows us to optimize for cost without fear of losing critical messages. Internal Data Source
  • 11. ETLs and data insertion ■ Spark and Hive are very reliable for ETLs and insertion. ■ We use the Hive Metastore as the main interface between engines. ■ Airflow is an amazing tool for scheduling and orchestration. ■ Storing data on S3 allows us to decouple compute from storage
  • 12. Presto is the main interface with our Data Warehouse Through the years it became the main method of interacting with the Data Warehouse for every team in the company. ● Feeding our Machine Learning algorithms ● Building automatic audience segments ● Ad-Hoc queries through Apache Superset ● Templated reports through a custom UI ● Monitoring data quality Presto
  • 13. AWS EMR clusters ■ 1 ETL cluster (Spark/Hive/Tez) ■ 2 or 3 Presto clusters ■ Data stored on S3, we don’t use HDFS ■ Each cluster is auto scalable depending the load ■ Shared EMRFS on DynamoDB table ■ Shared Hive Metastore on RDS
  • 14. The bad ● Troublesome interaction between YARN (Hive, Spark) and non YARN apps (Presto). ● Low update frequency for fast pacing applications. ● Limited Presto support (i.e: no monitoring, no autoscaling on fleets) The good ● Provisions out of the box many popular Big Data tools. ● Flexibility to tune applications and shape clusters as needed. ● Mainstream applications are frequently added to the app catalog, like PrestoSQL v338! AWS Elastic MapReduce The ugly ● They upgraded the OS to Amazon Linux 2 without EMR version change
  • 15. Getting down to business Moving Presto to containers
  • 16. What? Why? ● Why self-managed and Docker? ○ Lower costs (no EMR fees, no cluster overhead) ○ Quicker version upgrades ○ Local/ci environments just like prod/stg ○ Simpler configuration management ● Why PrestoSQL? ○ Community and user focused ○ Growing at a faster pace, more active contributors ○ Some known bugs already fixed (like hive bucketed tables) ○ Improved features like Cost Based Optimizer (CBO) and Security ● We decided to do two mayor changes: ○ Switch from PrestoDB to PrestoSQL ○ Take ownership of cluster provisioning and maintenance
  • 17. Building our docker image ● Based on the offical PrestoSQL image ● Dynamic configuration ○ Presto config and catalog files with templated values ○ Parameters and secrets stored on AWS SSM Parameter store ○ Segmentio’s chamber to load parameters as env vars on runtime ○ Unix’s envsubs to render final config files ● Additional tools like java agent for monitoring
  • 19. Orchestrator candidates ● The Tao of HashiCorp ● Orchestration with low complexity ● Support for non-container workloads ● Limited community - less known ● We already have it running ● Great community and tool ecosystem ● Industry-standard solution and battle tested ● High complexity, lot of internal “moving parts” ● Simple to spin-up using EKS/GKE/AKS
  • 20. Presto setup on Nomad: Infra level ■ Elastic autoscaling group for each component ■ Consul: Service discovery + Distributed KV ■ Control plane with Consul & Nomad ■ Traefik as API Gateway / HTTP Proxy
  • 22. Extra Features ● Nomad job templating with Hashicorp Levant ○ Terraform-like workflow using a single template and a variable file per cluster/environment ● Autoscaling: ○ Application level: Nomad native support (CPU based) ○ Cluster level: Nomad official autoscaler agent ● Graceful scale-in of Presto workers ○ Autoscaling group hooks ○ Local node script ○ Put new status on presto node state endpoint /v1/info/state
  • 24. Kubernetes Operators ● Custom resource that extends k8s API ● Useful to ease maintenance on staful/complex workloads (a.k.a Day 2) ● Presto operators: ○ Falarica’s presto operator (open source, just released) ○ Starburst presto operator (official, licenced/enterprise) Helm charts ● Reusable templates of YAML artifacts ● Reduce duplicated code on multi-cluster environments ● Useful for resource creation/deployment (a.k.a Day 1) ● Presto on Helm: ○ PrestoSQL helm chart (non-official, open source) ○ Starburst helm chart (official, licenced/enterprise)
  • 28. Monitoring stack ● We expose low level metrics with JMX java agent for Prometheus. ● Developed a custom exporter to get user level usage metrics from /v1/query endpoint ● Prometheus stack collects mbeans attributes. ● Grafana for dashboards and custom searches. HTTP Scraper
  • 29. Low level (JMX) ● Memory pools, Heap usage. ● Garbage collection frequency and duration. ● Cluster size and nodes status. ● Active, Pending and Blocked queries. User level (HTTP API) ● Finished, canceled and failed queries per user. ● Normalized query analytics to detect usage patterns. Monitoring relevant metrics
  • 30. ● Leverage CBO to improve query performance. ● Evaluate the usage of a Presto gateway to manage query routing to multiple clusters. ● Enable autoscaling from Prometheus metrics. ● Define SLI’s and SLO’s to measure reliability. ● Evaluate Presto on k8s + AWS Fargate (serverless containers) Next steps
  • 31. ● Segment.io chamber: https://github.com/segmentio/chamber ● The Tao of Hashicorp: https://www.hashicorp.com/tao-of-hashicorp ● Nomad tutorial: https://learn.hashicorp.com/tutorials/nomad/get-started-install ● PrestoSQL helm chart: https://hub.helm.sh/charts/stable/presto/0.2.1 ● Starburst helm chart: https://docs.starburstdata.com/latest/k8s/overview.html ● Falarica’s presto operator: https://github.com/falarica/steerd-presto-operator ● Starburst presto operator: https://docs.starburstdata.com/latest/kubernetes/overview.html ● AWS EKS Architecture: https://aws.amazon.com/quickstart/architecture/amazon-eks/ Link references