Skip to the main content

Site navigation

Since November 2024, the Nottingham College website and its subsidiaries have used serverless infrastructure to deliver all website services and content. Embracing serverless website architecture has allowed us to not only reduce the environmental impact of our websites, but also leverage the performance benefits of serverless design as a whole.

What is serverless?

A common misconception about serverless is that there are no servers involved. There are! The difference is that we no longer own, manage, or provision them. With conventional website hosting, such as a Virtual Private Server (VPS) or a dedicated server, a website runs on capacity that’s allocated around the clock, whether it’s handling thousands of visitors or none at all. Serverless instead runs code on short-lived, on-demand computing resources that are created as they are needed when requests arrive and shut down when they’re no longer needed, rather than sitting idle and drawing power.

Because of this, our website’s computing resources scale with the requests it actually receives. Think about 3:00 AM, when very few people are visiting. With a traditional server, that machine would be running at full readiness for an almost empty site. With serverless, little to no compute is running for us at all. Some supporting services, like the database and file storage, still need to stay available, but we’re no longer powering a whole server just to wait for visitors.

One way to think about it: Traditional website hosting is like owning or renting a house. It exists 24/7, with the heating and lights running, whether you’re home or not. Serverless is like booking a hotel room only for the nights you need one. When you check out, the room is no longer yours, and you’re no longer paying for it. Our websites don’t have a server permanently running for them. The computing power only switches on when someone visits, for example, when they load the Nottingham College homepage.

What makes serverless more sustainable?

  • No idle servers. Traditional servers are sized for the busiest day of the year and run at that size every day, even when barely used. Industry research suggests that typical server utilisation is often below 30%, while idle servers still draw a significant amount of power. With serverless, computing power is only used when someone visits one of our websites.
  • Shared, efficient infrastructure. Our websites run on infrastructure provided by Amazon Web Services and Cloudflare. Large cloud providers run data centres that are typically more energy-efficient than smaller hosting setups, with better cooling and much higher utilisation of each server, as hardware is shared across many customers.
  • Doing less work per visit. Many pages are served from cache at a location near the visitor, so they don’t need any computing power to generate. The most energy-efficient request is one that doesn’t need to be processed at all.
  • No oversizing for peak demand. We don’t need to buy capacity “just in case.” On busy days like GCSE results day, capacity scales up automatically, then back down when traffic returns to normal.

Serverless isn’t a complete solution on its own. How efficiently a website is built still matters, which is why we also focus on optimised images, caching and reducing database queries for content where we can.

Did you know: On GCSE results day, we had a spike in traffic of just over 60,000 page views in a single day to the main Nottingham College website. Thanks to serverless compute, no one noticed, and this didn't impact any services or requests! The only time we did notice was when we reviewed our Google Analytics data after the fact!

Performance Benefits

While being more energy-efficient and sustainable, there are also major performance benefits to leveraging serverless compute resources, which make our websites fast and resilient!

  • Highly scalable - We don't provision any resources, as scaling is on-demand based on traffic and requests.
  • Using existing cloud infrastructure - Major cloud providers like Cloudflare and Amazon Web Services provide serverless compute globally, which we leverage to power our websites through Craft Cloud.
  • Content Delivery Networks (CDNs) - For content like images and files, we leverage major CDNs to optimise the delivery of these resources. These are also cached.
  • Static caching - A lot of our website content doesn’t change very often. When it hasn’t changed, entire pages are cached and served as ready-made pages from a location close to the visitor, without needing to run any code or query the database, further reducing energy use. Chances are, when you’re browsing the Nottingham College website, you’re viewing a cached page without even knowing it!

Craft Cloud

It’s no secret: we proudly display “Powered by Craft Cloud” in the footer of our websites. We’ve used Craft CMS for over 10 years, and more recently moved our websites to Craft Cloud, a serverless hosting platform built by the team behind Craft specifically for Craft CMS websites.

Because Craft CMS is written in PHP, people often ask: “How do you run a server-side language like PHP serverless?” Traditionally, PHP relies on a web server running around the clock, waiting for visitors. Craft Cloud takes a different approach, using containers.

Think of a shipping container. Whatever’s inside, it’s a standard box that any port in the world can load, move, and unload in the same way. Software containers work on the same principle: our website’s code is packed into a container along with everything it needs to run, including PHP, Craft CMS itself, and any additional software packages needed.

Each time we publish a code update (deployment), Craft Cloud packs a fresh container with the latest version of our website. These containers run on AWS Lambda, Amazon’s serverless platform, with the help of Bref, an open-source project that enables PHP to run on Lambda. When someone visits our website, Lambda opens up a copy of the container to handle the request. If thousands of people visit at once, it simply opens more identical copies. When traffic quiets down, they’re closed again, so no computing power is wasted waiting for visitors.

What technology powers our websites?

Through Craft Cloud, there are a variety of cloud and serverless technologies in use, including:

  • Cloudflare – a global network that caches and delivers our pages close to visitors, and protects our websites with a web application firewall.
  • Cloudflare Workers – lightweight code that runs at the edge of Cloudflare’s network, routing each visitor’s request.
  • AWS Lambda – Amazon’s serverless platform, which runs our websites only when someone visits.
  • Bref – open-source software that enables PHP, the language Craft CMS is written in, to run on AWS Lambda.
  • AWS Fargate – serverless containers used to build and package each new version of our websites when we publish updates at a code level.
  • Amazon SQS – a serverless queue that handles background tasks on demand, rather than having a server constantly waiting for work.

Moving to serverless has given us websites that use energy only when they’re needed, cope effortlessly with our busiest days, and run on infrastructure that’s continually improved by some of the world’s largest cloud providers. It’s one part of our wider commitment to sustainability, and as the technology continues to evolve.