• 2 minute Read

This Raspberry Pi-Powered Web Server Hasn’t Crashed Yet

One man decided that his Raspberry Pi would be better suited hosting content on the Internet and he’s managed 45k monthly views just fine.

This Raspberry Pi-Powered Web Server Hasn’t Crashed Yet
[Image: Flickr user Pete]

The fist-sized powerhouse Raspberry Pi microcontroller has been used to power all kinds of little projects thanks to its versatility. Yet there’s only so much you can get out of a $35 board that can just barely run a version of Linux. Does it have the capacity to do more than run homebrew Java experiments and power dog food dispensers? UK-based programmer Steve Breuning believes so–and repurposed his Raspberry Pi into a web server to prove it.

Ever a fan of networking and the Internet (so much that his Pi-powered website hosts a repository of programming, Raspberry Pi, and SQL database tutorials), Breuning took the Raspberry Pi Model B board and went to town. He cranked the processor from standard 700 mHz to 800 mHz, installing Apache web server, and copying some web pages to Apache’s root directory. After a quick port forwarding setup to allow external users access to the Pi outside his firewall, Breuning redirected his chosen web domain to his IP address and watched the traffic flow in.

Steve Breuning

It only took a few hundred hits from Google searches to notice a slowdown in the Raspberry Pi server’s performance. Breuning eyed an old 512 mb RAM, 2.7 gHz x86 PC he had lying around as a replacement to host the site, but decided to continue the experiment…by stacking on more Raspberry Pi boards. Now up to 8 linked Pi boards (with the old PC as a load balancer), Breuning is curious about how much traffic his setup can handle: so far, his website has handled a highwater mark of 21,000 hits in 12 hours.

Steve Breuning

To be fair, this isn’t the first time that somebody’s transformed their Raspberry Pi into a web server, but even the appropriate Instructables page spells out that their build is ideal for a site that won’t receive too much traffic, “such as a testing server, or small intranet,” while a similar Lifehacker article indicates a one-board build for personal use. Breuning’s setup is intentionally public-facing with dozens of nested pages…and it’s been running fine since it launched in August.

Breuning saw the increasing power of mobile chipsets as the moment of opportunity for his Pi experiment, especially as other tinkerers started hosting WordPress sites on their Pi’s. “I found WordPress to be very resource intensive for a Pi, so I wrote a simple CMS in Python. It uses a flat XML database, and it has a simple page caching mechanism,” Breuning said. (The CMS is, appropriately, named PyPlate.)

Some have suggested that Breuning could power the entire site with a single quad-core ARM chip (or, obviously, a PC on its own). True, Breuning agreed–but he wouldn’t have learned all the nitty-gritty about building the cluster or reconfiguring his PC into a load balancer. For that matter, neither would you, as Breuning has been blogging the project’s trials and tribulations for the world to enjoy.