Time-based Scaling for a Lab

18 views
Skip to first unread message

Jay Farschman

unread,
Nov 6, 2015, 11:55:35 AM11/6/15
to scalr-discuss
I'm looking at the possibility of building our engineering lab into AWS where we will be charged 24/7, but my individual engineers don't work 24/7 so time-based scaling.  Anyone else working with this use case?  It mostly works.  I got the idea from moua in #scalr IRC.

Inside the Farm Role:
  • Set Minimum instance = 0 and and Maximum > 0
  • Add a scaling rules based on "DateAndTime"
  • Schedule some rules e.g. 
    • 1 instance(s), between 7:45 AM and 5:00 PM on Mon, Tue, Wed, Thu, Fri
    • 0 instance(s), between 5:15 PM and 11:45 PM on Mon, Tue, Wed, Thu, Fri
    • 0 instance(s), between 12:00 AM and 7:30 AM on Mon, Tue, Wed, Thu, Fri
    • weekend rule... etc.
  • Set "Termination Preferences"
    • Scaling Behavior = Resume / Suspend
    • Consider Suspended Server = Terminated
  • Skip waiting the full billing period
Done.  Now Lab servers suspend after work hours and spin up before the workday.  Now I have a Farm that's 1/4 of the cost.

PROBLEMS
Really, I have three right now.  
  • MYSQL ROLE FAILS - I built this in the "3-Tiered App" Farm and it works for NGINX and Apache, but not for MYSQL.  It just doesn't shutdown.
  • REPLICATION - It's a little bit labor intensive so setup and its possible I'll have dozens of Farms.  Any ideas on how I could automate the creation of Farms, or Scaling rules inside farms?
  • BUDGET PROJECTION - Any screen that makes a guess about my budget does with 100% utilization in mind.  I don't really care too much about this, but thought I'd mention it.
Thanks... and I really enjoy working with Scalr.


Reply all
Reply to author
Forward
0 new messages