spirent.com

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

By Spirent On October 15, 2011
Networks
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 74.125.31.147 (74.125.31.147), 32 hops max, 60 byte packets

1 ip-10-150-124-3.ap-northeast-1.compute.internal (10.150.124.3) 0.465 ms
2 ip-10-1-12-1.ap-northeast-1.compute.internal (10.1.12.1) 0.539 ms
3 ec2-175-41-192-215.ap-northeast-1.compute.amazonaws.com (175.41.192.215) 0.284 ms
4 27.0.0.154 (27.0.0.154) 1.319 ms
5 27.0.0.154 (27.0.0.154) 1.303 ms
6 15169.tyo.equinix.com (203.190.230.31) 2.616 ms
7 72.14.239.48 (72.14.239.48) 1.504 ms
8 209.85.255.58 (209.85.255.58) 4.975 ms
9 209.85.255.56 (209.85.255.56) 3.511 ms
10 209.85.255.39 (209.85.255.39) 35.290 ms
11 *
12 tb-in-f147.1e100.net (74.125.31.147) 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.