Beer is a social drink. And Untappd helps make it a truly global celebration.
Untappd is a social network for beer lovers where users can rate, share and track the beers they’ve had, want to have and want to seek out. We’re on all four major mobile platforms – iOS, Android, Blackberry 10 and Windows Phone. We may appear big from the outside, but we’re a two-man, part-time operation.
You don’t grow to be the social network of record for beer lovers without some kick-butt technology behind your app.
We were born in the cloud. We started with Rackspace for our infrastructure, which was a huge help. I’m not an infrastructure engineer. I’m not an apps guy. I’m a developer. We started with one Rackspace Cloud Server and now we’re up to 18 (a blend of first and next-generation) and using multiple load balancers to separate traffic. We’ve dramatically increased our footprint and reliability.
When we first started Untappd, we used MySQL as our primary datastore. We didn’t know much about non-relational databases, but we had to rapidly expand into that field once we grew to where we are. That’s where we got our feet wet with MongoDB, Redis, Memcached and Cloud Load Balancers – all of these things that became necessary when we started to grow.
We’re still on MySQL, but we have a lot of our major processes running on our MongoDB instance – we’re running a dual setup in a sense. About a year and a half ago we started growing at a much faster rate – from about 300,000 to 750,000 registered users – and we had a lot of outages. We had a lot of issues maintaining scalability and building the platform better and higher. We were having difficulty scaling out our Friends Feed, which is the most important part of our app and what makes the app social – on any given day we average 100,000 to 250,000 check-in data points. Having a high quality, fast feed is very important. It was a bottleneck when we first started, and we fixed that with MongoDB.
We contacted the guys at ObjectRocket and they helped us scale out a system that enables us to grow at a rapid rate and not worry too much about issues with long-loading feeds and other hiccups. Since then we’ve been able to change our approach technology-wise and do a lot of our heavier queries on Mongo, which helped us significantly when it comes to high-traffic periods.
We looked at other databases – NoSQL, CouchDB – and we found the interface and the fact that ObjectRocket has SSDs and is very scalable was a no-brainer for us. Working with ObjectRocket, the query times for our Friends Feed went down to less than a second from three to seven seconds. When you get those kind of results, you keep doing it.
Once we got our feet wet, transitioning from a relational database to MongoDB was a snap. We went from a very schema-rigid world to a freeform document structure. Our API was built specifically in JSON so Mongo was a very easy choice.
We modeled our service loosely after Foursquare, which has been a big supporter of MongoDB. One of the powerful parts of our app is that it’s geo-aware, so Mongo having native hooks into the queries to pull in local data is something we looked at from the get-go to improve scalability. And because some beers are regional, we’re working with MongoDB for highly-scalable queries that can offer local beer recommendations to users – we won’t taunt east coasters by recommending Russian River’s Pliny the Elder, which is brewed in limited batches and sold only on the west coast.
ObjectRocket helped us look at our data and identify correct indexes, identify the correct shard key. When you’re a small team like this there is no DBA. You wear the DBA hat a lot. I do it all the time. One of the things you have to understand when you’re a small company like this is you don’t have the resources to have a completely monetized solution. We can definitely install MongoDB on one of our Cloud Servers and say “ok it works,” but with the scalability and the knowledge of operations from ObjectRocket, we can have a database as a service and let them manage it.
While MongoDB took some getting used to, we wouldn’t want to run our business without it. For entrepreneurs and small businesses, ObjectRocket and Rackspace make it simple. They became members of our team and showed us that anyone can do this stuff.