Zipasaurus upgrades

So I’ve had some downtime recently while interviewing for a new job in SF. Interviewers invariably bring up zipasaur.us and how much they like the service. I enjoyed the compliments but I wasn’t entirely comfortable with the state of the service so I decided to make some upgrades based on some recent learnings.

The biggest change was in the selection of a new datastore. After reading how amazing PostgreSQL tends to perform vs. MongoDB (http://nosql.mypopescu.com/post/47692111874/posgresql-as-a-schemaless-database), I decided to ditch MongoHQ and pay the $9/mo to use a Basic PostgreSQL database on Heroku. The addition of indexes on zip code, state, and county improved performance immensely. Note: postgreSQL was the obvious candidate back when I launched the service but Heroku’s next largest database plan after FREE back then was $50/mo and I was a cheapskate. C'est la Vie.

Next upgrade was to ditch thin in favor of unicorn. Zipasaur.us is built using Sinatra and is small enough to run 10 unicorn workers on a single dyno. Heroku allows up to 20 connections (to the db) on the Basic plan so this was another no-brainer.

It was a little known secret that the data used by zipasaur.us was actually from 1999! This was old when I first launched the service 3 years ago but I deemed it “good enough”. I also wasn’t aware how often postal codes changed. So I headed over to GeoNames for a fresh set of postal codes. I’ll likely automate this in the coming weeks.

API updates! Previously it was a bit verbose, so I trimmed all that extra language so you can query right off the root domain with your desired scope. e.g. http://zipasaur.us/state/or. Note, I’ve also updated the API so you can also query with the full state name as well. e.g. http://zipasaur.us/state/oregon

Lastly, zipasaur.us got a bit of a face lift thanks to Flat UI.

Happy Zipping! RAWR!

Show Comments