The API that saved Christmas
For the Norwegian Air advent calendar, I helped build a Laravel API capable of serving 11,000 requests per minute.
Each year, Norwegian Air celebrates Christmas with a web-based advent calendar. Instead of chocolates, people are rewarded with prizes and special offers.
Within hours of being launched, the Norwegian Air Julekalender was serving nearly 5,000 requests per minute. By Christmas Eve, that number had peaked at nearly 11,000 requests per minute.
The Norwegian Air Julekalender was built by a three-person development team, distributed across 10 timezones, working to a tight—and immovable—deadline. The entire project was delivered on time, and on budget.
- The Julekalender is a single-page application. The React front-end is powered by a Laravel API.
- The architecture of the Laravel application adheres closely to the SOLID principles.
- The API is fully-documented, using API Blueprint. This enabled parallel development of the Laravel API endpoints, and the React client application.
- A comprehensive test suite ensures the API works as advertised.
- The site is multilingual. The available contests, partners, prizes, and offers vary across 5 different regions.
- Every piece of content is managed by the client using a Laravel-based CMS.
As the lead back-end developer, my primary responsibilities included:
- Making key architectural decisions about the Laravel application.
- Designing and developing a fully-documented RESTful API, which drives the entire SPA.
- Developing a system to pre-generate and intelligently cache API responses—a vital step to handling the extremely high traffic.
- Norwegian Air
- Happy Cog