You are viewing content from a past/completed QCon

Presentation: Custom, Complex Windows @Scale Using Apache Flink

Track: Stream Processing In The Modern Age

Location: Bayview AB

Day of week: Tuesday

Slides: Download Slides

Level: Intermediate - Advanced

Persona: Data Engineering

Share this on:

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


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 ( is an open-source stream processing framework for distributed, high-performing, always-available, and accurate data streaming applications.


What's the focus of your work?


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.


Are there any other technologies have you been using?


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.


Why did Flink win out for you?


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.


Which persona is your talk targeted to?


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.


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


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.


What's the focus of your talk?


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.


What technology problem keeps you up at night?


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

2020 Tracks

  • Non-Technical Skills for Technical Folks

    To be an effective engineer, requires more than great coding skills. Learn the subtle arts of the tech lead, including empathy, communication, and organization.

  • Clientside: From WASM to Browser Applications

    Dive into some of the technologies that can be leveraged to ultimately deliver a more impactful interaction between the user and client.

  • Languages of Infra

    More than just Infrastructure as a Service, today we have libraries, languages, and platforms that help us define our infra. Languages of Infra explore languages and libraries being used today to build modern cloud native architectures.

  • Mechanical Sympathy: The Software/Hardware Divide

    Understanding the Hardware Makes You a Better Developer

  • Paths to Production: Deployment Pipelines as a Competitive Advantage

    Deployment pipelines allow us to push to production at ever increasing volume. Paths to production looks at how some of software's most well known shops continuous deliver code.

  • Java, The Platform

    Mobile, Micro, Modular: The platform continues to evolve and change. Discover how the platform continues to drive us forward.

  • Security for Engineers

    How to build secure, yet usable, systems from the engineer's perspective.

  • Modern Data Engineering

    The innovations necessary to build towards a fully automated decentralized data warehouse.

  • Machine Learning for the Software Engineer

    AI and machine learning are more approachable than ever. Discover how ML, deep learning, and other modern approaches are being used in practice by Software Engineers.

  • Inclusion & Diversity in Tech

    The road map to an inclusive and diverse tech organization. *Diversity & Inclusion defined as the inclusion of all individuals in an within tech, regardless of gender, religion, ethnicity, race, age, sexual orientation, and physical or mental fitness.

  • Architectures You've Always Wondered About

    How do they do it? In QCon's marquee Architectures track, we learn what it takes to operate at large scale from well-known names in our industry. You will take away hard-earned architectural lessons on scalability, reliability, throughput, and performance.

  • Architecting for Confidence: Building Resilient Systems

    Your system will fail. Build systems with the confidence to know when they do and you won’t.

  • Remotely Productive: Remote Teams & Software

    More and more companies are moving to remote work. How do you build, work on, and lead teams remotely?

  • Operating Microservices

    Building and operating distributed systems is hard, and microservices are no different. Learn strategies for not just building a service but operating them at scale.

  • Distributed Systems for Developers

    Computer science in practice. An applied track that fuses together the human side of computer science with the technical choices that are made along the way

  • The Future of APIs

    Web-based API continue to evolve. The track provides the what, how, and why of future APIs, including GraphQL, Backend for Frontend, gRPC, & ReST

  • Resurgence of Functional Programming

    What was once a paradigm shift in how we thought of programming languages is now main stream in nearly all modern languages. Hear how software shops are infusing concepts like pure functions and immutablity into their architectures and design choices.

  • Social Responsibility: Implications of Building Modern Software

    Software has an ever increasing impact on individuals and society. Understanding these implications helps build software that works for all users