Skip to content

Appropriately incorporating the AWS InstanceScheduler #945

Closed
@wise-east

Description

@wise-east

My API doesn't have to be running 24/7, or at least until it becomes more prevalently used globally, so I would like to use the AWS InstanceScheduler to automatically start and stop EC2 instances to further reduce costs for my API's deployment. I have my app working so that once its request to an endpoint with a GPU (the instance spun up with cortex) fails, it will make a request to VM with only a CPU, so I can let the GPU instances go down when there is less demand for my API.

The instructions that I picked up from this YouTube video to set up the InstanceScheduler with EC2 instances seem pretty straightforward, but I'm worried that setting it up will somehow mess up the API's endpoints once the instances are stopped and started again. This concern is based on my previous experience, where I saw that the EC2's Public DNS (IPv4) changed each time the instance was stopped and started again.

After spinning up the cluster, I see two instances in my EC2 instance dashboard, one for the operator node of the cluster and one for the spot node. I know that cortex is doing a lot of the heavy lifting for me in the back to configure different services, so I am afraid that just naively applying tags for the scheduler I set up with AWS InstanceScheduler to these EC2 instances will mess up my API deployment.

I don't think cortex has a way to automatically schedule spinning up/down clusters or particular EC2 instances in its cluster yet, so I think using this service is the only way to go. Although I am undertaking some tests of my own using cortex with the AWS InstanceScheduler, I would appreciate any guidance regarding correctly incorporating it with instances created with cortex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions