SlideShare a Scribd company logo
Fault Tolerance and Job
Recovery in Apache Flink™
Till Rohrmann
trohrmann@apache.org
@stsffap
2
Better be safe than sorry
 Failures will happen
 EMC estimated $1.7 billion costs due to
data loss and system downtime
 Recovery will save you time and costs
 Switch between algorithms
 Live upgrade of your system
3
Fault Tolerance
4
Fault tolerance guarantees
 At most once
• No guarantees at all
 At least once
• For many applications sufficient
 Exactly once
 Flink provides all guarantees
5
Checkpoints
 Consistent snapshots of distributed data
stream and operator state
6
Barriers
 Markers for checkpoints
 Injected in the data flow
7
8
 Alignment for multi-input operators
Operator State
 Stateless operators
 System state
 User defined state
9
ds.filter(_ != 0)
ds.keyBy(0).window(TumblingTimeWindows.of(5, TimeUnit.SECONDS))
public class CounterSum implements RichReduceFunction<Long> {
private OperatorState<Long> counter;
@Override public Long reduce(Long v1, Long v2) throws Exception {
counter.update(counter.value() + 1);
return v1 + v2;
}
@Override public void open(Configuration config) {
counter = getRuntimeContext().getOperatorState(“counter”, 0L, false);
}
}
10
11
12
13
Advantages
 Separation of app logic from recovery
• Checkpointing interval is just a config
parameter
 High throughput
• Controllable checkpointing overhead
 Low impact on latency
14
15
Cluster High Availability
16
Without high availability
17
JobManager
TaskManager
With high availability
18
JobManager
TaskManager
Stand-by
JobManager
Apache Zookeeper™
KEEP GOING
Persisting jobs
19
JobManager
Client
TaskManagers
Apache Zookeeper™
Job
1. Submit job
Persisting jobs
20
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Submit job
2. Persist execution graph
Persisting jobs
21
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Submit job
2. Persist execution graph
3. Write handle to ZooKeeper
Persisting jobs
22
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Submit job
2. Persist execution graph
3. Write handle to ZooKeeper
4. Deploy tasks
Handling checkpoints
23
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Take snapshots
Handling checkpoints
24
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Take snapshots
2. Persist snapshots
3. Send handles to JM
Handling checkpoints
25
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Take snapshots
2. Persist snapshots
3. Send handles to JM
4. Create global checkpoint
Handling checkpoints
26
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Take snapshots
2. Persist snapshots
3. Send handles to JM
4. Create global checkpoint
5. Persist global checkpoint
Handling checkpoints
27
JobManager
Client
TaskManagers
Apache Zookeeper™
1. Take snapshots
2. Persist snapshots
3. Send handles to JM
4. Create global checkpoint
5. Persist global checkpoint
6. Write handle to ZooKeeper
Conclusion
28
29
30
TL;DL
 Job recovery mechanism with low latency
and high throughput
 Exactly one processing semantics
 No single point of failure
 Flink will always keep processing
your data
31
flink.apache.org
@ApacheFlink

More Related Content

PDF
Marton Balassi – Stateful Stream Processing
PDF
Tran Nam-Luc – Stale Synchronous Parallel Iterations on Flink
PDF
Tech Talk @ Google on Flink Fault Tolerance and HA
PDF
Matthias J. Sax – A Tale of Squirrels and Storms
PDF
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...
PPTX
Architecture of Flink's Streaming Runtime @ ApacheCon EU 2015
PDF
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
PDF
Fault Tolerance and Job Recovery in Apache Flink @ FlinkForward 2015
Marton Balassi – Stateful Stream Processing
Tran Nam-Luc – Stale Synchronous Parallel Iterations on Flink
Tech Talk @ Google on Flink Fault Tolerance and HA
Matthias J. Sax – A Tale of Squirrels and Storms
Keynote: Building and Operating A Serverless Streaming Runtime for Apache Bea...
Architecture of Flink's Streaming Runtime @ ApacheCon EU 2015
Computing recommendations at extreme scale with Apache Flink @Buzzwords 2015
Fault Tolerance and Job Recovery in Apache Flink @ FlinkForward 2015

What's hot (20)

PPTX
Apache Flink Berlin Meetup May 2016
PDF
Gelly-Stream: Single-Pass Graph Streaming Analytics with Apache Flink
PDF
K. Tzoumas & S. Ewen – Flink Forward Keynote
PDF
Unified Stream and Batch Processing with Apache Flink
PDF
Flink Forward Berlin 2017: Pramod Bhatotia, Do Le Quoc - StreamApprox: Approx...
PPTX
Apache Flink at Strata San Jose 2016
PDF
Till Rohrmann - Dynamic Scaling - How Apache Flink adapts to changing workloads
PDF
Flink Forward Berlin 2017: Piotr Wawrzyniak - Extending Apache Flink stream p...
PDF
Alexander Kolb – Flink. Yet another Streaming Framework?
PDF
Stateful Distributed Stream Processing
PPTX
Data Stream Processing with Apache Flink
PDF
Christian Kreuzfeld – Static vs Dynamic Stream Processing
PPTX
Flink Forward Berlin 2017: Dongwon Kim - Predictive Maintenance with Apache F...
PPTX
Flink Forward SF 2017: Stephan Ewen - Convergence of real-time analytics and ...
PDF
Stream Processing with Apache Flink (Flink.tw Meetup 2016/07/19)
PPTX
Flink Streaming @BudapestData
PDF
Flink Forward SF 2017: Cliff Resnick & Seth Wiesman - From Zero to Streami...
PDF
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck - Pravega: Storage Rei...
PPTX
Continuous Processing with Apache Flink - Strata London 2016
PDF
Flink Forward Berlin 2017: Jörg Schad, Till Rohrmann - Apache Flink meets Apa...
Apache Flink Berlin Meetup May 2016
Gelly-Stream: Single-Pass Graph Streaming Analytics with Apache Flink
K. Tzoumas & S. Ewen – Flink Forward Keynote
Unified Stream and Batch Processing with Apache Flink
Flink Forward Berlin 2017: Pramod Bhatotia, Do Le Quoc - StreamApprox: Approx...
Apache Flink at Strata San Jose 2016
Till Rohrmann - Dynamic Scaling - How Apache Flink adapts to changing workloads
Flink Forward Berlin 2017: Piotr Wawrzyniak - Extending Apache Flink stream p...
Alexander Kolb – Flink. Yet another Streaming Framework?
Stateful Distributed Stream Processing
Data Stream Processing with Apache Flink
Christian Kreuzfeld – Static vs Dynamic Stream Processing
Flink Forward Berlin 2017: Dongwon Kim - Predictive Maintenance with Apache F...
Flink Forward SF 2017: Stephan Ewen - Convergence of real-time analytics and ...
Stream Processing with Apache Flink (Flink.tw Meetup 2016/07/19)
Flink Streaming @BudapestData
Flink Forward SF 2017: Cliff Resnick & Seth Wiesman - From Zero to Streami...
Flink Forward SF 2017: Srikanth Satya & Tom Kaitchuck - Pravega: Storage Rei...
Continuous Processing with Apache Flink - Strata London 2016
Flink Forward Berlin 2017: Jörg Schad, Till Rohrmann - Apache Flink meets Apa...
Ad

Viewers also liked (20)

PDF
Jim Dowling – Interactive Flink analytics with HopsWorks and Zeppelin
PDF
Fabian Hueske – Juggling with Bits and Bytes
PDF
Anwar Rizal – Streaming & Parallel Decision Tree in Flink
PPTX
Kamal Hakimzadeh – Reproducible Distributed Experiments
PPTX
Flink Case Study: Bouygues Telecom
PPTX
Flink 0.10 @ Bay Area Meetup (October 2015)
PDF
Sebastian Schelter – Distributed Machine Learing with the Samsara DSL
PPTX
Fabian Hueske – Cascading on Flink
PDF
Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
PPTX
Assaf Araki – Real Time Analytics at Scale
PPTX
Apache Flink Training: System Overview
PDF
Vasia Kalavri – Training: Gelly School
PDF
Introduction to Apache Flink - Fast and reliable big data processing
PDF
Albert Bifet – Apache Samoa: Mining Big Data Streams with Apache Flink
PDF
Mikio Braun – Data flow vs. procedural programming
PDF
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
PDF
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
PPTX
Apache Flink Training: DataStream API Part 1 Basic
PDF
Flink Apachecon Presentation
PPTX
Slim Baltagi – Flink vs. Spark
Jim Dowling – Interactive Flink analytics with HopsWorks and Zeppelin
Fabian Hueske – Juggling with Bits and Bytes
Anwar Rizal – Streaming & Parallel Decision Tree in Flink
Kamal Hakimzadeh – Reproducible Distributed Experiments
Flink Case Study: Bouygues Telecom
Flink 0.10 @ Bay Area Meetup (October 2015)
Sebastian Schelter – Distributed Machine Learing with the Samsara DSL
Fabian Hueske – Cascading on Flink
Maximilian Michels – Google Cloud Dataflow on Top of Apache Flink
Assaf Araki – Real Time Analytics at Scale
Apache Flink Training: System Overview
Vasia Kalavri – Training: Gelly School
Introduction to Apache Flink - Fast and reliable big data processing
Albert Bifet – Apache Samoa: Mining Big Data Streams with Apache Flink
Mikio Braun – Data flow vs. procedural programming
Marc Schwering – Using Flink with MongoDB to enhance relevancy in personaliza...
Moon soo Lee – Data Science Lifecycle with Apache Flink and Apache Zeppelin
Apache Flink Training: DataStream API Part 1 Basic
Flink Apachecon Presentation
Slim Baltagi – Flink vs. Spark
Ad

Similar to Till Rohrmann – Fault Tolerance and Job Recovery in Apache Flink (20)

PPTX
Flink 0.10 - Upcoming Features
PDF
Flink Forward SF 2017: Stephan Ewen - Experiences running Flink at Very Large...
PPTX
Where is my bottleneck? Performance troubleshooting in Flink
PPTX
Stephan Ewen - Experiences running Flink at Very Large Scale
PPTX
Apache Flink Overview at SF Spark and Friends
PDF
Apache flink
PPTX
Flexible and Real-Time Stream Processing with Apache Flink
PPTX
January 2015 HUG: Apache Flink: Fast and reliable large-scale data processing
PDF
Flink Forward San Francisco 2018: Stefan Richter - "How to build a modern str...
PPTX
Apache flink 1.0.0 overview
PPTX
Flink Streaming Hadoop Summit San Jose
PPTX
Aljoscha Krettek - The Future of Apache Flink
PPTX
Flink 1.0-slides
PDF
A look at Flink 1.2
PDF
Stefan Richter - A look at Flink 1.2 and beyond @ Berlin Meetup
PDF
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data Artisans
PPTX
2018-04 Kafka Summit London: Stephan Ewen - "Apache Flink and Apache Kafka fo...
PPTX
Apache Flink - Overview and Use cases of a Distributed Dataflow System (at pr...
PDF
Streaming Dataflow with Apache Flink
PDF
Flink Forward Berlin 2018: Steven Wu - "Failure is not fatal: what is your re...
Flink 0.10 - Upcoming Features
Flink Forward SF 2017: Stephan Ewen - Experiences running Flink at Very Large...
Where is my bottleneck? Performance troubleshooting in Flink
Stephan Ewen - Experiences running Flink at Very Large Scale
Apache Flink Overview at SF Spark and Friends
Apache flink
Flexible and Real-Time Stream Processing with Apache Flink
January 2015 HUG: Apache Flink: Fast and reliable large-scale data processing
Flink Forward San Francisco 2018: Stefan Richter - "How to build a modern str...
Apache flink 1.0.0 overview
Flink Streaming Hadoop Summit San Jose
Aljoscha Krettek - The Future of Apache Flink
Flink 1.0-slides
A look at Flink 1.2
Stefan Richter - A look at Flink 1.2 and beyond @ Berlin Meetup
Apache Flink: Better, Faster & Uncut - Piotr Nowojski, data Artisans
2018-04 Kafka Summit London: Stephan Ewen - "Apache Flink and Apache Kafka fo...
Apache Flink - Overview and Use cases of a Distributed Dataflow System (at pr...
Streaming Dataflow with Apache Flink
Flink Forward Berlin 2018: Steven Wu - "Failure is not fatal: what is your re...

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 ...
PDF
Introducing the Apache Flink Kubernetes Operator
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
Apache Flink in the Cloud-Native Era
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!
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 ...
Introducing the Apache Flink Kubernetes Operator
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
Apache Flink in the Cloud-Native Era
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!

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Cloud computing and distributed systems.
PDF
Approach and Philosophy of On baking technology
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Encapsulation theory and applications.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
A Presentation on Artificial Intelligence
20250228 LYD VKU AI Blended-Learning.pptx
Cloud computing and distributed systems.
Approach and Philosophy of On baking technology
Chapter 3 Spatial Domain Image Processing.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Spectral efficient network and resource selection model in 5G networks
MYSQL Presentation for SQL database connectivity
Encapsulation theory and applications.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...

Till Rohrmann – Fault Tolerance and Job Recovery in Apache Flink

Editor's Notes

  • #16: 30 nodes, 4 cores, 15 GB Flink 720,000 events per second per core 690,000 with checkpointing activated Storm With at-least-once: 2,600 events per second per core
  • #34: GCE 30 instances with 4 cores and 15 GB of memory each. Flink master from July, 24th, Storm 0.9.3. All the code used for the evaluation can be found here. Flink 1.5 million elements per second per core Aggregate Throughput in cluster 182 million elements per second. Storm 82,000 elements per second per core Aggregate 0.57 million elements per second Storm with Acknowledge 4,700 elements per second per core, Latency 30-120 milliseconds Trident: 75,000 elements per second per core
  • #35: Flink 0 Buffer timeout: latency median 0 msec, 99 %tile 20 msec 24,500 events per second per core