Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
/ seespot Public archive

AWS Spot instance health check with termination and clean up support

License

Notifications You must be signed in to change notification settings

abhiyerra/seespot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

No longer maintained.

SeeSpot

When a Spot Instance is about to terminate there is a 2 minute window before the termination actually happens. SeeSpot is a utility for AWS Spot instances that handles the health check. If used with an AWS ELB it also handles cleanup of the instance when a Spot Termination notice is sent.

Usage

seespot -health-port=8686 -health-path=/health -app-health="https://localhost:8080/health" -cleanup-task=/path/to/cleanup.sh
$ seespot -help
Usage of ./seespot:
  -app-health string
        Application health check (default "http://127.0.0.1:8080/health")
  -cleanup-task string
        Script to run upon termination
  -health-path string
        Default health path the Load Balancer hits (default "/health")
  -health-port string
        Default health port to use with Load Balancers (default ":8686")

This should be run within an upstart or systemd unit file.

Description

SeeSpot watches for a termination notification every 5 seconds and upon notification closes off the health check on the application and initiates the cleanup tasks. If no termination notice is found then it continues to run.

This provides the following:

  • Make sure there are not new connections being made while the instance is going down.
  • Take care of removing machine from ELBs via the health check.
  • Take care of the Application health check.

Project of Acksin

Acksin is building DevOps tools to help you Innovate Fast while Being Green. Check out some of our tools: Acksin, ParkingSpot, opsZero. We also offer Consulting Services for your DevOps needs.

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

About

AWS Spot instance health check with termination and clean up support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages