Feature Request: Scale-Down Timer Based on Time Since Last API Call #1254
Unanswered
EinavDanielDX
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
tl;dr:
I'm requesting a feature to trigger scale-down only after X seconds since the last API call to a service.
Use Case:
I deploy services on spot servers (which can be unstable and may go down and up unexpectedly). The workload is very light most of the day—often with long periods of inactivity. Under these circumstances, I’d like to maintain a single replica of my services. However, once an API call is received, I need the services to scale up to 2 replicas to provide redundancy. Crucially, after the last API call, these services should remain scaled to 2 replicas for at least 30 minutes.
What I Tried:
Scaling Metric Configuration:
I attempted to use the following config:
Unfortunately, this did not achieve the desired behavior.
Manual HPA Configuration:
I also tried manually editing the ScaledObject with the following configuration:
However, this configuration counts the time from the first API call, not the last API call, meaning that the scale-down timer doesn't reset with subsequent API calls.
Feature Request:
I would greatly appreciate a feature that allows the scale-down timer to reset with each new API call. Essentially, after an API call is received, the system should wait at least 30 minutes from the most recent API call before scaling down. This would better suit my use case and potentially benefit others with similar requirements.
Thank you for your time and consideration. I’m looking forward to your thoughts and any alternative practices you might suggest!
Beta Was this translation helpful? Give feedback.
All reactions