SlideShare a Scribd company logo
WIFI SSID:SparkAISummit | Password: UnifiedAnalytics
Li Gao, Lyft
Rohit Menon, Lyft
Scaling Spark on
Kubernetes
#UnifiedAnalytics #SparkAISummit
Introduction
3#UnifiedAnalytics #SparkAISummit
Li Gao
Works in the Data Platform team at Lyft, currently leading the Compute Infra
initiatives including Spark on Kubernetes.
Previously at Salesforce, Fitbit, Groupon, and other startups.
Rohit Menon
Rohit Menon is a Software Engineer on the Data Platform team at Lyft. Rohit's
primary area of focus is building and scaling out the Spark and Hive Infrastructure
for ETL and Machine learning use cases.
Previously at EA, VMWare
Agenda
4#UnifiedAnalytics #SparkAISummit
● Introduction of Data Landscape at Lyft
● The challenges we face
● How Apache Spark on Kubernetes can help
● Remaining work
Data Landscape
5#UnifiedAnalytics #SparkAISummit
● Batch data Ingestion and ETL
● Data Streaming
● ML platforms
● Notebooks and BI tools
● Query and Visualization
● Operational Analytics
● Data Discovery & Lineage
● Workflow orchestration
● Cloud Platforms
Evolving Batch Architecture
6
Future2016-2017
Vendor-based
Hadoop
2017-2018
Hive on MR
Vendor Presto
Mid 2018
Hive on Tez +
Spark Adhoc
Late 2018
Spark on
Vendor GA
Early 2019
Spark on K8s
Alpha
Spark on K8s
Beta
Batch
Compute
Clusters
What batch compute is used for
7
Events
Ext Data
RDB/KV
Sys Events
IngestPipelines
AWSS3
AWSS3
HMS
Presto,HiveClient,andBITools
Analysts
Engineers
Scientists
Services
Initial Batch Architecture
8
Batch Compute Challenges
9
● 3rd Party vendor dependency limitations
● Data ETL expressed solely in SQL
● Complex logic expressed in Python that hard to adopt
in SQL
● Different dependencies and versions
● Resource load balancing for heterogeneous workloads
3rd Party Vendor Limitations
10
● Proprietary patches
● Inconsistent bootstrap
● Release schedule
● Homogeneous environments
Is SQL the complete solution?
11
What about Python functions?
12
“I want to express my processing logic in python functions
with external geo libraries (i.e. Geomesa) and interact with
Hive tables” --- Lyft data engineer
How Spark can help?
13
RDB/KV
Applications
APIs
Environments
Data Sources
and Data
Sinks
What challenges remain?
14
● Per job custom dependencies
● Handling version requirements (Py3 v.s. Py2)
● Still need to run on shared clusters for cost efficiency
What about dependencies?
15
RTree Libraries
Data CodecsSpatial Libraries
Different Spark or Hive versions?
● Legacy jobs that require Spark 2.2
● Newer Jobs require Spark 2.3 or Spark 2.4
● Hive 2.1 SQL and Hive 2.3
16
How Kubernetes can help?
17
Operators &
Controllers
Pods Ingress Services
Namespaces
Pods
Immutability
Event driven &
Declarative
Community + CNCF
ServiceMesh
Multi-TenancySupport
CNCF Landscape
18
What challenges still remain?
● Spark on k8s is still in its early days
● Single cluster scaling limit
● CRD and control plane update
● Pod churn and IP allocations throttling
● ECR container registry reliability
19
Current scale
20
● 10s PB data lake
● (O) 100k batch jobs running daily
● ~ 1000s of EC2 nodes spanning multiple
clusters and AZs
● ~ 1000s of workflows running daily
How Lyft scales Spark on K8s
21
# of Clusters # of Namespaces
# of Pods
Pod Churn Rate
# of Nodes
Pod Size
Job:Pod ratio IP Alloc Rate Limit
ECR Rate Limit
Affinity & Isolation
QoS & Quota
The Evolving Architecture
22
Multiple Clusters
23
HA in Cluster Pool
24
Cluster 1
Cluster 2
Cluster 3
Cluster Pool A
Cluster 4
● Cluster rotation within a cluster pool
● Automated provisioning of a new cluster and (manually) add into rotation
● Throttle at lower bound when rotation in progress
Multiple Namespaces (Groups)
25
Pod Pod Pod
Namespace 1
Pod Pod Pod
Namespace 2
Pod Pod Pod
Namespace 3
Node A Node B Node C Node D
Role1 Role1 Role2
Max Pod Size 1 Max Pod Size 2
● Practical ~3K active pods per namespace observed
● Less preemption required when namespace isolated by quota
● Different namespaces can map different IAM roles and sidecar
configurations
Pod Sharing
26
Job
Controller Spark Driver
Pod
Spark Exec
Pods
Job 2 Driver
Pod
Job 2 Exec
Pods
Job 3 Driver
Pod
Job 3 Exec
Pods
Shared Pods
Job 1
Job 4
Job 3
Job 2
AWS
S3
Dep
Dep
Dedicate & Isolated Pods
Dep
Separate DML from DDL
27
DDL Separation to reduce churn
28
Pod Priority and Preemption (WIP)
29
● Priority base
preemption
● Driver pod has higher
priority than executor
pod
● Experimental
D1 D2 E1 E2 E3 E4
K8s Scheduler
D1
E5
New Pod Req
Before
D2 E5 E2 E3 E4
After
E1
Evictedhttps://github.com/kubernetes/kubernetes/issues/71486
https://github.com/kubernetes/enhancements/issues/564
Taints and Tolerations (WIP)
30
Node A Node B Node C Node D Node E Node F
P1 P2 P3 P4 P5 P6 P7 P7 P8 P9 P10
Controllers and Watchers Job 1 Job 2
Core Nodes (Taint) Worker Nodes (Taint)
● Other considerations: Node Labels, Node Selectors to separate GPU and CPU based
workloads
What about ECR reliability?
31
Node 1 Node 2 Node 3
Pods Pods Pods
DaemonSet + Docker In Docker
ECR Container Images
Spark Job Config Overlays (DML)
32
Cluster Pool Defaults
Cluster Defaults
Spark Job User Specified Config
Cluster and Namespace Overrides
Final Spark Job Config
Config
Composer
&
Event
Watcher
Spark
Operator
X-Ray of Job Controller
33
Controllers & Watchers
• Job router + scheduler
• Namespace group controller
• Config composer
• Service controllers (STS, Jupyter/Zeppelin)
• K8s metrics & events watchers
• Spark job/crd events & metrics watchers
34
X-Ray of Spark Operator
35
Monitoring and Logging Toolbox
36
HEKA
JMX
Monitoring Example - OOM Kill
37
Provision & Automation
38
Kustomize Template
K8S Deploy
Sidecar injectors
Secrets injectors
DaemonSets
KIAM
Remaining work
● More intelligent & resilient job routing/scheduler and
parameter setting
● Serverless and self-serviceable user experiences for
any-to-any batch data compute
● Finer grained cost attribution
● Improved docker image distribution
● Spark 3.0 & Kubernetes v1.14+
39
Key Takeaways
● Apache Spark can help unify different batch data compute
use cases
● Kubernetes can help solve the dependency and multi-version
requirements using its containerized approach
● Spark on Kubernetes can scale significantly by using a
multi-cluster compute mesh approach with proper resource
isolation and scheduling techniques
● Challenges remain when running Spark on Kubernetes at
scale
40
Community
41
This effort would not be possible
without the help from the open
source and wider communities:
Q&A
42
Li Gao in/ligao101
Rohit Menon @_rohitmenon
DON’T FORGET TO RATE
AND REVIEW THE SESSIONS
SEARCH SPARK + AI SUMMIT

More Related Content

PPTX
Hive, Presto, and Spark on TPC-DS benchmark
PDF
Hybrid Apache Spark Architecture with YARN and Kubernetes
PPTX
Reusable, composable, battle-tested Terraform modules
PDF
RWDG Webinar: Data Steward Definition and Other Data Governance Roles
PDF
Power BI Architecture
PPTX
Turning Data into Business Value with a Modern Data Platform
PDF
Democratizing Data Quality Through a Centralized Platform
PDF
Active Governance Across the Delta Lake with Alation
Hive, Presto, and Spark on TPC-DS benchmark
Hybrid Apache Spark Architecture with YARN and Kubernetes
Reusable, composable, battle-tested Terraform modules
RWDG Webinar: Data Steward Definition and Other Data Governance Roles
Power BI Architecture
Turning Data into Business Value with a Modern Data Platform
Democratizing Data Quality Through a Centralized Platform
Active Governance Across the Delta Lake with Alation

What's hot (20)

PDF
Data Warehouse or Data Lake, Which Do I Choose?
PDF
"Building Data Warehouse with Google Cloud Platform", Artem Nikulchenko
PDF
Modernizing to a Cloud Data Architecture
PDF
Data Mesh Part 4 Monolith to Mesh
PDF
Apache Druid®: A Dance of Distributed Processes
PDF
How Digital 2.0 Is Driving Banking’s Next Wave of Change
PPTX
Retail Reference Architecture Part 1: Flexible, Searchable, Low-Latency Produ...
PPTX
An Introduction to Confluent Cloud: Apache Kafka as a Service
PDF
Apache Spark At Scale in the Cloud
PDF
RWDG: Measuring Data Governance Performance
PDF
GDG Cloud Southlake #16: Priyanka Vergadia: Scalable Data Analytics in Google...
PPTX
Visual Data Vault
PDF
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LME
PDF
Weaviate and Pinecone Comparison.pdf
PPT
Data migration
PDF
Building Lakehouses on Delta Lake with SQL Analytics Primer
PPTX
The Top 5 Apache Kafka Use Cases and Architectures in 2022
PDF
CDC patterns in Apache Kafka®
PDF
Microservices Patterns with GoldenGate
PDF
Data Architecture Strategies: The Rise of the Graph Database
Data Warehouse or Data Lake, Which Do I Choose?
"Building Data Warehouse with Google Cloud Platform", Artem Nikulchenko
Modernizing to a Cloud Data Architecture
Data Mesh Part 4 Monolith to Mesh
Apache Druid®: A Dance of Distributed Processes
How Digital 2.0 Is Driving Banking’s Next Wave of Change
Retail Reference Architecture Part 1: Flexible, Searchable, Low-Latency Produ...
An Introduction to Confluent Cloud: Apache Kafka as a Service
Apache Spark At Scale in the Cloud
RWDG: Measuring Data Governance Performance
GDG Cloud Southlake #16: Priyanka Vergadia: Scalable Data Analytics in Google...
Visual Data Vault
Set your Data in Motion with Confluent & Apache Kafka Tech Talk Series LME
Weaviate and Pinecone Comparison.pdf
Data migration
Building Lakehouses on Delta Lake with SQL Analytics Primer
The Top 5 Apache Kafka Use Cases and Architectures in 2022
CDC patterns in Apache Kafka®
Microservices Patterns with GoldenGate
Data Architecture Strategies: The Rise of the Graph Database
Ad

Similar to Scaling Apache Spark on Kubernetes at Lyft (20)

PDF
Scaling spark on kubernetes at Lyft
PPTX
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
PDF
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
PDF
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
PDF
Reliable Performance at Scale with Apache Spark on Kubernetes
PDF
Enabling Multi-access Edge Computing (MEC) Platform-as-a-Service for Enterprises
PDF
Bandwidth: Use Cases for Elastic Cloud on Kubernetes
PDF
PySpark on Kubernetes @ Python Barcelona March Meetup
PDF
LCU14 310- Cisco ODP v2
PDF
Apache spark 2.4 and beyond
PDF
GPU enablement for data science on OpenShift | DevNation Tech Talk
PPTX
Seattle Spark Meetup Mobius CSharp API
PPTX
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
PDF
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
PDF
Spark day 2017 - Spark on Kubernetes
PDF
Sparking up Data Engineering: Spark Summit East talk by Rohan Sharma
PDF
KubeCon London 2016 Ronana Cloud Native SDN
PPTX
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
PDF
Scalable Clusters On Demand
PDF
Track A-2 基於 Spark 的數據分析
Scaling spark on kubernetes at Lyft
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
Reliable Performance at Scale with Apache Spark on Kubernetes
Enabling Multi-access Edge Computing (MEC) Platform-as-a-Service for Enterprises
Bandwidth: Use Cases for Elastic Cloud on Kubernetes
PySpark on Kubernetes @ Python Barcelona March Meetup
LCU14 310- Cisco ODP v2
Apache spark 2.4 and beyond
GPU enablement for data science on OpenShift | DevNation Tech Talk
Seattle Spark Meetup Mobius CSharp API
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
Spark day 2017 - Spark on Kubernetes
Sparking up Data Engineering: Spark Summit East talk by Rohan Sharma
KubeCon London 2016 Ronana Cloud Native SDN
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Scalable Clusters On Demand
Track A-2 基於 Spark 的數據分析
Ad

More from Databricks (20)

PPTX
DW Migration Webinar-March 2022.pptx
PPTX
Data Lakehouse Symposium | Day 1 | Part 1
PPT
Data Lakehouse Symposium | Day 1 | Part 2
PPTX
Data Lakehouse Symposium | Day 2
PPTX
Data Lakehouse Symposium | Day 4
PDF
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
PDF
Learn to Use Databricks for Data Science
PDF
Why APM Is Not the Same As ML Monitoring
PDF
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
PDF
Stage Level Scheduling Improving Big Data and AI Integration
PDF
Simplify Data Conversion from Spark to TensorFlow and PyTorch
PDF
Scaling your Data Pipelines with Apache Spark on Kubernetes
PDF
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
PDF
Sawtooth Windows for Feature Aggregations
PDF
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
PDF
Re-imagine Data Monitoring with whylogs and Spark
PDF
Raven: End-to-end Optimization of ML Prediction Queries
PDF
Processing Large Datasets for ADAS Applications using Apache Spark
PDF
Massive Data Processing in Adobe Using Delta Lake
PDF
Machine Learning CI/CD for Email Attack Detection
DW Migration Webinar-March 2022.pptx
Data Lakehouse Symposium | Day 1 | Part 1
Data Lakehouse Symposium | Day 1 | Part 2
Data Lakehouse Symposium | Day 2
Data Lakehouse Symposium | Day 4
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
Learn to Use Databricks for Data Science
Why APM Is Not the Same As ML Monitoring
The Function, the Context, and the Data—Enabling ML Ops at Stitch Fix
Stage Level Scheduling Improving Big Data and AI Integration
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Scaling your Data Pipelines with Apache Spark on Kubernetes
Scaling and Unifying SciKit Learn and Apache Spark Pipelines
Sawtooth Windows for Feature Aggregations
Redis + Apache Spark = Swiss Army Knife Meets Kitchen Sink
Re-imagine Data Monitoring with whylogs and Spark
Raven: End-to-end Optimization of ML Prediction Queries
Processing Large Datasets for ADAS Applications using Apache Spark
Massive Data Processing in Adobe Using Delta Lake
Machine Learning CI/CD for Email Attack Detection

Recently uploaded (20)

PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PPTX
IB Computer Science - Internal Assessment.pptx
PDF
Mega Projects Data Mega Projects Data
PPTX
SAP 2 completion done . PRESENTATION.pptx
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPT
Miokarditis (Inflamasi pada Otot Jantung)
PPTX
Introduction to Knowledge Engineering Part 1
PDF
Galatica Smart Energy Infrastructure Startup Pitch Deck
PPTX
1_Introduction to advance data techniques.pptx
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
climate analysis of Dhaka ,Banglades.pptx
PPTX
Supervised vs unsupervised machine learning algorithms
PPTX
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
PPT
Reliability_Chapter_ presentation 1221.5784
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PDF
Introduction to Data Science and Data Analysis
PPTX
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx
IBA_Chapter_11_Slides_Final_Accessible.pptx
Market Analysis -202507- Wind-Solar+Hybrid+Street+Lights+for+the+North+Amer...
Qualitative Qantitative and Mixed Methods.pptx
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
IB Computer Science - Internal Assessment.pptx
Mega Projects Data Mega Projects Data
SAP 2 completion done . PRESENTATION.pptx
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Miokarditis (Inflamasi pada Otot Jantung)
Introduction to Knowledge Engineering Part 1
Galatica Smart Energy Infrastructure Startup Pitch Deck
1_Introduction to advance data techniques.pptx
Introduction-to-Cloud-ComputingFinal.pptx
climate analysis of Dhaka ,Banglades.pptx
Supervised vs unsupervised machine learning algorithms
MODULE 8 - DISASTER risk PREPAREDNESS.pptx
Reliability_Chapter_ presentation 1221.5784
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
Introduction to Data Science and Data Analysis
Introduction to Firewall Analytics - Interfirewall and Transfirewall.pptx

Scaling Apache Spark on Kubernetes at Lyft

  • 1. WIFI SSID:SparkAISummit | Password: UnifiedAnalytics
  • 2. Li Gao, Lyft Rohit Menon, Lyft Scaling Spark on Kubernetes #UnifiedAnalytics #SparkAISummit
  • 3. Introduction 3#UnifiedAnalytics #SparkAISummit Li Gao Works in the Data Platform team at Lyft, currently leading the Compute Infra initiatives including Spark on Kubernetes. Previously at Salesforce, Fitbit, Groupon, and other startups. Rohit Menon Rohit Menon is a Software Engineer on the Data Platform team at Lyft. Rohit's primary area of focus is building and scaling out the Spark and Hive Infrastructure for ETL and Machine learning use cases. Previously at EA, VMWare
  • 4. Agenda 4#UnifiedAnalytics #SparkAISummit ● Introduction of Data Landscape at Lyft ● The challenges we face ● How Apache Spark on Kubernetes can help ● Remaining work
  • 5. Data Landscape 5#UnifiedAnalytics #SparkAISummit ● Batch data Ingestion and ETL ● Data Streaming ● ML platforms ● Notebooks and BI tools ● Query and Visualization ● Operational Analytics ● Data Discovery & Lineage ● Workflow orchestration ● Cloud Platforms
  • 6. Evolving Batch Architecture 6 Future2016-2017 Vendor-based Hadoop 2017-2018 Hive on MR Vendor Presto Mid 2018 Hive on Tez + Spark Adhoc Late 2018 Spark on Vendor GA Early 2019 Spark on K8s Alpha Spark on K8s Beta
  • 7. Batch Compute Clusters What batch compute is used for 7 Events Ext Data RDB/KV Sys Events IngestPipelines AWSS3 AWSS3 HMS Presto,HiveClient,andBITools Analysts Engineers Scientists Services
  • 9. Batch Compute Challenges 9 ● 3rd Party vendor dependency limitations ● Data ETL expressed solely in SQL ● Complex logic expressed in Python that hard to adopt in SQL ● Different dependencies and versions ● Resource load balancing for heterogeneous workloads
  • 10. 3rd Party Vendor Limitations 10 ● Proprietary patches ● Inconsistent bootstrap ● Release schedule ● Homogeneous environments
  • 11. Is SQL the complete solution? 11
  • 12. What about Python functions? 12 “I want to express my processing logic in python functions with external geo libraries (i.e. Geomesa) and interact with Hive tables” --- Lyft data engineer
  • 13. How Spark can help? 13 RDB/KV Applications APIs Environments Data Sources and Data Sinks
  • 14. What challenges remain? 14 ● Per job custom dependencies ● Handling version requirements (Py3 v.s. Py2) ● Still need to run on shared clusters for cost efficiency
  • 15. What about dependencies? 15 RTree Libraries Data CodecsSpatial Libraries
  • 16. Different Spark or Hive versions? ● Legacy jobs that require Spark 2.2 ● Newer Jobs require Spark 2.3 or Spark 2.4 ● Hive 2.1 SQL and Hive 2.3 16
  • 17. How Kubernetes can help? 17 Operators & Controllers Pods Ingress Services Namespaces Pods Immutability Event driven & Declarative Community + CNCF ServiceMesh Multi-TenancySupport
  • 19. What challenges still remain? ● Spark on k8s is still in its early days ● Single cluster scaling limit ● CRD and control plane update ● Pod churn and IP allocations throttling ● ECR container registry reliability 19
  • 20. Current scale 20 ● 10s PB data lake ● (O) 100k batch jobs running daily ● ~ 1000s of EC2 nodes spanning multiple clusters and AZs ● ~ 1000s of workflows running daily
  • 21. How Lyft scales Spark on K8s 21 # of Clusters # of Namespaces # of Pods Pod Churn Rate # of Nodes Pod Size Job:Pod ratio IP Alloc Rate Limit ECR Rate Limit Affinity & Isolation QoS & Quota
  • 24. HA in Cluster Pool 24 Cluster 1 Cluster 2 Cluster 3 Cluster Pool A Cluster 4 ● Cluster rotation within a cluster pool ● Automated provisioning of a new cluster and (manually) add into rotation ● Throttle at lower bound when rotation in progress
  • 25. Multiple Namespaces (Groups) 25 Pod Pod Pod Namespace 1 Pod Pod Pod Namespace 2 Pod Pod Pod Namespace 3 Node A Node B Node C Node D Role1 Role1 Role2 Max Pod Size 1 Max Pod Size 2 ● Practical ~3K active pods per namespace observed ● Less preemption required when namespace isolated by quota ● Different namespaces can map different IAM roles and sidecar configurations
  • 26. Pod Sharing 26 Job Controller Spark Driver Pod Spark Exec Pods Job 2 Driver Pod Job 2 Exec Pods Job 3 Driver Pod Job 3 Exec Pods Shared Pods Job 1 Job 4 Job 3 Job 2 AWS S3 Dep Dep Dedicate & Isolated Pods Dep
  • 28. DDL Separation to reduce churn 28
  • 29. Pod Priority and Preemption (WIP) 29 ● Priority base preemption ● Driver pod has higher priority than executor pod ● Experimental D1 D2 E1 E2 E3 E4 K8s Scheduler D1 E5 New Pod Req Before D2 E5 E2 E3 E4 After E1 Evictedhttps://github.com/kubernetes/kubernetes/issues/71486 https://github.com/kubernetes/enhancements/issues/564
  • 30. Taints and Tolerations (WIP) 30 Node A Node B Node C Node D Node E Node F P1 P2 P3 P4 P5 P6 P7 P7 P8 P9 P10 Controllers and Watchers Job 1 Job 2 Core Nodes (Taint) Worker Nodes (Taint) ● Other considerations: Node Labels, Node Selectors to separate GPU and CPU based workloads
  • 31. What about ECR reliability? 31 Node 1 Node 2 Node 3 Pods Pods Pods DaemonSet + Docker In Docker ECR Container Images
  • 32. Spark Job Config Overlays (DML) 32 Cluster Pool Defaults Cluster Defaults Spark Job User Specified Config Cluster and Namespace Overrides Final Spark Job Config Config Composer & Event Watcher Spark Operator
  • 33. X-Ray of Job Controller 33
  • 34. Controllers & Watchers • Job router + scheduler • Namespace group controller • Config composer • Service controllers (STS, Jupyter/Zeppelin) • K8s metrics & events watchers • Spark job/crd events & metrics watchers 34
  • 35. X-Ray of Spark Operator 35
  • 36. Monitoring and Logging Toolbox 36 HEKA JMX
  • 37. Monitoring Example - OOM Kill 37
  • 38. Provision & Automation 38 Kustomize Template K8S Deploy Sidecar injectors Secrets injectors DaemonSets KIAM
  • 39. Remaining work ● More intelligent & resilient job routing/scheduler and parameter setting ● Serverless and self-serviceable user experiences for any-to-any batch data compute ● Finer grained cost attribution ● Improved docker image distribution ● Spark 3.0 & Kubernetes v1.14+ 39
  • 40. Key Takeaways ● Apache Spark can help unify different batch data compute use cases ● Kubernetes can help solve the dependency and multi-version requirements using its containerized approach ● Spark on Kubernetes can scale significantly by using a multi-cluster compute mesh approach with proper resource isolation and scheduling techniques ● Challenges remain when running Spark on Kubernetes at scale 40
  • 41. Community 41 This effort would not be possible without the help from the open source and wider communities:
  • 42. Q&A 42 Li Gao in/ligao101 Rohit Menon @_rohitmenon
  • 43. DON’T FORGET TO RATE AND REVIEW THE SESSIONS SEARCH SPARK + AI SUMMIT