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

By Spirent On October 25, 2011
Blitz, Cloud, DevOps, Heroku

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:

$ blitz traceroute -r japan google.com

running from japan...

traceroute to (, 32 hops max, 60 byte packets

1 ip-10-150-124-3.ap-northeast-1.compute.internal ( 0.465 ms
2 ip-10-1-12-1.ap-northeast-1.compute.internal ( 0.539 ms
3 ec2-175-41-192-215.ap-northeast-1.compute.amazonaws.com ( 0.284 ms
4 ( 1.319 ms
5 ( 1.303 ms
6 15169.tyo.equinix.com ( 2.616 ms
7 ( 1.504 ms
8 ( 4.975 ms
9 ( 3.511 ms
10 ( 35.290 ms
11 *
12 tb-in-f147.1e100.net ( 34.342 ms

Simple, powerful and something that easily extends your favorite Unix tools and your mode of development to remote locations. And did I mention it’s part of the free plan on blitz.io?

comments powered by Disqus
× Spirent.com uses cookies to enhance and streamline your experience. By continuing to browse our site, you are agreeing to the use of cookies.