KEMBAR78
Highly available Drupal on a Raspberry Pi cluster | PDF
Highly Available Drupal
on a Raspberry Pi Cluster
Jeff Geerling, php[tek] 2016
(geerlingguy)
http://www.shockinglydelicious.com/dorothys-fresh-raspberry-pie-recipe/
http://www.shockinglydelicious.com/dorothys-fresh-raspberry-pie-recipe/
The Big Question
Can you run a Fortune 500
website in your basement?
Another Question
Why would you?
Gateway 2000 486 PC, RedHat Linux 6
1999
Whistle Interjet, running FreeBSD 4
Raspberry Pi 1 model B
Problems with one Pi
Problems with one Pi
• No redundancy
Problems with one Pi
• No redundancy
• microSD card reliability
Problems with one Pi
• No redundancy
• microSD card reliability
• No database backup
Problems with one Pi
• No redundancy
• microSD card reliability
• No database backup
• Limited resources
• No redundancy
• microSD card reliability
• No database backup
• Limited resources
High Availability
Single Pi Multi Pi
• Easy redundancy• No redundancy
• microSD card reliability
• No database backup
• Limited resources
High Availability
Single Pi Multi Pi
• Easy redundancy
• Can hot-swap a Pi
• No redundancy
• microSD card reliability
• No database backup
• Limited resources
High Availability
Single Pi Multi Pi
• Easy redundancy
• Can hot-swap a Pi
• Hot database backup
• No redundancy
• microSD card reliability
• No database backup
• Limited resources
High Availability
Single Pi Multi Pi
• Easy redundancy
• Can hot-swap a Pi
• Hot database backup
• Each server optimized
• No redundancy
• microSD card reliability
• No database backup
• Limited resources
High Availability
Single Pi Multi Pi
2014
CPU 20 cores / 6 GHz
RAM 5 GB
Storage 80 GB microSD
Network 10/100 over Gig
www.pidramble.com
Raspberry Pi Cluster
Problem
How do you wrangle all these Pis?
“Configuration management for humans.”
“Configuration management for humans.”
	___________		
<	And	cows!	>	
	-----------	
											^__^	
											(oo)_______	
												(__)							)/	
																||----w	|	
																||					||
Source: https://flic.kr/p/nkcFoU
Demo
How did it do?
Benchmarks
Benchmark Standard
Uptime 99.95%
Max page loads/sec 1000
Power Consumption 0.5 Gflops/watt
Benchmarks - Uptime
(as measured by Server Check.in)
Benchmarks - Performance
Nginx, Cached Page 3160 req/s
Drupal, Cached Page 34 req/s
Drupal, Uncached Page 12 req/s
For comparison:
• My MacBook Air: 6x faster
• DigitalOcean droplets: 10x faster
Benchmarks - Power
Raspberry Pi 3 260 mA
Raspberry Pi 2 220 mA
Raspberry Pi Zero 80 mA
(power draw at idle)
Benchmarks - Power
Raspberry Pi 2 0.15 Gflops/watt
For comparison:
• Core i7: 0.5 Gflops/watt
Source: http://www.phoronix.com/scan.php?page=article&item=raspberry-pi-burst&num=3
*
Go Small or Go Home
Lessons Learned
Lessons Learned
Test one change at a time.

Rinse and repeat.
Lessons Learned
Networks are always reliable.
Lessons Learned
Networks are always reliable.
NEVER!
The Big Question
Can you run a Fortune 500
website in your basement?
Resources
• www.pidramble.com
• Jeff Geerling's Blog
• Win the Pi Zero! Subscribe on

www.ansiblefordevops.com

Highly available Drupal on a Raspberry Pi cluster