highly available drupal on a raspberry pi cluster

44
Highly Available Drupal on a Raspberry Pi Cluster Jeff Geerling, php[tek] 2016 (geerlingguy) http://www.shockinglydelicious.com/dorothys-fresh-raspberry-pie-recipe/

Upload: jeff-geerling

Post on 16-Jan-2017

1.952 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Highly available Drupal on a Raspberry Pi cluster

Highly Available Drupal on a Raspberry Pi Cluster

Jeff Geerling, php[tek] 2016 (geerlingguy)

http://www.shockinglydelicious.com/dorothys-fresh-raspberry-pie-recipe/

Page 2: Highly available Drupal on a Raspberry Pi cluster

http://www.shockinglydelicious.com/dorothys-fresh-raspberry-pie-recipe/

Page 3: Highly available Drupal on a Raspberry Pi cluster

The Big Question

Can you run a Fortune 500 website in your basement?

Page 4: Highly available Drupal on a Raspberry Pi cluster

Another Question

Why would you?

Page 5: Highly available Drupal on a Raspberry Pi cluster

Gateway 2000 486 PC, RedHat Linux 6

1999

Page 6: Highly available Drupal on a Raspberry Pi cluster

Whistle Interjet, running FreeBSD 4

Page 7: Highly available Drupal on a Raspberry Pi cluster

Raspberry Pi 1 model B

Page 8: Highly available Drupal on a Raspberry Pi cluster
Page 9: Highly available Drupal on a Raspberry Pi cluster

Problems with one Pi

Page 10: Highly available Drupal on a Raspberry Pi cluster

Problems with one Pi

• No redundancy

Page 11: Highly available Drupal on a Raspberry Pi cluster

Problems with one Pi

• No redundancy

• microSD card reliability

Page 12: Highly available Drupal on a Raspberry Pi cluster

Problems with one Pi

• No redundancy

• microSD card reliability

• No database backup

Page 13: Highly available Drupal on a Raspberry Pi cluster

Problems with one Pi

• No redundancy

• microSD card reliability

• No database backup

• Limited resources

Page 14: Highly available Drupal on a Raspberry Pi cluster

• No redundancy

• microSD card reliability

• No database backup

• Limited resources

High AvailabilitySingle Pi Multi Pi

Page 15: Highly available Drupal on a Raspberry Pi cluster

• Easy redundancy• No redundancy

• microSD card reliability

• No database backup

• Limited resources

High AvailabilitySingle Pi Multi Pi

Page 16: Highly available Drupal on a Raspberry Pi cluster

• Easy redundancy

• Can hot-swap a Pi

• No redundancy

• microSD card reliability

• No database backup

• Limited resources

High AvailabilitySingle Pi Multi Pi

Page 17: Highly available Drupal on a Raspberry Pi cluster

• Easy redundancy

• Can hot-swap a Pi

• Hot database backup

• No redundancy

• microSD card reliability

• No database backup

• Limited resources

High AvailabilitySingle Pi Multi Pi

Page 18: Highly available Drupal on a Raspberry Pi cluster

• Easy redundancy

• Can hot-swap a Pi

• Hot database backup

• Each server optimized

• No redundancy

• microSD card reliability

• No database backup

• Limited resources

High AvailabilitySingle Pi Multi Pi

Page 19: Highly available Drupal on a Raspberry Pi cluster

2014

Page 20: Highly available Drupal on a Raspberry Pi cluster
Page 21: Highly available Drupal on a Raspberry Pi cluster
Page 22: Highly available Drupal on a Raspberry Pi cluster

CPU 20 cores / 6 GHz

RAM 5 GB

Storage 80 GB microSD

Network 10/100 over Gig

www.pidramble.com

Raspberry Pi Cluster

Page 23: Highly available Drupal on a Raspberry Pi cluster
Page 24: Highly available Drupal on a Raspberry Pi cluster

Problem

How do you wrangle all these Pis?

Page 25: Highly available Drupal on a Raspberry Pi cluster

“Configuration management for humans.”

Page 26: Highly available Drupal on a Raspberry Pi cluster

“Configuration management for humans.”

___________<Andcows!>-----------\^__^\(oo)\_______(__)\)\/\||----w|||||

Page 27: Highly available Drupal on a Raspberry Pi cluster

Source: https://flic.kr/p/nkcFoU

Page 29: Highly available Drupal on a Raspberry Pi cluster

Demo

Page 30: Highly available Drupal on a Raspberry Pi cluster

How did it do?

Page 31: Highly available Drupal on a Raspberry Pi cluster

Benchmarks

Benchmark Standard

Uptime 99.95%

Max page loads/sec 1000

Power Consumption 0.5 Gflops/watt

Page 32: Highly available Drupal on a Raspberry Pi cluster

Benchmarks - Uptime

(as measured by Server Check.in)

Page 33: Highly available Drupal on a Raspberry Pi cluster

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

Page 34: Highly available Drupal on a Raspberry Pi cluster

Benchmarks - Power

Raspberry Pi 3 260 mA

Raspberry Pi 2 220 mA

Raspberry Pi Zero 80 mA

(power draw at idle)

Page 35: Highly available Drupal on a Raspberry Pi cluster

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

Page 36: Highly available Drupal on a Raspberry Pi cluster

*

Page 37: Highly available Drupal on a Raspberry Pi cluster

Go Small or Go Home

Page 38: Highly available Drupal on a Raspberry Pi cluster
Page 39: Highly available Drupal on a Raspberry Pi cluster

Lessons Learned

Page 40: Highly available Drupal on a Raspberry Pi cluster

Lessons Learned

Test one change at a time.Rinse and repeat.

Page 41: Highly available Drupal on a Raspberry Pi cluster

Lessons Learned

Networks are always reliable.

Page 42: Highly available Drupal on a Raspberry Pi cluster

Lessons Learned

Networks are always reliable.NEVER!

Page 43: Highly available Drupal on a Raspberry Pi cluster

The Big Question

Can you run a Fortune 500 website in your basement?

Page 44: Highly available Drupal on a Raspberry Pi cluster

Resources

• www.pidramble.com

• Jeff Geerling's Blog

• Win the Pi Zero! Subscribe onwww.ansiblefordevops.com