Jump to content

Most efficient way to calculate uptime for servers


Go to solution Solved by vinny42,

Recommended Posts

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

 

  • Solution

Have you tested how much of a workload it really is to verify a server's status? I think you'll find that you can check dozens of servers per second because connecting to a server requires sending only a handfull of bytes of information and once sent, you can open another connection to another server while you are waiting for the first server to respond.

 

Measure first, then optimize as needed, IF needed.

Yes, actually there's several ways to do this. make sure you use the right data for the right consumer though, there is a difference.


This link has a full article on it here, its called "Service Availability Reporting"http://themonitoringguy.com/articles/service-availability-reporting/


That should answer your questions..


This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.