I have a toplist site that allows users to submit their private game servers to my site. And one of the new features I plan on implementing is online status and uptime percentage.
I have planned to make a cron that runs every 10 minutes that will go through each server registered in the database and update the online status (will have to attempt to make a connection to the server). And of course, after checking the status, set the status of the servers on my website to their online/offline results. On top of that, I will need to keep a record of the offline/online statuses every 10 minutes in a MySQL table, in order to calculate the uptime percentage
Now, is there a more efficient way to do this? Won't having to make a connection to each server registered in our database be a major resource hog?
Here's the stats of my VPS:
.
Number of CPU's: 1 CPU Speed: 1000MHz Memory: 1GB Disk Space: 10GB Bandwidth limit: 1TB