Skip to content

Scheduled autoscaling scales down to default instance_min_count around midnight #1001

@martinvisser

Description

@martinvisser

Using the following recurring schedule our application scales up at 00:00 on the 19th day of the month. We want to keep running with that same amount of instances until the end of the 27th day of the month. And we want to do that each month.

But what happens is that every night, at around 00:06 we have autoscaling events. We think this problem is due to the 00:00-23:59 start_time/end_time configuration which is round down to the minute. So, basically there is one minute between 23:59 and 0:00 where the autoscaler "thinks" there is no recurring schedule.
If not mistaken, 00:06 makes sense due to due cool down/breach settings.

Adding seconds, like 23:59:59 isn't allowed according to the API. There also doesn't seem to be an option to configure it like "from the 19th day 00:00 until the 27th day 23:59.

Any suggestions?

{
    "instance_min_count": 28,
    "instance_max_count": 36,
    "scaling_rules": [
        {
            "metric_type": "throughput",
            "breach_duration_secs": 300,
            "threshold": 60,
            "operator": "<",
            "cool_down_secs": 300,
            "adjustment": "-1"
        },
        {
            "metric_type": "throughput",
            "breach_duration_secs": 60,
            "threshold": 90,
            "operator": ">=",
            "cool_down_secs": 60,
            "adjustment": "+1"
        }
    ],
    "schedules": {
        "timezone": "Europe/Amsterdam",
        "recurring_schedule": [
            {
                "start_time": "00:00",
                "end_time": "23:59",
                "days_of_month": [
                    19,
                    20,
                    21,
                    22,
                    23,
                    24,
                    25,
                    26,
                    27
                ],
                "instance_min_count": 36,
                "instance_max_count": 36
            }
        ]
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions