@AlexWilliams wrote a fantastic post about @Twelephone on @TechCrunch this week. His tech story broke around 10am PT on 1/14/2013 and our Web app (twelephone.com) went from an average of 50 unique visitors per day to several thousand unique visitors on that day alone!
As the sun set in the West, news about Twelephone continued to spread to other countries following TechCrunch’s lead. Web traffic and realtime site activity were sustained at growing levels of increasing activity.
Luckily our Web application was designed to scale from Day 1. How did we design the application to scale, you ask?
First off, our Web application is written in Node.JS as a single page application. The server side portion of our application was designed to not require user state management. This key decision allowed us to spin up more servers as needed to handle the increased traffic volume driven from Alex’s awesome story. Luckily we used Nodejitsu for our Node.JS hosting provider. Not only is Nodejitsu one of the few providers of realtime websockets (more on this in a minute) on a PaaS offering but they support dynamic scaling of additional drones as needed.
Next, we used RedisToGo DBaaS to manage the state of our realtime websocket transactions across the cluster of our Node.JS servers. Luckily Socket.io (written by @rauchg) has this feature built into his Node library allowing us to add just a few lines of code to switch from their default MemoryStore to the RedisStore.
Next, we used MongoHQ DBaaS to manage user and call data as a NoSQL database. NoSQL allowed us quickly read and write JSON data to/from Twitter and Twelephone APIs and the Mongo datastore.
We chose to RedisToGo and MongoHQ because managing databases is not our core competence. These two providers allowed for dynamic platform scaling based on your usage requirements. All three vendors listed in this article offer free trial plans all the way up to dedicated enterprise solutions designed to scale. Don’t just take our word for it, give them a test drive and see for yourself.
Our TechCrunch coverage proved that Twelephone was written in a modern scaling fashion allowing us to claim webscale honors. It also proved that we selected the right technologies and service providers. Now we can focus on our users and their feature requests without worrying about managing our infrastructure scaling requirements.
Ring - Ring - Hello :)