SlideShare a Scribd company logo
Hybrid Spark
Architecture with
Yarn and Kubernetes
Catalin Toda (Sr Engineer @ Lyft)
Rohit Menon (Staff Engineer @ Lyft)
Agenda
▪ Spark @ Lyft
▪ Challenges with K8s
▪ Hybrid Model
▪ Spark Operator
▪ Image Hierarchy
▪ Spark Wrapper
▪ Progress & Future Plans
What is Spark Used For @ Lyft
• Primarily Python Shop with some Scala
• Running in AWS with S3 as permanent storage
• Interactive Development & ML with Jupyter and Spark
• ML Batch Use Cases
• Pricing
• ETA/Routing
• Mapping
• ETL Use Cases
• Event Ingestion
• GraphQL Offline Model
• Financial Datasets / SOX Complaint Datasets / Experimentation Offline Batch
Analysis and many more
• HiveQL to Spark-SQL Migration
2018 Spark on Yarn
• Every major use case had its own ephemeral yarn
cluster
• Management overhead for infra team
• Custom Dependency management per cluster to pull
in python dependencies
• Tough to test/maintain cluster bootstrap scripts
• Custom IAM role/permission overhead
2019 Spark On Kubernetes
• Lyft Infra supported Kubernetes deployment
• Google OSS spark-on-k8s operator availability
• Flyte (Container native scheduler) took off in Lyft for
ML use case
• Containerized workloads with easier python
dependency management
• Simpler support for per job IAM roles
Spark On Kubernetes Architecture
2020 Spark on Kubernetes
• Maturing support for Spark on K8s
• Lyft Hadoop/Hive infrastructure as K8s deployment
• Auto-scaling handled for YARN cluster based on RM
load
• Spark ETL workloads move over from Yarn to Spark
on k8s
• Start hitting limits with Lyft k8s Infra setup
• Custom solutions required to support growing scale
• Group jobs to reduce spiky requests to k8s and AWS control plane
• Add new k8s clusters to support stronger isolation model
Current Spark Scale on K8s
- 1000 concurrent jobs
- 5 Kubernetes Clusters
- 20k executors at peak
- 1 AWS region
- 5 AWS Availability Zones
Challenges with K8s Model
• IPv4 Address Shortage
• Shortage across all 5 AZs
• Leads to driver and executors
startup delays
- IAM Wait Delays
- AWS IAM assignment could be
throttled
- IAM wait to assure assignment
increasing delays
- Infrastructure issues
- Etcd size tuning
- Impact of bad k8s node
Challenges with K8s Model
• Image Overheads
• Every project has their own image
• Registration of images for different
environments
• Startup delays caused by uncached image
• New nodes
• New image releases
• Release model
• Infra prepares a base image with Spark
latest changes
• Customers manage final release when the
image is tested
• Leads to maximum 1 month rollout time due
to several images to be updated
Challenges with K8s Model
- K8s scheduling
• Fixed per namespace quota
• Containers not admitted if over quota
• No priority between jobs in namespaces
- Control plane limits
- Maximum number of containers
- Short running containers are not typical K8s
workload
• Hive Deprecation
• Today hive scale = 5k jobs at peak
• Expected spark load to increase by 6x
• For interactive workload pod startup time
latency is high on k8s
2021 Hybrid Model (YARN + K8s)
Separation by Workload Type
• Containerized (K8s)
• Pyspark + Custom Dependencies
• ML interactive
• Non-containerized (YARN)
• SQL Interactive
• SQL Batch
• Scala Workloads
• Simple Pyspark with no dependencies
Hybrid Model Architecture
Advantages of Hybrid Model
• YARN executors have low startup latency and can
handle spikes
• Easier Queue and Resource management
• Workloads without custom dependencies do not get
penalized with k8s infra overheads
• Mature support for dynamic allocation and external
shuffle service
Single Entry Point
• Spark-on-k8s-operator as single entry point for both YARN
and K8s
• Integrates easily open source
• Compatibility with Flyte
• No Lyft specific code
• Multi version branch by default
• Driver runs on k8s in client mode
• We plan to contribute this to OSS
• Current OSS design add overhead of spark submit pod
• Sets us infra team to move workloads seamlessly between
resource managers
Spark Wrapper Design
Stage 1
- Part of base image
- Downloads and runs stage2
Stage 2
- Manipulate configs
- Run spark driver
- Capture job logs and results
- Push application metrics
Spark Wrapper
• Custom image entry point
• Allows config management based on environments
• Allows switching between resource managers
• Metrics
• Push to events - queryable/dashboard using lyft stack
• Push to statsd for real time monitoring/alerting
• Integrates well with Lyft Infra
• Spark on k8s operator remains in sync with upstream
• Lyft specific logic that integrates with in-house tools
• Adds runtime controller to images
Image Hierarchy/Distribution
• One base image for spark per spark version
• Containerized spark extends base image
• Users can further extend containerized base image to add custom
dependencies
• ML base image
• Users maintain their own image
• Non-containerized use the base image directly
• Infra updates the image
• Consistent experience across use cases
Progress so far - Best of Both Worlds
- Spark driver startup < 1s
- Resource allocation managed in YARN
- K8s scale reduced by 20x
- IP addresses requirement reduced by 20x
- Per job IAM Roles using Web Identity provider
Progress so far - Best of Both Worlds
- No migration needed for containerized customers
- Python dependency management using an utility
library
- The latest version is synced in all environments
(adhoc, k8s, YARN)
Future Plans
- Consolidate Batch Compute on Spark (Hive -> Spark)
- Evaluate Data Lake technologies
- Continue to scale k8s and Spark Infrastructure
Conclusion
- YARN vs K8s
- Workload analysis is required before identifying the best solution
- For Lyft - existing YARN infrastructure helped choosing a hybrid model
- Fixing K8s model requires:
- K8s supports to IPv6 in the latest versions
- Scaling - Number of k8s clusters and a gateway to perform the routing between them
- Image - Design considerations/overheads with high number of images
- Quota - Investing in projects trying to solve this aspect
- Web Identity Provider - Custom Roles in K8s
Q & A
Contact Info:
ctoda@lyft.com
rmenon@lyft.com

More Related Content

What's hot (20)

PDF
External should that be a microservice
Rohit Kelapure
 
PPTX
API Management in Azure
Tomasso Groenendijk
 
PPTX
Cache in API Gateway
GilWon Oh
 
PDF
Kafka 101 and Developer Best Practices
confluent
 
PDF
Chicago AWS Solutions Architect Mehdy Haghy recaps the new AI/ML releases and...
AWS Chicago
 
PDF
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
PPT
API Management architect presentation
sflynn073
 
PPTX
Apache Kafka 0.8 basic training - Verisign
Michael Noll
 
PPTX
Apache Ranger Hive Metastore Security
DataWorks Summit/Hadoop Summit
 
PDF
Api Gateway
KhaqanAshraf
 
PDF
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Kai Wähner
 
PDF
Best Practice on using Azure OpenAI Service
Kumton Suttiraksiri
 
PPTX
1. 아키텍쳐 설계 프로세스
Terry Cho
 
PDF
Azure Synapse 101 Webinar Presentation
Matthew W. Bowers
 
PDF
HDFS on Kubernetes—Lessons Learned with Kimoon Kim
Databricks
 
PDF
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
Kai Wähner
 
PPT
Introduction to Service Oriented Architecture
DATA Inc.
 
PDF
Apache Kafka in Financial Services - Use Cases and Architectures
Kai Wähner
 
PDF
IoT & Azure (EventHub)
Mirco Vanini
 
PPTX
Azure Bot Service
Azure Riyadh User Group
 
External should that be a microservice
Rohit Kelapure
 
API Management in Azure
Tomasso Groenendijk
 
Cache in API Gateway
GilWon Oh
 
Kafka 101 and Developer Best Practices
confluent
 
Chicago AWS Solutions Architect Mehdy Haghy recaps the new AI/ML releases and...
AWS Chicago
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Kashif Ali Siddiqui
 
API Management architect presentation
sflynn073
 
Apache Kafka 0.8 basic training - Verisign
Michael Noll
 
Apache Ranger Hive Metastore Security
DataWorks Summit/Hadoop Summit
 
Api Gateway
KhaqanAshraf
 
Real-Life Use Cases & Architectures for Event Streaming with Apache Kafka
Kai Wähner
 
Best Practice on using Azure OpenAI Service
Kumton Suttiraksiri
 
1. 아키텍쳐 설계 프로세스
Terry Cho
 
Azure Synapse 101 Webinar Presentation
Matthew W. Bowers
 
HDFS on Kubernetes—Lessons Learned with Kimoon Kim
Databricks
 
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
Kai Wähner
 
Introduction to Service Oriented Architecture
DATA Inc.
 
Apache Kafka in Financial Services - Use Cases and Architectures
Kai Wähner
 
IoT & Azure (EventHub)
Mirco Vanini
 
Azure Bot Service
Azure Riyadh User Group
 

Similar to Hybrid Apache Spark Architecture with YARN and Kubernetes (20)

PDF
Reliable Performance at Scale with Apache Spark on Kubernetes
Databricks
 
PPTX
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
Chester Chen
 
PDF
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
Databricks
 
PDF
Scaling spark on kubernetes at Lyft
Li Gao
 
PDF
Webinar kubernetes and-spark
cnvrg.io AI OS - Hands-on ML Workshops
 
PDF
The benefits of running Spark on your own Docker
Itai Yaffe
 
PPTX
Lyft talks #4 Orchestrating big data and ML pipelines at Lyft
Constantine Slisenka
 
PDF
Big data with Python on kubernetes (pyspark on k8s) - Big Data Spain 2018
Holden Karau
 
PDF
18th Athens Big Data Meetup - 2nd Talk - Run Spark and Flink Jobs on Kubernetes
Athens Big Data
 
PDF
PySpark on Kubernetes @ Python Barcelona March Meetup
Holden Karau
 
PDF
Spark on Kubernetes
datamantra
 
PPTX
Apache Spark on Kubernetes
haridasnss
 
PDF
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Chris Fregly
 
PDF
Apache Spark the Hard Way: Challenges with Building an On-Prem Spark Analytic...
Spark Summit
 
PDF
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Databricks
 
PPT
February 2016 HUG: Running Spark Clusters in Containers with Docker
Yahoo Developer Network
 
PPTX
Uncovering an Apache Spark 2 Benchmark - Configuration, Tuning and Test Results
DataWorks Summit
 
PPTX
Spark infrastructure
ericwilliammarshall
 
PDF
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
Databricks
 
PDF
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
SeungYong Oh
 
Reliable Performance at Scale with Apache Spark on Kubernetes
Databricks
 
SF Big Analytics_20190612: Scaling Apache Spark on Kubernetes at Lyft
Chester Chen
 
Migrating Airflow-based Apache Spark Jobs to Kubernetes – the Native Way
Databricks
 
Scaling spark on kubernetes at Lyft
Li Gao
 
Webinar kubernetes and-spark
cnvrg.io AI OS - Hands-on ML Workshops
 
The benefits of running Spark on your own Docker
Itai Yaffe
 
Lyft talks #4 Orchestrating big data and ML pipelines at Lyft
Constantine Slisenka
 
Big data with Python on kubernetes (pyspark on k8s) - Big Data Spain 2018
Holden Karau
 
18th Athens Big Data Meetup - 2nd Talk - Run Spark and Flink Jobs on Kubernetes
Athens Big Data
 
PySpark on Kubernetes @ Python Barcelona March Meetup
Holden Karau
 
Spark on Kubernetes
datamantra
 
Apache Spark on Kubernetes
haridasnss
 
Spark on Kubernetes - Advanced Spark and Tensorflow Meetup - Jan 19 2017 - An...
Chris Fregly
 
Apache Spark the Hard Way: Challenges with Building an On-Prem Spark Analytic...
Spark Summit
 
Zeus: Uber’s Highly Scalable and Distributed Shuffle as a Service
Databricks
 
February 2016 HUG: Running Spark Clusters in Containers with Docker
Yahoo Developer Network
 
Uncovering an Apache Spark 2 Benchmark - Configuration, Tuning and Test Results
DataWorks Summit
 
Spark infrastructure
ericwilliammarshall
 
Running Apache Spark on Kubernetes: Best Practices and Pitfalls
Databricks
 
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
SeungYong Oh
 
Ad

More from Databricks (20)

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

Recently uploaded (20)

PDF
Context Engineering for AI Agents, approaches, memories.pdf
Tamanna
 
PDF
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
PPTX
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
PPTX
b6057ea5-8e8c-4415-90c0-ed8e9666ffcd.pptx
Anees487379
 
PPTX
ER_Model_Relationship_in_DBMS_Presentation.pptx
dharaadhvaryu1992
 
PDF
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays
 
PDF
Simplifying Document Processing with Docling for AI Applications.pdf
Tamanna
 
PPTX
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
PDF
JavaScript - Good or Bad? Tips for Google Tag Manager
📊 Markus Baersch
 
PDF
R Cookbook - Processing and Manipulating Geological spatial data with R.pdf
OtnielSimopiaref2
 
PDF
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
PPTX
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
PDF
Choosing the Right Database for Indexing.pdf
Tamanna
 
PPTX
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
PPT
AI Future trends and opportunities_oct7v1.ppt
SHIKHAKMEHTA
 
PDF
OPPOTUS - Malaysias on Malaysia 1Q2025.pdf
Oppotus
 
PPTX
AI Presentation Tool Pitch Deck Presentation.pptx
ShyamPanthavoor1
 
PDF
Copia de Strategic Roadmap Infographics by Slidesgo.pptx (1).pdf
ssuserd4c6911
 
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
PPTX
apidays Helsinki & North 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (A...
apidays
 
Context Engineering for AI Agents, approaches, memories.pdf
Tamanna
 
Product Management in HealthTech (Case Studies from SnappDoctor)
Hamed Shams
 
apidays Singapore 2025 - From Data to Insights: Building AI-Powered Data APIs...
apidays
 
b6057ea5-8e8c-4415-90c0-ed8e9666ffcd.pptx
Anees487379
 
ER_Model_Relationship_in_DBMS_Presentation.pptx
dharaadhvaryu1992
 
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays
 
Simplifying Document Processing with Docling for AI Applications.pdf
Tamanna
 
ER_Model_with_Diagrams_Presentation.pptx
dharaadhvaryu1992
 
JavaScript - Good or Bad? Tips for Google Tag Manager
📊 Markus Baersch
 
R Cookbook - Processing and Manipulating Geological spatial data with R.pdf
OtnielSimopiaref2
 
What does good look like - CRAP Brighton 8 July 2025
Jan Kierzyk
 
apidays Helsinki & North 2025 - API access control strategies beyond JWT bear...
apidays
 
Choosing the Right Database for Indexing.pdf
Tamanna
 
apidays Helsinki & North 2025 - From Chaos to Clarity: Designing (AI-Ready) A...
apidays
 
AI Future trends and opportunities_oct7v1.ppt
SHIKHAKMEHTA
 
OPPOTUS - Malaysias on Malaysia 1Q2025.pdf
Oppotus
 
AI Presentation Tool Pitch Deck Presentation.pptx
ShyamPanthavoor1
 
Copia de Strategic Roadmap Infographics by Slidesgo.pptx (1).pdf
ssuserd4c6911
 
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays
 
apidays Helsinki & North 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (A...
apidays
 

Hybrid Apache Spark Architecture with YARN and Kubernetes

  • 1. Hybrid Spark Architecture with Yarn and Kubernetes Catalin Toda (Sr Engineer @ Lyft) Rohit Menon (Staff Engineer @ Lyft)
  • 2. Agenda ▪ Spark @ Lyft ▪ Challenges with K8s ▪ Hybrid Model ▪ Spark Operator ▪ Image Hierarchy ▪ Spark Wrapper ▪ Progress & Future Plans
  • 3. What is Spark Used For @ Lyft • Primarily Python Shop with some Scala • Running in AWS with S3 as permanent storage • Interactive Development & ML with Jupyter and Spark • ML Batch Use Cases • Pricing • ETA/Routing • Mapping • ETL Use Cases • Event Ingestion • GraphQL Offline Model • Financial Datasets / SOX Complaint Datasets / Experimentation Offline Batch Analysis and many more • HiveQL to Spark-SQL Migration
  • 4. 2018 Spark on Yarn • Every major use case had its own ephemeral yarn cluster • Management overhead for infra team • Custom Dependency management per cluster to pull in python dependencies • Tough to test/maintain cluster bootstrap scripts • Custom IAM role/permission overhead
  • 5. 2019 Spark On Kubernetes • Lyft Infra supported Kubernetes deployment • Google OSS spark-on-k8s operator availability • Flyte (Container native scheduler) took off in Lyft for ML use case • Containerized workloads with easier python dependency management • Simpler support for per job IAM roles
  • 6. Spark On Kubernetes Architecture
  • 7. 2020 Spark on Kubernetes • Maturing support for Spark on K8s • Lyft Hadoop/Hive infrastructure as K8s deployment • Auto-scaling handled for YARN cluster based on RM load • Spark ETL workloads move over from Yarn to Spark on k8s • Start hitting limits with Lyft k8s Infra setup • Custom solutions required to support growing scale • Group jobs to reduce spiky requests to k8s and AWS control plane • Add new k8s clusters to support stronger isolation model
  • 8. Current Spark Scale on K8s - 1000 concurrent jobs - 5 Kubernetes Clusters - 20k executors at peak - 1 AWS region - 5 AWS Availability Zones
  • 9. Challenges with K8s Model • IPv4 Address Shortage • Shortage across all 5 AZs • Leads to driver and executors startup delays - IAM Wait Delays - AWS IAM assignment could be throttled - IAM wait to assure assignment increasing delays - Infrastructure issues - Etcd size tuning - Impact of bad k8s node
  • 10. Challenges with K8s Model • Image Overheads • Every project has their own image • Registration of images for different environments • Startup delays caused by uncached image • New nodes • New image releases • Release model • Infra prepares a base image with Spark latest changes • Customers manage final release when the image is tested • Leads to maximum 1 month rollout time due to several images to be updated
  • 11. Challenges with K8s Model - K8s scheduling • Fixed per namespace quota • Containers not admitted if over quota • No priority between jobs in namespaces - Control plane limits - Maximum number of containers - Short running containers are not typical K8s workload • Hive Deprecation • Today hive scale = 5k jobs at peak • Expected spark load to increase by 6x • For interactive workload pod startup time latency is high on k8s
  • 12. 2021 Hybrid Model (YARN + K8s) Separation by Workload Type • Containerized (K8s) • Pyspark + Custom Dependencies • ML interactive • Non-containerized (YARN) • SQL Interactive • SQL Batch • Scala Workloads • Simple Pyspark with no dependencies
  • 14. Advantages of Hybrid Model • YARN executors have low startup latency and can handle spikes • Easier Queue and Resource management • Workloads without custom dependencies do not get penalized with k8s infra overheads • Mature support for dynamic allocation and external shuffle service
  • 15. Single Entry Point • Spark-on-k8s-operator as single entry point for both YARN and K8s • Integrates easily open source • Compatibility with Flyte • No Lyft specific code • Multi version branch by default • Driver runs on k8s in client mode • We plan to contribute this to OSS • Current OSS design add overhead of spark submit pod • Sets us infra team to move workloads seamlessly between resource managers
  • 16. Spark Wrapper Design Stage 1 - Part of base image - Downloads and runs stage2 Stage 2 - Manipulate configs - Run spark driver - Capture job logs and results - Push application metrics
  • 17. Spark Wrapper • Custom image entry point • Allows config management based on environments • Allows switching between resource managers • Metrics • Push to events - queryable/dashboard using lyft stack • Push to statsd for real time monitoring/alerting • Integrates well with Lyft Infra • Spark on k8s operator remains in sync with upstream • Lyft specific logic that integrates with in-house tools • Adds runtime controller to images
  • 18. Image Hierarchy/Distribution • One base image for spark per spark version • Containerized spark extends base image • Users can further extend containerized base image to add custom dependencies • ML base image • Users maintain their own image • Non-containerized use the base image directly • Infra updates the image • Consistent experience across use cases
  • 19. Progress so far - Best of Both Worlds - Spark driver startup < 1s - Resource allocation managed in YARN - K8s scale reduced by 20x - IP addresses requirement reduced by 20x - Per job IAM Roles using Web Identity provider
  • 20. Progress so far - Best of Both Worlds - No migration needed for containerized customers - Python dependency management using an utility library - The latest version is synced in all environments (adhoc, k8s, YARN)
  • 21. Future Plans - Consolidate Batch Compute on Spark (Hive -> Spark) - Evaluate Data Lake technologies - Continue to scale k8s and Spark Infrastructure
  • 22. Conclusion - YARN vs K8s - Workload analysis is required before identifying the best solution - For Lyft - existing YARN infrastructure helped choosing a hybrid model - Fixing K8s model requires: - K8s supports to IPv6 in the latest versions - Scaling - Number of k8s clusters and a gateway to perform the routing between them - Image - Design considerations/overheads with high number of images - Quota - Investing in projects trying to solve this aspect - Web Identity Provider - Custom Roles in K8s