SlideShare a Scribd company logo
Implement Reliable,
Isolated & Unified Job
Submission
Zili Chen – Software Engineer, Flink Committer
2
• Background
• Reliability
• Isolation
• Unification
Outline
3
• Background
• Reliability
• Isolation
• Unification
Outline
Background
4
1
5
Background1
Oceanus: Tencent Real-Time Compute Platform
Data Distribution Monitoring Real-Time BI Online Learning
1200
Jobs
35 Trillion
Messages in a day
4.5 PB
Data in a day
6
Background1
The Problem
Job submission & execution is unreliable.
Client becomes bottleneck & suffers security risks.
Flexible programmatic interface is missing.
Start with the workflow of job submission!
7
Workflow1
Cluster Deployment(Session Mode)
Deployer
client side cluster side Resource
Manager
(YARN)
2. Launch Application
Job Manager Container
Dispatcher
8
Workflow1
Job Submission(Session Mode)
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
1. Generate
JobGraph
9
Workflow1
Job Submission(Session Mode)
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
3. Check
JobStatus
4. Persist
JobGraph
(otherwise)
10
Workflow1
Job Submission(Session Mode)
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
5. Start
Job Manager
Job Manager
6. Report
Started
11
Workflow1
Job Execution(Session Mode)
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
Job Manager
1. Check
JobStatus
2. Finished
By Others
2. Set JobStatus
RUNNING
12
Workflow1
Job Execution(Session Mode)
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
Job Manager
3. Set JobStatus
DONE
4. Finished
13
Workflow1
Job Execution(Session Mode)
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
5. Remove
JobGraph
6. Clear
JobStatus
14
Workflow1
Cluster Deployment(Job Mode)
Deployer
client side cluster side Resource
Manager
(YARN)
3. Launch Application
Job Manager Container
Dispatcher
1. Generate
JobGraph
15
Workflow1
Job Execution(Job Mode)
cluster side
Dispatcher
JobGraph
Store
JobRegistry
2. Start
Job Manager
Job Manager
1. Recover
JobGraph
16
Workflow1
Job Execution(Job Mode)
cluster side
Dispatcher
JobGraph
Store
JobRegistry
Job Manager
3. Check
JobStatus
4. Finished
By Others
4. Set JobStatus
RUNNING
17
Workflow1
Job Execution(Job Mode)
cluster side
Dispatcher
JobGraph
Store
JobRegistry
Job Manager
5. Set JobStatus
DONE
6. Finished
18
Workflow1
Job Execution(Job Mode)
cluster side
Dispatcher
JobGraph
Store
JobRegistry
7. Remove
JobGraph
8. Clear
JobStatus
19
• Background
• Reliability
• Isolation
• Unification
Outline
Reliability
20
2
21
Reliability2
What is reliability?
Submited exactly once!
Executed exactly once!
22
Reliability2
Failure Case: Job Manager failed to start in time
22
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
Job Manager
Starting
Job Manager
23
Reliability2
Failure Case: Job Manager crashed after job finished
23
cluster side
Dispatcher
JobGraph
Store
JobRegistry
Job Manager
Set JobStatus
DONE
24
Reliability2
Failure Case: Job Manager crashed after job finished
24
cluster side
Dispatcher
JobGraph
Store
JobRegistry
Job Manager
Crash
Finished
Clear
JobStatus
25
Reliability2
Failure Case: Standby starts after JobStatus cleared
25
cluster side
Dispatcher
JobGraph
Store
JobRegistry
Check
JobStatus
26
Reliability2
Failure Case: Standby starts after JobStatus cleared
26
cluster side
Dispatcher
JobGraph
Store
JobRegistry
Job Manager
Start
Job Manager Execute twice!
(FLINK-11813)
27
Reliability2
What to define job submitted & executed
27
JobRegistry
JobGraphStore
(internal) JobManagerRunnerFuture Handled in Dispatcher
Modified by Dispatcher
Modified by Dispatcher & Job Manager
Many factors to define job status!
Goal: Achieve atomic job submission and execution
28
Reliability2
How to achieve atomic job submission
28
• What is the sign of a successful submission?
JobGraph persisted in JobGraphStore
29
Reliability2
Successful job submission defined by JobGraph
29
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
4. Persist
JobGraph
30
Reliability2
How to achieve atomic job submission
30
• What is the sign of a successful submission?
JobGraph persisted in JobGraphStore
• What is the sign of a successful execution?
DONE in JobRegistry(only Dispatcher modifies it; not cleared after written)
31
Reliability2
Successful job execution defined by DONE
31
Dispatcher
JobGraph
Store
JobRegistry
Job Manager
6. Set JobStatus
RUNNING
cluster side
7.Start
Job Manager
32
Reliability2
Successful job execution defined by DONE
32
Dispatcher
JobGraph
Store
JobRegistry
Job Manager
8. Finished
9. Set JobStatus
DONE
cluster side
33
• Background
• Reliability
• Isolation
• Unification
Outline
Isolation
34
3
35
Isolation3
Where is JobGraph generated?
35
36
Isolation3
Job Submission(Session Mode)
Client
Dispatcher
client side cluster side
JobGraph
Store
JobRegistry
Generate
JobGraph
37
Isolation3
Cluster Deployment(Job Mode)
Deployer
Resource
Manager
(YARN)
client side cluster side
Generate
JobGraph
38
Isolation3
Where is JobGraph generated?
38
Compilation always happens at client side!
39
Isolation3
Drawbacks
39
Require user code dependencies
Execute arbitrary user code
Bottleneck at client
Goal: Achieve isolated job compilation
40
Isolation3
Compilation on cluster side
Application Mode
41
Isolation3
Application Mode: Package User Program
41
ShipFiles
MainClass
Parallelism
SavepointSettings
Arguments
...
Deployer
client side
CommandLine
Interface
Pass Program
Metadata
42
Isolation3
Application Mode: Package User Program
42
Deployer
client side
CommandLine
Interface
MainClass
Parallelism
SavepointSettings
Arguments
...
Package
User Program
43
Isolation3
Application Mode: Prepare Dependencies
43
Deployer
Distributed Storage
client side cluster side
Upload
Dependencies
44
Isolation3
Application Mode: Prepare Dependencies
44
Deployer
Distributed Storage
client side cluster side
Return URIs
ShipFiles
Distributed Storage
45
Isolation3
Application Mode: Prepare Dependencies
45
Deployer
client side cluster side
Configure
Dependencies
URIs
SharedLibs
ShipFiles
46
Isolation
client side cluster side Resource
Manager
(YARN)
3
Application Mode: Cluster Deployment
Deployer
47
Isolation
client side cluster side Resource
Manager
(YARN)
3
Application Mode: Cluster Deployment
Launch Application
Job Manager Container
Deployer
48
Isolation3
Application Mode: Download Dependencies
48
cluster side
Job Manager ContainerDistributed Storage
SharedLibs
ShipFiles
Localize(YARN)
InitContainer(K8s)
Job Manager Container
49
Isolation3
Application Mode: Execute in Isolation
49
cluster side
DispatcherClient
Submit JobGraph
Generate
JobGraph
50
Isolation3
Deployment: Recap
50
Session Mode Job Mode
User Program execute as is abort on execute
Client Perspective cluster deployed &
job submitted
cluster deployed
with bundled job
High Availability configured
JobGraphStore
special
JobGraphStore
Application Mode
execute as is
cluster deployed &
(local) job submitted
configured
JobGraphStore
51
• Background
• Reliability
• Isolation
• Unification
Outline
Unification
52
4
53
Unification4
Client Interface: The Problem
Flink does not provide public & stable client interface
Various customized submission requires programmatic interface
Goal: Expose unified layered client interface!
54
Unification4
Client Interface: Three-Layers Architecture
Deployment: Deployer
Cluster: Cluster Client
Job: Job Client
Target: Kubernetes, YARN, etc.
Target: Flink Cluster
Target: Job Manager
55
Unification4
Client Interface: Deployer
Target: YARN, Kubernetes
Deployer
Resource
Manager
Submit Application:
ApplicationDescriptor → ApplicationID
Shutdown Application:
ApplicationID → Acknowledge
Get Application Status:
ApplicationID → ApplicationStatus
56
Unification4
Client Interface: Cluster Client
Submit Job:
JobGraph → JobID
Shutdown Cluster:
() → Acknowledge
Get Cluster Overview:
() → ClusterOverview
Target: Flink Cluster
Cluster Client Dispatcher
57
Unification4
Client Interface: Job Client
Get Job Status:
() → JobStatus
Trigger Savepoint
Savepoint Path → Savepoint Path
Cancel Job:
() → Acknowledge
Target: (Flink) Job Manager
Job Client Job Manager
58
Unification4
User Case: Platform
Deployer
Resource
Manager
Submit Session Application
Session Mode
Cluster Client
Submit Multiple JobGraphs
Dispatcher
59
Unification4
User Case: Platform
Deployer
Resource
Manager
Submit Multiple Applications
Application Mode
60
Unification4
User Case: End-User
Deployer
Resource
Manager
Submit Application
env.executeAsync(): JobClient
Cluster Client
Submit JobGraph
Dispatcher
(locally in Application Mode)
(remotely in Session Mode)
61
Unification4
User Case: End-User
env.executeAsync(): JobClient
Job Client Job Manager
1. Monitor Job Status
2. Trigger Savepoint
3. Manipulate Job
Thanks!

More Related Content

PPTX
Virtual Flink Forward 2020: Integrate Flink with Kubernetes natively - Yang Wang
PDF
Virtual Flink Forward 2020: Machine learning with Flink in Weibo - Yu Qian
PDF
Flink Connector Development Tips & Tricks
PPTX
Towards Flink 2.0: Unified Batch & Stream Processing - Aljoscha Krettek, Ver...
PDF
Kubernetes + Operator + PaaSTA = Flink @ Yelp - Antonio Verardi, Yelp
PPTX
Do Flink on Web with FLOW
PPTX
Flink Forward San Francisco 2018: Andrew Gao & Jeff Sharpe - "Finding Bad Ac...
PDF
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...
Virtual Flink Forward 2020: Integrate Flink with Kubernetes natively - Yang Wang
Virtual Flink Forward 2020: Machine learning with Flink in Weibo - Yu Qian
Flink Connector Development Tips & Tricks
Towards Flink 2.0: Unified Batch & Stream Processing - Aljoscha Krettek, Ver...
Kubernetes + Operator + PaaSTA = Flink @ Yelp - Antonio Verardi, Yelp
Do Flink on Web with FLOW
Flink Forward San Francisco 2018: Andrew Gao & Jeff Sharpe - "Finding Bad Ac...
Flink Forward San Francisco 2018: Dave Torok & Sameer Wadkar - "Embedding Fl...

What's hot (20)

PPTX
Flink Forward San Francisco 2019: Towards Flink 2.0: Rethinking the stack and...
PDF
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
PDF
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
PDF
Virtual Flink Forward 2020: Keynote: The Evolution of Data Infrastructure at ...
PDF
Virtual Flink Forward 2020: Everything is connected: How watermarking, scalin...
PPTX
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
PDF
Flink Forward San Francisco 2018: Gregory Fee - "Bootstrapping State In Apach...
PPTX
Flink Forward San Francisco 2018 keynote: Srikanth Satya - "Stream Processin...
PPTX
Flink Forward San Francisco 2019: Using Flink to inspect live data as it flow...
PDF
Flink Forward Berlin 2017: Patrick Lucas - Flink in Containerland
PPTX
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
PDF
Scaling stream data pipelines with Pravega and Apache Flink
PPTX
Apache flink 1.7 and Beyond
PPTX
Evolution of netflix conductor
PDF
Reactive Spring Framework 5
PDF
dA Platform Overview
PPTX
Stephan Ewen - Running Flink Everywhere
PPTX
Kostas Tzoumas_Stephan Ewen - Keynote -The maturing data streaming ecosystem ...
PDF
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)
PDF
Reactive Programming in Java and Spring Framework 5
Flink Forward San Francisco 2019: Towards Flink 2.0: Rethinking the stack and...
Flink Forward San Francisco 2018: Jörg Schad and Biswajit Das - "Operating Fl...
Virtual Flink Forward 2020: How Streaming Helps Your Staging Environment and ...
Virtual Flink Forward 2020: Keynote: The Evolution of Data Infrastructure at ...
Virtual Flink Forward 2020: Everything is connected: How watermarking, scalin...
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018: Gregory Fee - "Bootstrapping State In Apach...
Flink Forward San Francisco 2018 keynote: Srikanth Satya - "Stream Processin...
Flink Forward San Francisco 2019: Using Flink to inspect live data as it flow...
Flink Forward Berlin 2017: Patrick Lucas - Flink in Containerland
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Scaling stream data pipelines with Pravega and Apache Flink
Apache flink 1.7 and Beyond
Evolution of netflix conductor
Reactive Spring Framework 5
dA Platform Overview
Stephan Ewen - Running Flink Everywhere
Kostas Tzoumas_Stephan Ewen - Keynote -The maturing data streaming ecosystem ...
Continuous delivery with jenkins pipelines (@WeAreDevelopers2017)
Reactive Programming in Java and Spring Framework 5
Ad

Similar to Virtual Flink Forward 2020: Implement Reliable, Isolated & Unified Job Submission - Zili Chen (20)

PDF
Flink Forward SF 2017: Feng Wang & Zhijiang Wang - Runtime Improvements in Bl...
PDF
Flink Forward SF 2017: Stephan Ewen - Experiences running Flink at Very Large...
PDF
Flink Jobs Deployment On Kubernetes
PPTX
Stephan Ewen - Experiences running Flink at Very Large Scale
PDF
Flink Forward San Francisco 2019: Developing and operating real-time applicat...
PDF
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
PPTX
Flink Forward SF 2017: Till Rohrmann - Redesigning Apache Flink’s Distributed...
PPTX
Redesigning Apache Flink's Distributed Architecture @ Flink Forward 2017
PPTX
Where is my bottleneck? Performance troubleshooting in Flink
PPTX
Apache Flink in the Cloud-Native Era
PDF
Introducing the Apache Flink Kubernetes Operator
PDF
Improvements to Flink & it's Applications in Alibaba Search
PPTX
Aljoscha Krettek - The Future of Apache Flink
PPTX
Virtual Flink Forward 2020: Lessons learned on Apache Flink application avail...
PDF
Scalability truths and serverless architectures
PDF
Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Pred...
PDF
Flink Forward Berlin 2018: Lasse Nedergaard - "Our successful journey with Fl...
DOCX
Big data unit iv and v lecture notes qb model exam
PPTX
FailureEnrichers - Flink Meetup Bay Area.pptx
PPTX
Flux - An open sourced Workflow orchestrator from Flipkart
Flink Forward SF 2017: Feng Wang & Zhijiang Wang - Runtime Improvements in Bl...
Flink Forward SF 2017: Stephan Ewen - Experiences running Flink at Very Large...
Flink Jobs Deployment On Kubernetes
Stephan Ewen - Experiences running Flink at Very Large Scale
Flink Forward San Francisco 2019: Developing and operating real-time applicat...
Creating Real-Time Data Streaming powered by SQL on Kubernetes - Albert Lewan...
Flink Forward SF 2017: Till Rohrmann - Redesigning Apache Flink’s Distributed...
Redesigning Apache Flink's Distributed Architecture @ Flink Forward 2017
Where is my bottleneck? Performance troubleshooting in Flink
Apache Flink in the Cloud-Native Era
Introducing the Apache Flink Kubernetes Operator
Improvements to Flink & it's Applications in Alibaba Search
Aljoscha Krettek - The Future of Apache Flink
Virtual Flink Forward 2020: Lessons learned on Apache Flink application avail...
Scalability truths and serverless architectures
Using Real-Time Scheduling Principles in Web Service Clusters to Achieve Pred...
Flink Forward Berlin 2018: Lasse Nedergaard - "Our successful journey with Fl...
Big data unit iv and v lecture notes qb model exam
FailureEnrichers - Flink Meetup Bay Area.pptx
Flux - An open sourced Workflow orchestrator from Flipkart
Ad

More from Flink Forward (20)

PDF
Building a fully managed stream processing platform on Flink at scale for Lin...
PPTX
Evening out the uneven: dealing with skew in Flink
PPTX
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
PDF
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
PPTX
Autoscaling Flink with Reactive Mode
PDF
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
PPTX
One sink to rule them all: Introducing the new Async Sink
PPTX
Tuning Apache Kafka Connectors for Flink.pptx
PDF
Flink powered stream processing platform at Pinterest
PPTX
Using the New Apache Flink Kubernetes Operator in a Production Deployment
PPTX
The Current State of Table API in 2022
PDF
Flink SQL on Pulsar made easy
PPTX
Dynamic Rule-based Real-time Market Data Alerts
PPTX
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
PPTX
Processing Semantically-Ordered Streams in Financial Services
PDF
Tame the small files problem and optimize data layout for streaming ingestion...
PDF
Batch Processing at Scale with Flink & Iceberg
PPTX
Welcome to the Flink Community!
PPTX
Practical learnings from running thousands of Flink jobs
PPTX
Extending Flink SQL for stream processing use cases
Building a fully managed stream processing platform on Flink at scale for Lin...
Evening out the uneven: dealing with skew in Flink
“Alexa, be quiet!”: End-to-end near-real time model building and evaluation i...
Introducing BinarySortedMultiMap - A new Flink state primitive to boost your ...
Autoscaling Flink with Reactive Mode
Dynamically Scaling Data Streams across Multiple Kafka Clusters with Zero Fli...
One sink to rule them all: Introducing the new Async Sink
Tuning Apache Kafka Connectors for Flink.pptx
Flink powered stream processing platform at Pinterest
Using the New Apache Flink Kubernetes Operator in a Production Deployment
The Current State of Table API in 2022
Flink SQL on Pulsar made easy
Dynamic Rule-based Real-time Market Data Alerts
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
Processing Semantically-Ordered Streams in Financial Services
Tame the small files problem and optimize data layout for streaming ingestion...
Batch Processing at Scale with Flink & Iceberg
Welcome to the Flink Community!
Practical learnings from running thousands of Flink jobs
Extending Flink SQL for stream processing use cases

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
cuic standard and advanced reporting.pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Cloud computing and distributed systems.
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
KodekX | Application Modernization Development
20250228 LYD VKU AI Blended-Learning.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Spectral efficient network and resource selection model in 5G networks
“AI and Expert System Decision Support & Business Intelligence Systems”
cuic standard and advanced reporting.pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Programs and apps: productivity, graphics, security and other tools
Diabetes mellitus diagnosis method based random forest with bat algorithm
The AUB Centre for AI in Media Proposal.docx
Network Security Unit 5.pdf for BCA BBA.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Cloud computing and distributed systems.
Understanding_Digital_Forensics_Presentation.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
MYSQL Presentation for SQL database connectivity
KodekX | Application Modernization Development

Virtual Flink Forward 2020: Implement Reliable, Isolated & Unified Job Submission - Zili Chen