Need suggestion in scale worker from 0 to 1 with keda

We have a workflow that only run seldomly and the workflow is not latency sensitive so we would like to find a way to scale to 0 when no running activity and scale to 1 or more when there’s work comes in.

It seems temporal’s overall suggestion is using worker_task_slots_available or activity_schedule_to_start_latency to scale worker, but I guess both won’t work well for 0->1 scale. And what we need is the task queue length. Unfortunately, I cannot find any metric that reflects that.

I also find this similar topic: Worker integration with KEDA scaling It seems temporal team will work with keda to add more metric to support, not sure if anyone can share the timeline?

Hi @ddj

I think for now, you will need at least one worker running or have a way, externally, to start a worker when there is work coming.

There is an issue open for Keda. You can watch Add workers autoscaling through KEDA · Issue #33 · temporalio/temporal · GitHub; there is no ETA I am aware of.

Regards,
Antonio