Presentation: Custom, Complex Windows @Scale Using Apache Flink

Track: Stream Processing In The Modern Age

Location: Bayview AB

Day of week:

Slides: Download Slides

Level: Intermediate - Advanced

Persona: Data Engineering

What You’ll Learn

  • Hear about Apache Flink’s many benefits—what it can do that others cannot
  • Learn about the flexibility and power of Apache Flink’s window API
  • Discover techniques on how to implement your own custom windows in Apache Flink

Abstract

100 Million members in over 190 countries leads to more than 1 Trillion events and 3 PB of data flowing through Netflix’s real-time data infrastructure each day. We’ve built a data pipeline in the cloud that reliably collects and routes these events to a variety of sinks. The data in these events are are used in several ways; from personalizing the customer experience to business intelligence.

The windowing capabilities offered by most stream processing engines are limited to aligned windows of a fixed duration. However, many real-world event processing use cases don’t fit this rigid structure, resulting in awkward processing pipelines. There haven’t been good alternatives, until recently that is. Apache Flink* offers a rich Window API that supports implementing unaligned windows of varying duration. In this talk, Matt Zimmer will discuss using this API to aggregate events into windows customized along varying definitions of a session. He will talk about implementation details such as:

  • Handling out-of-order events
  • Limiting state build-up while aggregating a subset of events from an event stream
  • Periodically emitting early results
  • Creating windows bounded by a type of event

Attendees will leave this talk with practical techniques and knowledge to implement their own custom windows in Apache Flink.

* Apache Flink (https://flink.apache.org/) is an open-source stream processing framework for distributed, high-performing, always-available, and accurate data streaming applications.

Question: 

What's the focus of your work?

Answer: 

Recently, I’ve primarily been building data platforms. That is, platforms to enable Data and Software Engineers to collect and process data.

That's been the focus of my work since about 2013, which recently led me to working with Apache Flink.

Question: 

Are there any other technologies have you been using?

Answer: 

We have a Spark installation here, and naturally Spark Streaming. A team also built a cloud native stream processing system from the ground up called Mantis. The platform that our data pipeline was built on used Kafka and Samza as a pair. Samza was primarily used just for very light use cases - very simple transformations. It was also used to route messages from Kafka to different sinks. It was a natural next step to introduce richer stream processing and offer that to our consumers. That's when we started to look at different technologies. Given all of the use cases that we wanted to support, Apache Flink was the best fit.

Question: 

Why did Flink win out for you?

Answer: 

Flink won out on several fronts. Key amongst them were: native streaming (event by event processing), an amazing asynchronous distributed checkpointing mechanism which enables robust recovery, and a really great network stack with elegant back-pressure. Another feature, and the subject of my talk, is the window API that allows you to implement very nuanced, featureful windowing capabilities that aren't there out of the box.

Question: 

Which persona is your talk targeted to?

Answer: 

The talk targets Data and Software Engineers who want an advanced talk on windowing. I will, however, offer some introductory concepts so this talk will be accessible to an eager learner.

Question: 

What would you like attendees to leave with from your talk?

Answer: 

I'd like them to come away with an understanding of a key advantage of Apache Flink, and when it's appropriate for them. Many people are already aware what the other choices offer (e.g., Spark Streaming, Samza, Trident/Heron, etc.). Apache Flink is seen as relatively new, but it's been around for a long time (since 2008). In terms of getting mindshare though, it's relatively new on the scene. So, I’m also hoping to help awareness and adoption increase.

Question: 

What's the focus of your talk?

Answer: 

I'll essentially present Apache Flink windowing capabilities. The subject of the talk is “Bounding a Window by Types of Events.” This requires a system that supports unaligned windows and has an extensible window API. Most of the other stream processing systems offer predefined window types that are aligned - by aligned I mean that the window fires at a regular interval aligned on wall clock time.

Question: 

What technology problem keeps you up at night?

Answer: 

With all of the data that we have available flowing from many devices and systems, the big challenge at this point is extracting useful information. So, creating platforms for people in the data engineering and data science field to be able to do that with ease - to really allow them to focus as much on their problem and their domain, rather than on the nuts and bolts of the infrastructure pieces… this is something that is a strong focus for me at this point.

Speaker: Matt Zimmer

Real-time Data Infrastructure Senior Engineer @Netflix

Matt Zimmer has been creating software for 17 years. His current role is Senior Software Engineer at Netflix. This is Matt's third tour of duty there. Previous tours include roles leading the Playback Data Systems team and as an Engineer on the Streaming Server team. A notable feature he was involved in was Streaming Profiles, ending the scourge of children's shows littering the movie lists of parents around the globe. Engagements prior to Netflix include StumbleUpon, Intuit, Sightline Systems, and EMC. Matt's formal training is in music and he played trumpet professionally for ten years before teaching himself to program.

Find Matt Zimmer at

Similar Talks

Evolution of Edge @Netflix

Qcon

Engineering Leader @Netflix

Vasily Vlasov

Mistakes and Discoveries While Cultivating Ownership

Qcon

Engineering Manager @Netflix in Cloud Infrastructure

Aaron Blohowiak

Monitoring and Tracing @Netflix Streaming Data Infrastructure

Qcon

Architect & Engineer in Real Time Data Infrastructure Team @Netflix

Allen Wang

Future of Data Engineering

Qcon

Distinguished Engineer @WePay

Chris Riccomini

Coding without Complexity

Qcon

CEO/Cofounder @darklang

Ellen Chisa

Holistic EdTech & Diversity

Qcon

Holistic Tech Coach @unlockacademy

Antoine Patton