The last few months have been pretty exciting for BoxCycle. We are seeing more visits, more listings, and more orders and we are refining the process to help us keep up and provide the best possible experience for buyers and sellers.
Unfortunately, the last few months have also been maddening. Just as traffic improved, website performance became slow and unreliable. We tried a number of things to improve speed, but, ultimately, the problem came down to deteriorating performance of our web host, HostingRails. HostingRails has worked quite well when we setup BoxCycle, but, since being taken over by JumpLine in 2010, seems to have lost their Rails expertise and their performance focus. As time passed, the site performed poorer and poorer and JumpLine’s response gave little hope that it would get better.
Switching providers is always scary, but in mid-May we pulled the plug and moved over to WebFaction which is known for its modern setup, less loaded servers, and a focus on performance. The transition was nerve-racking, but went through without a hitch.
We also implemented a number of improvements, both before and after the transition, to help with performance:
- Switched from Apache/Mongrel to Nginx/Passenger
- Implemented many server-side best practices such as GZip
- Added Expires headers to static assets and made sure that they are served by Nginx without touching Rails
- Implemented Rails fragment caching on some heavily used components
- Modified deployment so last modified dates are only updated on changed files
- Upgraded to the latest version of the Twilio API allowing us to setup Failover for outgoing calls to better deal with server timeouts
- Started using asset_host in Rails to split requests for static files between several domains
- Updated BoxCycle to heed more of the recommendations made by tools like YSlow and Google PageSpeed
- Upgraded Rails to 2.3.11 (made possible by switching to Passenger since Mongrel has problems above 2.3.5 and we don’t yet have a good reason to migrate to Rails 3)
There are certainly more things we can do, but fundamentally, we aren’t yet at a point where optimizing performance should be our highest priority. There is plenty of work on our plate that more directly impacts people’s ability to buy and sell used boxes.
Unfortunately, we ended up on a WebFaction server that was under quite a bit of load and despite all the work we were stuck with a less intense version of the same problem. Talk about frustrating. To their credit, WebFaction was prompt with action and communication and worked with us to identify and remove issues causing load. After a few weeks of effort, things improved, but were still not acceptable. We requested to be transferred to another server. Again, to their credit, WebFaction was very accommodating and setup our account on a server with lowest average load.
So once again, we rolled up our sleeves and transferred servers. Transferring within the same host is easier, and, since WebFaction supports multi-server setups, it is easier still. But it was still nerve-racking.
The transition is now over and the difference is spectacular. BoxCycle feels super fast. I, for one, am just relieved to have this issue over with.