views:

174

answers:

2

I'm currently trying to build (a simpler version of) a status website similar to Amazon's Service Health Dashboard

Basically, I need to connect in about 3 Data Centers and a couple of websites with at least an Up/Down message.

I'm mostly familiar with C# and some web programming. I'm slightly familiar with web services, and it looks like that would be a good way to implement this. I can Google my way through tutorials for individual parts, but I'm unsure how the overview of something like this works.

The way I understand it is it would be broken down into these parts:

  • Status Website - ASP.NET
  • Web Service - C#/ASP.NET
  • Some kind of program to send status to the web service - C#?

For the website status, the status site will simply run a script to check if a URL returns an error.

I'm confused on the easiest way to implement the Data Center status. From what I understand, I can write a web service that will get responses from the Data Center. Is the easiest way to do this a C# program located in each Data Center that checks the status (probably logging into a SQL database) and then sending the status to the web service? I'm also confused on the easiest way to get this information to the status website. I guess the easiest way would be for the web service to write to a file which the status website would read. Also, I guess it would need to time the web service calls and report an outage if it doesn't receive a status message in a certain amount of time.

Any high-level overview help would be greatly appreciated. Thanks.

+1  A: 

The easiest way would be to start from your definition of health.

Decide what criteria, for each component of the data center, define health. Determine how to measure those criteria, preferably from a reliable server in the data centers. Note that I suggest you learn how to measure them outside of your web service, since you're not familiar with web services.

Create a web service to run on that reliable server to measure those criteria. Then attach the measures to your web service, after deciding how you should present the results back to the web site.

The web site could then use the results from calling these services to update a status dashboard. It could use AJAX to call the services, on all the data centers, asynchronously.

This gets slightly more complicated if you need to incorporate actions based on the status of the data center. For instance, you might need a button to start a database if the database is found to be down.


EDIT: I also want to make sure that you are aware of products like the System Center products from Microsoft. They may be overkill for what you're doing, but they do provide a standard, flexible mechanism for monitoring data center status, and for taking action to correct problems. Also, see http://www.codeplex.com/dfo.

John Saunders
Ok, this makes a lot more sense. So for example Data Center #1 is running a SQL Server. Data Center #2 is running IIS. When a user accesses the health status site, it will trigger the web services located in Data Centers #1 and #2. Data Center #1 attempts to log into the database, then returns success/failure. Data Center #2 checks if IIS is running then returns the status. Will this method also allow me to see if the web services are down due to not receiving a reponse?
Tony Trozzo
It will, but I suggest you add a specific "health" criterion for that. Add a "AreYouUp" operation to the web services. That operation should just return true. If _that_ times out, you can be fairly sure the web service is "down".
John Saunders
One other quick question. I've read that ASP.NET AJAX had issues with calling external web services. Do you know if this is still an issue?
Tony Trozzo
This isn't unique to ASP.NET, it's how most browsers implement the XmlHttpRequest objects. By default, they only allow call backs from the same domain. You can get around this by using a local proxy, that calls the remote web services.
Zachary
AJAX has no problem with "external" services; it just needs to be configured to call a service in a different domain than the web page. Put the two in the same domain (on the same service, for instance), and there will be no problem.
John Saunders
+1  A: 

I also wanted to mention that IPSwitch makes a product called "WhatsUpGold" that does exactly this. I've been using it for the past 4 years and it can probably do everything you need out of the box. Most importantly, it's very cost effective! I'm a version behind, since I didn't need any of the new features! It supports a distributed multi-site network (agent at each site monitors status/health and reports back to your main location/hub).

*As John mentioned above, the key to monitoring a device's status is defining it's health. Just getting a status of up or down is not enough, since many other things; ping latency, disk utilization, cpu utilization, etc... will be based on your unique environment.

Zachary