Menu
InfoQ Architecture·September 16, 2026

Lyft's Migration to Apache Flink Kubernetes Operator for Stream Processing

Lyft successfully migrated its hundreds of production Apache Flink jobs from an in-house Kubernetes operator to the open-source Apache Flink Kubernetes Operator. This transition addressed critical issues like complex upgrades, inefficient autoscaling, and unreliable rollbacks in their legacy system, ultimately leading to significant cost savings and improved operational efficiency for their streaming fleet.

Read original on InfoQ Architecture

Lyft's journey to standardize its stream processing infrastructure highlights common challenges faced by companies operating large-scale data pipelines. Their initial in-house Flink operator, while serving its purpose in the absence of mature open-source alternatives, eventually became a maintenance burden due to the rapid evolution of Flink and Kubernetes ecosystems. This scenario underscores the build vs. buy dilemma in infrastructure engineering and the long-term total cost of ownership of custom solutions.

Motivations for Migration

  • Maintenance Overhead: Each Flink upgrade required significant rework on the in-house operator.
  • Autoscaling Gaps: The legacy operator lacked robust in-place autoscaling capabilities, leading to overprovisioning.
  • Unreliable Rollbacks & Upgrades: Dual-deployment upgrades were complex, manual, and prone to failure due to missing retry logic or idempotency for savepoint triggers.
  • Resource Inefficiency: A single `systemMemoryFraction` knob for non-JVM memory led to either OOM errors or wasted resources, especially for Python-based Apache Beam jobs.

Architectural Improvements with Apache Flink Kubernetes Operator

The adoption of the Apache Flink Kubernetes Operator brought several key architectural improvements, transforming how Lyft manages its streaming workloads:

  • First-Class Last-State Upgrades: The Apache operator inherently supports restoring from high-availability metadata or the latest checkpoint, even if the JobManager is unhealthy, simplifying upgrades significantly.
  • In-place Autoscaling & Resource Autotuning: Leveraging Flink 1.19, Lyft gained the ability to scale parallelism without restarting jobs (for critical workloads) and to autotune container memory, optimizing resource usage. This required a strategic decision to split features by criticality, as autotuning (which requires restarts) conflicts with in-place autoscaling.
  • Enhanced Blue/Green Deployments: Lyft adopted FlinkBlueGreenDeployment, a custom resource definition (CRD) that enables new versions to run alongside old ones before cutover, minimizing downtime compared to the previous stop-then-start deployments.
  • Improved Memory Management: By moving Beam Python harnesses to dedicated sidecars with their own resource limits, Lyft addressed OOM issues and reclaimed JVM overhead, improving stability and efficiency.
💡

Key Takeaway for Stream Processing Infrastructures

When designing a stream processing platform, consider how to handle upgrades, autoscaling, and resource management. Leveraging mature open-source operators like the Apache Flink Kubernetes Operator can significantly reduce operational burden and provide robust features out-of-the-box, allowing teams to focus on business logic rather than infrastructure mechanics.

Apache FlinkKubernetesStream ProcessingDevOpsAutoscalingContainerizationInfrastructure MigrationData Pipelines

Comments

Loading comments...