Score:0

Add Trigger Events to a Schedule Queue in Linux

us flag

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 ?

Romeo Ninov avatar
in flag
How many points in time to do some actions you have? How often there are changes in scheduled jobs?
HBruijn avatar
in flag
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.
anjanesh avatar
us flag
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 ?
Romeo Ninov avatar
in flag
@anjanesh, how often you exec the operation of start/stop, some example table will be helpful.
anjanesh avatar
us flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.