Skip to content

AWS sqs scaler to support scaleOnDelayed #4377

@ding1992

Description

@ding1992

Proposal
Similar to scaleOnInFlight, it'd be appreciated if we could have scaleOnDelayed to indicate whether messageDelayed metric should be counted in to a trigger check.

Use Case
Our service consumes messages from SQS, queue them internally and deletes them from SQS immediately (we can't change this at the moment).
Hence it's possible that scale down would happen while the service is still processing the messages, because SQS is already empty.
We could set a longer cooldownPeriod (e.g. 30mins), but it's still possible that our service could consume and delete new messages between two polling checks (hence 30mins cool down is not refreshed).

If scaleOnDelayed is available, we could set delaySeconds = 10s when we add messages to the queue, and pollingInterval=5s.
This way 30mins cool down would always be refreshed when there is a new message.

Is this a feature you are interested in implementing yourself?
Maybe

Anything else?
No

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleAll issues that are marked as stale due to inactivity

    Type

    No type

    Projects

    Status

    Ready To Ship

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions