issues
search
Cloudy-Networks
/
cloudydeploys
Deploy infrastructure for games and more in the free tier of AWS
0
stars
0
forks
source link
Spot Instance Chaining
#10
Open
ckx
opened
3 years ago
ckx
commented
3 years ago
Setup VPC
Setup Security-Groups
Setup On-demand instance, pull data from S3
Run Spot Watch
Create a spot instance request
Request gets fulfilled
Put Spot Watch on the spot instance via S3
Spot watch runs, checking instance metadata for an interrupt
When interrupt is found, Spot Watch creates Lambda function to create new Spot Request
Upload persistent data to S3 bucket
IF new spot request is fulfilled within 2 minutes, move everything to new spot instance
Pull data from S3
Run Spot Watch, start cycle over again from Step 4
ELSE, create on-demand instance
Run Spot Watch on-demand, checking the spot request status
IF no request exists, create one.
Pull data from S3
When Spot Request is fulfilled, move data over to new Spot Instance, Start cycle again from Step 7.