Server Check.in Homepage

Server Check.in was built to be a simple, inexpensive website and server monitor. You can monitor up to five sites and servers using HTTP status checks (making sure your web server is responding with a '200 OK' when someone requests a page) or simple pings (to make sure a server is online).

When your site goes down, you can choose to be notified by email or SMS messages (which always come from a real phone number).

You can also monitor your website or server's latency (responsiveness—or lack thereof) over time. This data is helpful in determining if your site performs well consistently over time, and not experiencing any untimely slowdowns.

Why Drupal was chosen: 

Drupal provides an extremely robust and flexible platform for building websites. Server Check.in was built to be simple, inexpensive, and easy to use. More than half of the site's features were simply pieced together using modules already built by others. Missing parts—most of the backend of the service, along with payment and notification integration—were easy to add through a few custom modules.

Describe the project (goals, requirements and outcome): 

Server Check.in was built using Drupal 7, and the responsive theme was built using a Zen sub-theme. Drush powers most of the backend functionality of the service (server checks, queue consumption, notification handling). Some parts of the service are provided through third party services: Stripe powers payments, and Twilio powers SMS notifications.

Third-party Services and Code used by Server Check.in

Server Check.in uses a few third party services to handle payment and messaging, and other aspects of the service. The main services are:

  • Stripe: PayPal and some other credit card processing services were considered for Server Check.in, but Stripe offers an extremely simple API with a great PHP library, and their processing fees are very competitive. Since the existing Stripe integrations for Drupal are mostly centered around Drupal Commerce or Übercart, we decided to write our own small integration, which simply adds a Stripe payment form to the site's User Registration form, and allows users to view their billing information on their account pages.
  • Twilio: Twilio is a very simple voice and SMS communications service that allows simple integration for phone calls and notifications. We liked their low price for reserving a phone number and for sending and receiving texts. Twilio also works with many international phone networks, so some users outside the US and Canada are able to receive text message notifications when their servers are down.
  • Flot: Flot is an excellent jQuery plugin that enables rich and detailed charts and graphs to be drawn using HTML5's canvas abilities. This means that charts for latency and uptime graphing look beautiful and work perfectly across a wide variety of devices (like tablets, mobile phones, and desktop computers), and don't require any special plugins for viewing. See some examples of the graphs produced by Flot on the About page.
  • MailChimp HTML Email Templates: Instead of sending a boring and frustrating text email when your site is down, we decided to adapt MailChimp's excellent (and free!) email templates to our site design and send those using our own implementation of Drupal's DefaultMailSystem (a basic example for this: How to send HTML mail [Drupal Answers]).

Design

Since many users are on smartphones and tablets, Server Check.in was built with a mobile-first theme, using a simple fluid-width theme and some responsive styling. The design has been well-tested on iPads, iPhones, Android phones, and all the major desktop browsers.

The central conceptual unit on Server Check.in is a 'server' node; these nodes use Field API fields to define what kind of check is to be performed, the server URL or IP address which will be checked, and what kind of notifications will be sent when the server goes down or recovers from an outage. Views and some custom glue code helps build out outage listings and latency graphs for each server.

Keeping the design and the structure of the site extremely simple makes it easier for users to use the service. Registering, adding or managing servers, and checking the status of your servers is extremely simple, and all that was required was a little work with some hook_form_alters, and some jQuery to tweak the interface a slight bit here and there.

Scalability

One of the main goals of Server Check.in is to be able to scale as more users come on board—performing thousands of HTTP requests and pings per hour can be quite taxing, and one server won't be enough. Therefore, the system is built in a decoupled manner. Drupal's Queue API is used to find servers that need checking, and then pass those servers to other processes that then report back whether the server is up or down.

We are also using the Boost module (as of this writing) to help the server handle bursts of traffic; the site ran admirably during a sudden onslaught of traffic from a Hacker News post that stayed on the HN frontpage for almost two hours.

Stability

Our custom code uses SimpleTest to ensure that things that work don't get broken due to changes and bugfixes. Just as with Drupal core, we've found that having reliable tests for all the major functionality of a site makes for a much more reliable end result, and cuts down on the number of bugs.

More info

You can find even more information about the motivation behind building the site and some particular features in the following posts:

Modules/Themes/Distributions
Key modules/theme/distribution used: 
Why these modules/theme/distribution were chosen: 
  • Zen 5.0 (responsive sub-theme): Many of Midwestern Mac's projects have used Zen-powered sub-themes, but Server Check.in was our first site to use Zen 5.0. We started building themes using HTML5 when Drupal 7 was released, but this is the first time we used all of Zen's new and amazing features, like SASS and Compass (which are pretty easy to get set up, and well-documented in Zen's readme files). The theme is fully responsive, and scales well to adapt to any device or viewport.
  • User Limit: We needed a way to make sure that a sudden stampede of new accounts wouldn't take down Server Check.in—at least not until I was ready for it! So, geerlingguy volunteered to maintain User Limit's 7.x version. It's a simple but very helpful module if you need to make sure your site can cope with a certain number of users!
  • Boost: Boost helped Server Check.in cope with many thousands of visitors in a two-hour period when Server Check.in was on the front page of Hacker News (story: Show HN: Server Check.in). We use this module on almost every Drupal site we built, because it offers such a huge performance gain for such a small amount of effort!
  • Honeypot: Nothing bothers us more than a bunch of spam user accounts and webform submissions. So we use Honeypot, a spam-prevention module we originally wrote for Flocknote and still maintain.
  • Other Modules used by Server Check.in include Link (to provide some easy URL handling), Elysia Cron (helps with managing cron for better performance and stability), Input stream (helps with external API integrations), Views and Webform (what site doesn't use these two modules?)
Community contributions: 

During the building of Server Check.in, geerlingguy (president of Midwestern Mac, LLC) became Drupal 7 maintainer of User Limit, and committed some improvements to the Honeypot module.

Team members: 
Server Check.in example user homepage
Server Check.in server latency graph

Comments

Terrific writeup. Thanks for sharing.

Thank you!

__________________
Gittip | Work: Midwestern Mac, LLC | Personal: Life is a Prayer.com

Does this site has any module for implementing it to our drupal sites? I didn't find any. Is there anyone for drupal 7?

Doubt is the father of invention..... Hubmesh | download converter

great job done!

Interesting approach! Good job!

Kevin

National Go Solar Foundation - Solar Energy is the Future

Nice writeup.
Good to know about Flot jQuery plugin. The graphs are amazing.

--
I am a PHP programmer. moving to become drupal programmer

Mobile is the future. Good to know that it's built with a mobile-first theme that works flawlessly with Android phones, iPads and iPhones. That's great vision!