In a recent article, the BBC engineering team describes the work done moving BBC Online to the cloud and to a serverless deployment. Half of the BBC’s website is now rendered serverlessly with AWS Lambda.
With the goal of avoiding the operational overhead of managing virtual machines or containers and keeping the deployment secure, reliable and scalable, the engineering team at BBC decided that a migration to a serverless architecture was required. Matthew Clark, head of architecture for the BBC's digital products, explains some the reasons and goals of their new approach and the technologies involved:
As is the case with tech, if you stand still, you go backwards. Until recently, much of the BBC website was written in PHP and hosted on two datacentres near London. That was a sensible tech choice when it was made in 2010; but not now (...) And so, over the past few years, it’s been our strategy to recreate BBC Online. Almost every part has been rebuilt on the cloud. We’ve taken advantage of the many benefits that the cloud brings — such as the flexibility to provision new services almost instantly. And we’ve used best-practice tools and techniques — such as the React framework, and the DevOps model.
Lambda is preferred as it is able to auto-scale on demand, and according to the author, about 2,000 functions need to run every second to create the BBC website. Moreover, there was the goal to replace multiple independent systems with a generic one to simplify the architecture. But not everyone agrees that a serverless solution is the best approach to achieve cost optimisation and unconstrained auto scaling on a very large deployment. "Running a site the size of the BBC on Lambda is nothing short of an exuberant waste of a government-subsidized budget, it's absolutely crazy," comments a user on Hacker News. "There are plenty of alternative options, even on AWS, that don't suffer from such huge markup without requiring any additional ops input." Tom Snelgrove, technology strategy and advisory manager at Accenture, asks instead:
Interesting, BBC websites now entirely run with AWS Lambda functions. Forward thinking architecture or a case of over-indulgence in new tech for its own sake?
Comparing the older page with the new cloud-based one. The numbers are Lighthouse performance scoring. Source: https://medium.com/bbc-design-engineering/moving-bbc-online-to-the-cloud-afdfb7c072ff
The author closes the analysis promising more details in a future article, something that many developers are looking forward to: Jesse Adelman, computing automation consultant at AHEAD, hoping to have more details from the BBC, adds:
Very interesting move for the BBC to move to mostly AWS serverless (...) Will the additional layers of indirection and apparent developer throughput speed make a better, more cost-efficient service? A developing story to keep watch for. And are they caching right with 2k Lambdas per second? I hope they make their internal telemetry public.
The transition to the cloud and to a serverless approach is something that the BBC started and documented already last year. At Re:Invent 2019, Alex Chesters, senior software engineer at BBC, presented how the BBC uses Lambda@Edge to customize device pages.