Comic Relief is a UK charity that aims to create a just world, free from poverty – where everyone is safe, healthy, educated, and empowered. Since 1985, it has raised over £1 billion to help people living tough lives in the UK and across the world. Comic Relief’s operations depend on online payment processing for this fundraising.
Since 2011, Comic Relief has built and maintained a system to power its “Giving Pages” as well as an events management system for its annual Sport Relief fundraiser. However, despite the system being devised into logical units, its monolithic build had begun to slow down development and limit the scope of changes that could be made safely while maintaining confidence that nothing would break.
The journey to microservices
With a goal to deploy smaller, more independent apps to Pivotal Web Services, Comic Relief began the journey of turning the existing components of the system into apps that “imperfectly, but increasingly, adhered to the principles of 12-factor apps”, said Noel Light-Hilary, Senior Engineer at Comic Relief. The team used Docker locally to simulate the Cloud Foundry service definitions they knew would be used in production, and transitioned to Concourse CI to better visualize links between the growing number of apps.
Comic Relief took a pragmatic approach, without requiring that supporting services be independent for every Cloud Foundry app.
“We gain a lot by sharing a relational database. Our current solution can scale vertically to a huge capacity with high availability, so changing that would not get us the same benefits we get from having many PWS app containers,” Light-Hilary said.
To start with, Comic Relief continued using its monolithic legacy “macro services” within Cloud Foundry, taking a gradual approach to introducing smaller, more focused microservices which could be improved steadily as the team learned more about the strengths of the platform.
“This work has had a great impact on the Giving Pages product, on our approach to continuous integration and on our ability to use APIs for new purposes,” said Light-Hilary.
The team now has two successful and flexible new APIs focused on payment processing and on identity management which are used in multiple products. They’ve helped power unified authentication across their apps, and a single payment interface currently powers four web products.
“In shifting our attention to highly focused APIs that can scale easily, we’ve also been able to invest more time in building features to a higher standard,” Light-Hilary explained.
To date, they’ve helped expand what the PHP library Omnipay‘s adapters can do, and contributed well-tested changes back to the open source project to add high capacity gateway and Apple Pay support for Worldpay — one of Comic Relief’s payment processing partners.
“Comic Relief is now in a great position to explore how we can further increase the maximum capacity of the payment service. We’re aiming for an in-house tool that works in a unified way for all payments that can support the huge donation spikes we see during television and social campaigns, while being developed and improved year-round with a robust continuous deployment process,” concluded Light-Hilary. “Cloud Foundry and PWS give us a solid base to concentrate on this work with confidence that the platform will be reliable and work at the scale we need.”