blitz.io: Geo-located Traceroutes with Heroku, AWS and CouchDB

Okay, not the greatest, ground-breaking, coolest, earth-shattering feature ever. Let’s just get that out of the way. But, in the process of troubleshooting various latency issues for our customers, we found ourselves logging on to various EC2 instances of blitz.io to run traceroutes to our users sites/apps to diagnose problems. We are developers, hanging out in TextMate, vim and our terminals and the ability to take a local Unix command and run it remotely while staying in our zone (shell) was important. So …

Distributed Job Scheduler

That’s really what blitz.io is all about. With our CouchDB backbone and the Sinatra app on Heroku acting as a routing layer, we simply post jobs to our CouchDB cluster and one of the engines in that geographical region contends with others to grab the job. The conflict mechanism in CouchDB helps “the one” and Neo gets to execute the job. :) So much for the Matrix analogy.

Think of it as a geo-located Resque, only with CouchDB multi-master replication across multiple geos, as opposed to Redis.

Ruby Gem

In case you haven’t checked it out, do this and you’ll have fun:

gem install blitz

It already has a curl command where you can run web checks from all of the EC2 regions across the globe. We’ve simply extended this to now run traceroute and it looks like this: