Skip to content

Support cron-schedule-based autoscaling for MonoVertex and Pipeline vertices #3544

Description

@yhl25

Summary

Numaflow autoscaling today is purely reactive, scaling between scale.min and scale.max based on pending messages and processing rate. This proposes cron-schedule-based autoscaling: users define time windows with their own min/max bounds (including 0), and the reactive autoscaler operates within the bounds of the active window.

Use cases

  • DLQ draining via fallback sink: Numaflow supports a fallback sink, often pointed at a DLQ. Today, reprocessing DLQ messages requires a separate scheduled job. With cron-based autoscaling, the same MonoVertex/Pipeline can sit at min: 0 and scale up on a schedule to drain the DLQ, no extra infrastructure.
  • Pre-warming: scale up ahead of predictable load spikes instead of paying cold-start lag after pending builds up.
  • Cost savings: force lower bounds during known-idle windows (nights/weekends).

Proposed spec (starting point)

Extend the existing Scale struct (applies to both MonoVertex and Pipeline vertices):

scale:
  min: 0
  max: 50
  cron:
    timezone: "America/Los_Angeles"
    schedules:
      - start: "0 2 * * *"   # nightly DLQ drain
        end: "0 3 * * *"
        min: 1
        max: 5

Outside any window, base min/max apply; inside a window, its bounds override the base.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/autoscalingAuto Scaling done by the ControllerenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions