Highly-available Drupal 8 on a Raspberry Pi Cluster
Many people complain that the Raspberry Pi is an underpowered, potentially unreliable computer unsuitable for hosting websites or doing any "real" server-like tasks. I beg to differ!
In this session, I will guide you through setting up the Dramble—a cluster of five Raspberry Pis with a load balancer, two webservers, and a master/slave database configuration—and show you how I use Ansible to deploy PHP applications.
I will also talk about the hours and hours of testing that went into every component of this architecture—everything from testing power supplies and dozens of storage mediums to testing different caching layers, PHP configurations, and server configurations to find the most performant and reliable solutions.
The final server architecture will use:
- Nginx as a load balancer and reverse proxy.
- Nginx and PHP-FPM for the webserver tier.
- MySQL in a master-slave configuration for the database tier.
I'm not arguing that the Raspberry Pi is the platform on which you'll build the next top-100 website, but I do want you to take away the key learning experience: no matter what hardware or platform you use for hosting, there are ways to make it more reliable, and the key thing is to use high-quality components and architecture, and to test everything repeatedly.
Read more on the Raspberry Pi Dramble cluster website—which has been serving a Drupal 8 site from my basement since last July!