Which metric should be used for HPA activity workers in Kubernetes?

Hello,

I’m wondering how to autoscale our workers using HPA.

So, let’s say we have ServiceA, ServiceB, we’re running PHP and using roadrunner. ServiceB needs more workers. Which metric would directly represent that. temporal_activity_schedule_to_start_latency ? temporal_activity_poll_no_task? Would “backlog” figure represent it as in taskqueue describe rpc call (tctl adm tq describe --taskqueue serviceB_queue)?

In the SQS we are using ApproximateNumberOfMessagesVisible.

It seems I need far less workers with temporal/roadrunner than with regular PHP enqueue (SQS) adapter, or I’m missing something. Which would be awesome news actuall :sweat_smile:

I would start with the worker tuning guide in docs. It goes into metrics as well.

1 Like

To anyone more interested in current problems with scaling roadrunner workers for temporal read here [🐛 BUG]: Metric `temporal_activity_schedule_to_start_latency` useless with RR? · Issue #183 · temporalio/roadrunner-temporal · GitHub :upside_down_face: