Netflix's Flink Autoscaling Journey: Build vs. Buy

Alps Wang

Alps Wang

Aug 22, 2026 · 1 views

The Netflix Tech Blog article, 'A Tale of Two Flink Autoscalers,' offers a compelling narrative of their journey from a homegrown autoscaling solution to adopting the Apache Flink community's offering. The key insight lies in the validation of the 'adopt, then extend' philosophy, demonstrating that even at massive scale, leveraging mature open-source projects can be more effective than maintaining bespoke infrastructure. The article meticulously details the limitations of their initial 'outside-in' approach, particularly its inability to handle complex, multi-operator Flink jobs and its reliance on potentially opaque external metrics. The shift to the Flink community's 'inside-out' autoscaler, which reasons about True Processing Rate (TPR) per operator, is presented as a significant leap forward, enabling finer-grained control and adaptation to intricate job topologies. This transition is not just a technical upgrade but a strategic decision that allowed Netflix to reduce costs, improve efficiency, and streamline their operational surface area. The detailed explanation of the challenges encountered during adoption, such as metric collection at high parallelism and preserving forward chaining, highlights the practical hurdles in integrating community solutions into large, existing platforms. These challenges were met with significant contributions back to the Flink project, showcasing a healthy symbiotic relationship between a large user and an open-source community.

What's particularly noteworthy is the emphasis on the critical role of metrics. The authors rightly point out that algorithm sophistication pales in comparison to the quality and trustworthiness of the underlying metrics. The article also underscores the importance of sensible defaults coupled with tunable parameters for platform-level managed jobs, allowing for broad applicability while accommodating edge cases. The economic impact, with a reported $1.1 million annual savings for one team, is a powerful testament to the benefits of effective autoscaling. The discussion around the trade-off between aggressive scaling and stability, leading to a lower target utilization (0.45 vs. 0.7), provides practical guidance for optimizing for robustness. The forward-looking statement about Flink 2's disaggregated state architecture and its potential to alleviate state recovery bottlenecks during scaling is also a crucial point for anyone managing stateful stream processing. However, a potential limitation could be the depth of detail on the 'why' behind certain architectural choices for their internal platform (e.g., Temporal workflows), which might be less accessible to those without similar infrastructure. Additionally, while the article highlights successful contributions, the exact nature and impact of their internal Flink fork changes could be further elaborated for broader community benefit beyond immediate adoption.

This article is immensely beneficial for organizations running Apache Flink at scale, especially those struggling with resource provisioning for diverse and dynamic workloads. Developers and operators of stateful stream processing applications, whether using Flink or other frameworks, will find the lessons on metrics, scaling strategies, and the build-vs-buy decision highly relevant. The technical details on TPR calculation, forward chaining detection, and sink limit considerations are invaluable for anyone looking to implement or improve their autoscaling mechanisms. The comparison between the two autoscaler approaches clearly illustrates the evolution of capabilities within the Flink ecosystem. For those managing large fleets of Flink jobs, the detailed account of integrating the OSS autoscaler into Netflix's custom control plane, using Temporal, offers a practical blueprint. The insights into optimizing for stability over pure efficiency, and the anticipation of Flink 2's state management improvements, position this article as a forward-thinking resource for the stream processing community. It serves as a strong case study for how large enterprises can effectively engage with and contribute to open-source projects to solve complex operational challenges.

Key Points

  • Netflix runs two Flink autoscalers: a homegrown one and the Apache Flink community's.
  • The homegrown autoscaler, while functional, had limitations in handling complex, multi-operator jobs and relied on external metrics.
  • The Apache Flink community autoscaler, operating 'inside-out,' reasons about True Processing Rate (TPR) per operator, enabling finer-grained scaling.
  • Adoption of the OSS autoscaler led to significant cost savings (e.g., $1.1 million annually for one team) and improved efficiency.
  • Key challenges in adoption included high-parallelism metric collection and preserving forward chaining, addressed through contributions to Flink.
  • The article emphasizes that metric choice is more critical than algorithm sophistication.
  • Sensible defaults with per-job tuning capabilities are crucial for platform-level managed jobs.
  • The 'adopt, then extend' philosophy guided the strategic migration from the homegrown solution to the OSS one.
  • Future improvements are anticipated with Flink 2's disaggregated state architecture to reduce state recovery bottlenecks.

Article Image


📖 Source: A Tale of Two Flink Autoscalers

Comments (0)

No comments yet. Be the first to comment!