Unconventional Rails: CMS with API Caching

Login to Access Code

Demo Link

Ever needed to build out your own Content Management System? Have you struggled with custom file attachments (especially in Mongoid)? Do you need to distribute your API to millions of users? We have explored solutions to these challenges and more in this latest installment of Unconventional Rails.

We recently had a project with a short fuse and high demand. The challenge was to build an angular application that would stream content to millions of users over the course of a couple hours (hundreds of thousands of requests per seconds). Furthermore, we had to build it in three weeks. We knew that serving the client app (angular) would be easily accomplished with static file hosting with CloudFront, but that the CMS/API layer would be a bottleneck. Thus we had to get creative and unconventional with Rails on the back-end.

Our solution was to build out a simple CMS that would manually handle file attachments and upload them to S3 as well as cache our own API and also serve this to the client app as an S3 asset. This application successfully served our users with less than a .1% failure or timeout rate and was horizontally scaleable via CloudFront and S3. Watch the video or dig through the code to discover our solutions!