SlideShare a Scribd company logo
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Flink Snapshots
A Comprehensive Guide for New Users
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Flink Snapshots
A Comprehensive Guide for New Users
Danny Cranmer
Principal Engineer at AWS
Apache Flink PMC Member
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
1. Stateful processing recap
2. Flink Checkpoints
3. State backends
4. Common problems
3
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 4
Simple Flink Example
SELECT SUM(clicks) FROM MyKafkaTopic
2
5
7
3
4
2 2
Input Output
7
14
17
21
23
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 5
Simple Flink Example
3
4
2 7
14 2
14
o6 o5 o4 o3 o2 o1
o4
In flight state
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 6
Exactly once processing
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 7
At least once processing - Duplicates
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 8
At least once processing - Duplicates
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 9
At most once processing – Dropped Records
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10
At most once processing – Dropped Records
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
1. Stateful processing recap
2. Flink Checkpoints
3. State backends
4. Common problems
11
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 12
Flink Checkpoints
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 13
Flink Checkpoints
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14
Flink Checkpoints
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 15
Flink Checkpoints
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 16
Barrier Alignment
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 17
Barrier Alignment
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 18
Barrier Alignment
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 19
Checkpoint Lifecycle
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 20
Checkpoint Lifecycle
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 21
Checkpoint Lifecycle
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 22
Checkpoint Lifecycle
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 23
Checkpointing Configuration
execution.checkpointing.interval
execution.checkpointing.min-pause
execution.checkpointing.timeout
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 24
Checkpoint Statistics
Demo
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 25
Checkpoint vs Savepoint
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
1. Stateful processing recap
2. Flink Checkpoints
3. State backends
4. Common problems
26
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 27
State Backends
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
State Backend Selection
28
state size < sum(Task Manager memory) / ?
? HashMap
: RocksDB
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
1. Stateful processing recap
2. Flink Checkpoints
3. State backends
4. Common problems
29
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30
Bottlenecks
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31
Buffer Debloating
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 32
Buffer Debloating - Disabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33
Buffer Debloating - Disabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 34
Buffer Debloating - Disabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 35
Buffer Debloating - Disabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 36
Buffer Debloating - Disabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 37
Buffer Debloating - Disabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 38
Buffer Debloating - Enabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 39
Buffer Debloating - Enabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 40
Buffer Debloating - Enabled
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 41
Buffer Debloating
taskmanager.network.memory.buffer-debloat.enabled: true
taskmanager.network.memory.buffer-debloat.target: 1s
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 42
Unaligned Checkpoints
- Checkpoint barriers jump the queue
- Records in buffers stored in the checkpoint
- Not supported for savepoints
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 43
Unaligned Checkpoints
env.getCheckpointConfig().enableUnalignedCheckpoints();
execution.checkpointing.unaligned: true
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 44
Incremental Checkpoints
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 45
Incremental Checkpoints
env.setStateBackend(new RocksDBStateBackend(filebackend, true));
state.backend.incremental: true
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Load Test/Skew
46
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Load Test/Skew
47
FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Danny Cranmer
Principal Engineer at AWS
Apache Flink PMC Member

More Related Content

PDF
Making Sense of Apache Flink: A Fearless Introduction
PDF
Getting Data In and Out of Flink - Understanding Flink and Its Connector Ecos...
PDF
Deeply Declarative Data Pipelines
PDF
What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019
PDF
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
PDF
Introducing the Apache Flink Kubernetes Operator
PDF
Apples and Oranges - Comparing Kafka Streams and Flink with Bill Bejeck
PDF
Spark shuffle introduction
Making Sense of Apache Flink: A Fearless Introduction
Getting Data In and Out of Flink - Understanding Flink and Its Connector Ecos...
Deeply Declarative Data Pipelines
What's the time? ...and why? (Mattias Sax, Confluent) Kafka Summit SF 2019
Improving SparkSQL Performance by 30%: How We Optimize Parquet Pushdown and P...
Introducing the Apache Flink Kubernetes Operator
Apples and Oranges - Comparing Kafka Streams and Flink with Bill Bejeck
Spark shuffle introduction

What's hot (20)

PDF
Improving Apache Spark's Reliability with DataSourceV2
PPTX
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
PPTX
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
PDF
Understanding Data Consistency in Apache Cassandra
PDF
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
PDF
Flink 2.0: Navigating the Future of Unified Stream and Batch Processing
PPTX
Evening out the uneven: dealing with skew in Flink
PPTX
Real-time Stream Processing with Apache Flink
PDF
The Power of SPL
PDF
Introduction To Flink
PDF
Changelog Stream Processing with Apache Flink
PDF
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...
PDF
Apache Cassandra Multi-Datacenter Essentials (Julien Anguenot, iLand Internet...
PPTX
Stream Processing Frameworks
PDF
Dive into PySpark
PDF
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
PDF
Apache flink
PPTX
Where is my bottleneck? Performance troubleshooting in Flink
PDF
Hardening Kafka Replication
PDF
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Improving Apache Spark's Reliability with DataSourceV2
Exactly-Once Financial Data Processing at Scale with Flink and Pinot
How to build a streaming Lakehouse with Flink, Kafka, and Hudi
Understanding Data Consistency in Apache Cassandra
Virtual Flink Forward 2020: Autoscaling Flink at Netflix - Timothy Farkas
Flink 2.0: Navigating the Future of Unified Stream and Batch Processing
Evening out the uneven: dealing with skew in Flink
Real-time Stream Processing with Apache Flink
The Power of SPL
Introduction To Flink
Changelog Stream Processing with Apache Flink
Everyday I'm Shuffling - Tips for Writing Better Spark Programs, Strata San J...
Apache Cassandra Multi-Datacenter Essentials (Julien Anguenot, iLand Internet...
Stream Processing Frameworks
Dive into PySpark
Tzu-Li (Gordon) Tai - Stateful Stream Processing with Apache Flink
Apache flink
Where is my bottleneck? Performance troubleshooting in Flink
Hardening Kafka Replication
Simplify Data Conversion from Spark to TensorFlow and PyTorch
Ad

Similar to Flink Snapshots: A Comprehensive Guide for New Users (20)

PDF
Hands-On Lab: Test Drive the Enhanced HTML5 Dashboard Designer With Release 8...
PDF
Eclipse-Based User Interfaces for CA Endevor SCM and CA Testing Tool
PDF
robsable_Enhancing DevOps Practices with CloudWatch APM FINAL.pdf
PDF
Apache JMeter from the Ground Up
PDF
AWS Reinvent 2020 - Recap Amazon Builder's Library session
PDF
Airheads dallas 2011 rap troubleshooting
PPTX
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
PDF
Hands-On Labs: Introduction to CA Unified Infrastructure Management
PDF
Hands-On Lab: From Zero to Compliance Using CA Software Asset Management
PDF
Pre-Con Ed: Build Your Own Apps for an Enhanced Network Management Experience...
PDF
What's new in AWS for developers? - AWS reInvent recap 2025
PPTX
Generating a custom Ruby SDK for your web service or Rails API using Smithy
PDF
Real World Problem Solving Using Application Performance Management 10
PDF
Implementation and Use of Generic VTAM Resources with Parallel SYSPLEX Features
PDF
Hands-On Lab: Tune CA Performance Management for an Optimal Network Performan...
PDF
Continuous Delivery on AWS with Zero Downtime
PDF
Extending Jenkins to the Mainframe. A Simpler Approach.
PPTX
All levels of performance testing and monitoring in web-apps
PDF
Case Study: VF Corporation Takes a Practical Approach to Improving its MOJO w...
PPTX
apidays LIVE New York 2021 - APIOps: automating API operations for speed and ...
Hands-On Lab: Test Drive the Enhanced HTML5 Dashboard Designer With Release 8...
Eclipse-Based User Interfaces for CA Endevor SCM and CA Testing Tool
robsable_Enhancing DevOps Practices with CloudWatch APM FINAL.pdf
Apache JMeter from the Ground Up
AWS Reinvent 2020 - Recap Amazon Builder's Library session
Airheads dallas 2011 rap troubleshooting
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
Hands-On Labs: Introduction to CA Unified Infrastructure Management
Hands-On Lab: From Zero to Compliance Using CA Software Asset Management
Pre-Con Ed: Build Your Own Apps for an Enhanced Network Management Experience...
What's new in AWS for developers? - AWS reInvent recap 2025
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Real World Problem Solving Using Application Performance Management 10
Implementation and Use of Generic VTAM Resources with Parallel SYSPLEX Features
Hands-On Lab: Tune CA Performance Management for an Optimal Network Performan...
Continuous Delivery on AWS with Zero Downtime
Extending Jenkins to the Mainframe. A Simpler Approach.
All levels of performance testing and monitoring in web-apps
Case Study: VF Corporation Takes a Practical Approach to Improving its MOJO w...
apidays LIVE New York 2021 - APIOps: automating API operations for speed and ...
Ad

More from HostedbyConfluent (20)

PDF
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
PDF
Renaming a Kafka Topic | Kafka Summit London
PDF
Evolution of NRT Data Ingestion Pipeline at Trendyol
PDF
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
PDF
Exactly-once Stream Processing with Arroyo and Kafka
PDF
Fish Plays Pokemon | Kafka Summit London
PDF
Tiered Storage 101 | Kafla Summit London
PDF
Building a Self-Service Stream Processing Portal: How And Why
PDF
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
PDF
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
PDF
Navigating Private Network Connectivity Options for Kafka Clusters
PDF
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
PDF
Explaining How Real-Time GenAI Works in a Noisy Pub
PDF
TL;DR Kafka Metrics | Kafka Summit London
PDF
A Window Into Your Kafka Streams Tasks | KSL
PDF
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
PDF
Data Contracts Management: Schema Registry and Beyond
PDF
Code-First Approach: Crafting Efficient Flink Apps
PDF
Debezium vs. the World: An Overview of the CDC Ecosystem
PDF
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Renaming a Kafka Topic | Kafka Summit London
Evolution of NRT Data Ingestion Pipeline at Trendyol
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Exactly-once Stream Processing with Arroyo and Kafka
Fish Plays Pokemon | Kafka Summit London
Tiered Storage 101 | Kafla Summit London
Building a Self-Service Stream Processing Portal: How And Why
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Navigating Private Network Connectivity Options for Kafka Clusters
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Explaining How Real-Time GenAI Works in a Noisy Pub
TL;DR Kafka Metrics | Kafka Summit London
A Window Into Your Kafka Streams Tasks | KSL
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Data Contracts Management: Schema Registry and Beyond
Code-First Approach: Crafting Efficient Flink Apps
Debezium vs. the World: An Overview of the CDC Ecosystem
Beyond Tiered Storage: Serverless Kafka with No Local Disks

Recently uploaded (20)

PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Encapsulation theory and applications.pdf
PPTX
Big Data Technologies - Introduction.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Encapsulation theory and applications.pdf
Big Data Technologies - Introduction.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
20250228 LYD VKU AI Blended-Learning.pptx
Encapsulation_ Review paper, used for researhc scholars
Understanding_Digital_Forensics_Presentation.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced methodologies resolving dimensionality complications for autism neur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding

Flink Snapshots: A Comprehensive Guide for New Users

  • 1. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Flink Snapshots A Comprehensive Guide for New Users
  • 2. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Flink Snapshots A Comprehensive Guide for New Users Danny Cranmer Principal Engineer at AWS Apache Flink PMC Member
  • 3. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda 1. Stateful processing recap 2. Flink Checkpoints 3. State backends 4. Common problems 3
  • 4. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 4 Simple Flink Example SELECT SUM(clicks) FROM MyKafkaTopic 2 5 7 3 4 2 2 Input Output 7 14 17 21 23
  • 5. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 5 Simple Flink Example 3 4 2 7 14 2 14 o6 o5 o4 o3 o2 o1 o4 In flight state
  • 6. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 6 Exactly once processing
  • 7. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 7 At least once processing - Duplicates
  • 8. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 8 At least once processing - Duplicates
  • 9. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 9 At most once processing – Dropped Records
  • 10. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 10 At most once processing – Dropped Records
  • 11. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda 1. Stateful processing recap 2. Flink Checkpoints 3. State backends 4. Common problems 11
  • 12. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 12 Flink Checkpoints
  • 13. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 13 Flink Checkpoints
  • 14. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 14 Flink Checkpoints
  • 15. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 15 Flink Checkpoints
  • 16. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 16 Barrier Alignment
  • 17. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 17 Barrier Alignment
  • 18. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 18 Barrier Alignment
  • 19. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 19 Checkpoint Lifecycle
  • 20. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 20 Checkpoint Lifecycle
  • 21. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 21 Checkpoint Lifecycle
  • 22. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 22 Checkpoint Lifecycle
  • 23. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 23 Checkpointing Configuration execution.checkpointing.interval execution.checkpointing.min-pause execution.checkpointing.timeout
  • 24. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 24 Checkpoint Statistics Demo
  • 25. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 25 Checkpoint vs Savepoint
  • 26. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda 1. Stateful processing recap 2. Flink Checkpoints 3. State backends 4. Common problems 26
  • 27. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 27 State Backends
  • 28. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. State Backend Selection 28 state size < sum(Task Manager memory) / ? ? HashMap : RocksDB
  • 29. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Agenda 1. Stateful processing recap 2. Flink Checkpoints 3. State backends 4. Common problems 29
  • 30. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 30 Bottlenecks
  • 31. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 31 Buffer Debloating
  • 32. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 32 Buffer Debloating - Disabled
  • 33. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 33 Buffer Debloating - Disabled
  • 34. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 34 Buffer Debloating - Disabled
  • 35. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 35 Buffer Debloating - Disabled
  • 36. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 36 Buffer Debloating - Disabled
  • 37. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 37 Buffer Debloating - Disabled
  • 38. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 38 Buffer Debloating - Enabled
  • 39. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 39 Buffer Debloating - Enabled
  • 40. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 40 Buffer Debloating - Enabled
  • 41. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 41 Buffer Debloating taskmanager.network.memory.buffer-debloat.enabled: true taskmanager.network.memory.buffer-debloat.target: 1s
  • 42. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 42 Unaligned Checkpoints - Checkpoint barriers jump the queue - Records in buffers stored in the checkpoint - Not supported for savepoints
  • 43. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 43 Unaligned Checkpoints env.getCheckpointConfig().enableUnalignedCheckpoints(); execution.checkpointing.unaligned: true
  • 44. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 44 Incremental Checkpoints
  • 45. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. 45 Incremental Checkpoints env.setStateBackend(new RocksDBStateBackend(filebackend, true)); state.backend.incremental: true
  • 46. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Load Test/Skew 46
  • 47. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Load Test/Skew 47
  • 48. FLINK SNAPSHOTS: A COMPREHENSIVE GUIDE FOR NEW USERS © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. Danny Cranmer Principal Engineer at AWS Apache Flink PMC Member