Skip to content

raids/dusk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dusk

Make use of spare EC2 capacity.

A user is billed for an EC2 instance for each hour it is in a "running" state. Partial hours are rounded up to a full hour and billed as one.

Dusk allows engineers to donate superfluous EC2 running time to a cause of their choosing.

As an example, if an instance is to be terminated 15 minutes into a billing-hour, it will instead install the Folding@Home client and spend the remainder of it's paid-for time performing protein folding and sending results back to Stanford University. This example can be extended to any number of computational grid computing problems, such as prime number discovery and so on.

Code: https://github.com/raids/dusk

Architecture

Dusk is composed of a CLI tool as well as some short-lived infrastructure in AWS per termination.

The CLI tool is essentially a wrapper around the "ec2 terminate-instances" command, where it performs the following:

  • Calculates the remaining time until the next instance-hour cost is incurred
  • Creates a cron expression from this time (required for a CloudWatch Event Rule)
  • Launches a Cloudformation stack containing the orchestration to terminate the instance at the scheduled time
  • TODO: Interacts with SSM to tell the instance to perform a predefined action (via an SSM document), or create an SSM document on the fly

We hope to shine a spotlight on the potential impact the superfluous instance running time could have and promote donating invaluable resources to scientific research projects to assist in important areas such as cancer research.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages