Skip to content

AutoSpotting should prefer to terminate on-demand instance from the AZ with the most on-demand instances running #412

@gabegorelick

Description

@gabegorelick

Github issue

Issue type

  • Feature Idea

Summary

AutoSpotting can maintain a minimum number or percentage of on-demand instances per autoscaling group. But there's no way to force a minimum number of on-demand instances per Availability Zone. This means that all your on-demand instances could end up in the same AZ (please correct me if I'm wrong). It seems safer to distribute these instances evenly across the available AZs.

Looking at the code, getAnyUnprotectedOnDemandInstance() selects the first on-demand instance that's not protected, without taking into account how many instances would remain in the AZ. It seems like that function could be amended to select an on-demand instance from the AZ with the most on-demand instances running.

Steps to reproduce

I haven't been able to reproduce this, but that could just be because I've been lucky.

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