At Crittercism, we are now a post Series A company with a great crash-reporting and app monitoring product that many developers are currently using. A challenge that we’re currently tackling is scaling our backend to efficiently accommodate many more apps with potentially large numbers of users. We’re accumulating terabytes of data, so speed in querying, updating, and inserting data as fast as possible is a big technical challenge. Our backend until now has run on Pylons (using Python), but we’re switching over to Node.js.
A huge advantage of Node.js is that it is asynchronous (or non-blocking), compared to Pylons, which is synchronous. This can significantly speed up processing of I/O bound requests. These requests occur when data read/writes take significantly more time than computations. How will this help us here at Crittercism? Most of our traffic comes in the form of reporting app loads, crashes, and handled exceptions. Most of the time spent processing these requests is during insertion of data, making it I/O bound. Node.js will allow our servers to take an incoming request, perform the necessary computations, send a command to update the database, and move on to the next request in the queue without waiting for the database update to complete. Requests to third-party APIs can also be treated similarly.
We briefly considered Tornado (an asynchronous Python framework), but ultimately decided Node.js would work best for us. All libraries compatible with Node.js are asynchronous, however, this is not necessarily the case with Tornado. In addition, the community surrounding Node.js is growing quickly, which will be beneficial in the future. In addition, as more developers face similar challenges, more libraries are being developed that will increase capabilities for reference points. With all of this in mind, we’re excited to start using Node.js to grow Crittercism. We’ll benchmark and report on the performance benefits through a series of follow-up posts. More to come….
Author: Justin Helbert, Amazing Crittercism Intern