Dealing with millions of concurrent visitors on an application is never an easy task. This particular application posed challenges on a few technical fronts:
- An efficient and compact Angular application
- A responsive front-end across devices while embedded on Youtube
- A highly scaleable API that handles millions of requests per second
- Infrastructure that scales horizontally without delay
We knew that we would have to think outside of the box on the back-end, as the API would be a bottle-neck and difficult to scale. What we came up with was simple, yet powerful. We built a Rails CMS that would cache the API as static files and distribute them on CloudFront. We managed to deploy a cost effective and lightning fast back-end, as you can see with our load test below:
Scale was only half the battle, however. We also knew that the Angular application needed to be as efficient as possible while also handling a significant amount of responsibility:
- Supporting mobile and desktop DOM events within an iframe
- Caching and reconciling the API on the client side
- Frequently fetching data without over-burdening the server
Building a responsive application can be tedious in the most typical of browser environments, let alone in two entirely different iframes and websites. This app would be hosted both within the context of a custom YouTube Gadget and on the Samsung website. Our team rose to the occassion and built an incredibly sleek and responsive application without compromise!
Overall, we made some great friends on this project, and had a great time along the way. Big Spaceship was an awesome team to work with and lead the project with incredible attention to detail. YouTube engineers were also very accommodating in helping us prepare for scale and collaborating with us on changes. We consider this project one of our most thrilling to date, and hope to work on more of the same in the future!