0

I have a MySQL table on a Ubuntu or CentOS machine which contains rows on when to start and stop a bunch of 1000 AWS / Azure servers.

Right now its implemented in such a way that a cron is running every minute to check the rows data and start / stop the respective servers.

I want to know if there's a more efficient method to achieve this ?

anjanesh
  • 337
  • 1
  • 3
  • 11
  • How many points in time to do some actions you have? How often there are changes in scheduled jobs? – Romeo Ninov May 26 '23 at 07:05
  • Is there a specific problem that you experience with your current set-up? Because unless there is, I wouldn't worry about premature optimisation. Note: that almost ***always a more efficient solution*** exists but it may not be necessary to implement it or to cumbersome to do so... - A native scheduler like https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/solution-overview.html may be a suitable different approach, but when you have a hybrid cloud you'd also need to maintain the native solution for Azure to get the same effect you probably increase complexity. – HBruijn May 26 '23 at 07:06
  • So the script to start / stop cloud servers was done with long ago - I was just thinking if there's a way not to run a cron every minute - something like using event triggers at the OS level ? – anjanesh May 26 '23 at 07:32
  • @anjanesh, how often you exec the operation of start/stop, some example table will be helpful. – Romeo Ninov May 26 '23 at 08:31
  • Well - there are are about 50,000 servers and some 100-500 of them for denoting start stop operations in a separate table. I don't think there are more than 100 start/stops in a minute though. – anjanesh May 26 '23 at 13:08

0 Answers0