SlideShare a Scribd company logo
1 of 45
Download to read offline
High Availability
High Performance
Plone
Guido Stevens
guido.stevens@cosent.nl
www.cosent.nl
Social Knowledge Technology
Plone Worldwide
Resilience
Please wave, to improve my speech
Plone as usual
● Aspeli: über-buildout for a
production Plone server
● Regebro:
Plone-Buildout-Example
– nginx frontend
– varnish cache
– haproxy balancer
– 4x plone instance
– zeo backend
Plone as usual
Plone as usual
webserver :80
Plone as usual
caching
Plone as usual
balancing across Plone instances
Plone as usual
Plone instances
Plone as usual
ZEO backend
Meet the client
● High-profile internet technology NGO
● Slashdot traffic levels
– 0.4 million page views / peak day
– 4 million page views / month
– 40 million hits / month
● Mission-critical web presence
● 100% uptime previous 5 years
● Non-Plone sysadmins
● High security
No can do
SPOF
SPOF
WTF?
Architecture Goals
● Must convince “file-based 100% uptime” sysadmins
● No SPOF
– eliminate all Single Points Of Failure
● Automated failover
– no manual intervention
● Extreme performance
● Extreme resilience
– killall -9 Plone
Meet Paul Stevens
● My brother
● mod_wodan + DBmail
● Plone developer
● pjstevns on irc/github/etc
NFG Net Facilities Group
● premium hosting
● 24/7 MySQL HA
– since stone age
● www.nfg.nl
Plone as usual
3-tier
Plone as usual
Duplicate setup
Load Balancer
Load Balancer
● Client provided hardware load balancer
● Alternative: Linux Virtual Server + HAproxy
– 2x HAproxy in active/passive config
● this would be an EXTRA layer of HAproxy not shown in diagram
– use highly available “virtual” IP address
– monitor with Heartbeat or comparable
– failover virtual IP addres with arping broadcasts
● Alternative: AWS
Load Balancer
Ensure physical separation
● Ensure redundancy across physical servers
– no use to fail over on same machine
– separate machines in separate data centers
● Gotcha: moving virtuals around
– Disable HA facilities of virtualization platform
– We'll do our own HA
Full cluster
Replacing ZEO
ZEO versus Relstorage
● ZEO
– ZEO protocol
– filestorage
– object pickles
● ZRS Replication
– $$$ at the time
– later opensourced
● No hot-failover
– slave master reconfig→
● Relstorage
– ZEO protocol
– MySQL or PostgreSQL
– object pickles: no alchemy!
● MySQL replication
– done that 24/7 since 2001
– widely used
● Hot failover
– multi-master
Relstorage on MySQL
Blobstorage
● Not shown in diagram
● Client provided Netapp Metrocluster NFS disks
– no need to care about replication and HA for those
● Alternatives:
– DRBD + NFS
– AWS Elastic Block Device
– F-sniper + rsync + NFS
● Why not run database on that?
– disk replication + NFS + ZEO
– what can possibly go wrong?
Full cluster
Apache + Wodan
mod_wodan
● Caching module for Apache
– C
– Originally by ICS for nu.nl
– Now maintained by NFG
● Store response body + headers on disk
● BOFH attitude to caching policies
● Used in anger
● Alternative: stxnext.staticdeployment
Varnish ↔ Wodan
● Proxy process
● RAM memory cache
– restart → empty cache
– expired → gone
● Plays nice
– request + response headers
– etag split-view
● purge API
– plone.app.caching
● Apache module
● Persistent disk cache
– restart full cache→
– expired keep fallback→
● BOFH
– my way or the highway
– single cache file per page
● Cronjobs maintenance
– crawl sitemap
– delete removed pages
Varnish plus Wodan
Varnish
● unload Plone
● plone.app.caching policies
– pages 1 hour
– resources longer
– purge on edit
● etag split-view
– per-user page versions
– cache authenticated
Wodan
● failsafe content delivery
● hard policy config
– pages 1 minute
– resources longer
– edit 1-minute refresh→
● Gotcha: anonymous only
– editors bypass Wodan
Failure Modes
Full cluster
MySQL failover
Multi Master MySQL
● multi-master
– cross replication
● each slaves the other
– any can be master
● hot failover and failback
● Gotcha: use only 1 master at a time
– Relstorage is not multi-master
– avoid replication errors
● mmm_agent server (not shown in diagram)
– monitors mysql health and replication
– manages virtual MySQL HA ip address
● think: Heartbeat for MySQL
Blade failure
Wodan only
Plone as usual
file-based
content
delivery
Readonly Rescue Mode
● File-based content delivery
– mod_wodan
– full cache of all pages + resources
– cached search results (Subject / tag cloud)
● AJAX-driven graceful degradation
– detect backend down via non-cached lightweight view
● @@ipaddress not a full page: minimal rendering overhead
– disable interactive elements via CSS
● search bar, personal tools display:none→
● Gotcha: anonymous only
– down for authenticated until manual reconfig→
● Gotcha: ErrorDocument
– pre-cache nice page but preserve http error status code→
No-downtime maintenance
Full cluster
cosent.nl/blog

More Related Content

What's hot

Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
Chau Thanh
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
Thomas Weinert
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
guestd34230
 
Phorum MySQL tricks
Phorum MySQL tricksPhorum MySQL tricks
Phorum MySQL tricks
guestd34230
 
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
Nguyen Duc Phu
 

What's hot (20)

Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
 
Zingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHPZingme practice for building scalable website with PHP
Zingme practice for building scalable website with PHP
 
Optimizing Your Frontend Performance
Optimizing Your Frontend PerformanceOptimizing Your Frontend Performance
Optimizing Your Frontend Performance
 
Storage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStackStorage based snapshots for KVM VMs in CloudStack
Storage based snapshots for KVM VMs in CloudStack
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needs
 
Web Performance Part 3 "Server-side tips"
Web Performance Part 3  "Server-side tips"Web Performance Part 3  "Server-side tips"
Web Performance Part 3 "Server-side tips"
 
Real-world Experiences in Scala
Real-world Experiences in ScalaReal-world Experiences in Scala
Real-world Experiences in Scala
 
From One to a Cluster
From One to a ClusterFrom One to a Cluster
From One to a Cluster
 
Cache hcm-topdev
Cache hcm-topdevCache hcm-topdev
Cache hcm-topdev
 
Advanced front-end automation with npm scripts
Advanced front-end automation with npm scriptsAdvanced front-end automation with npm scripts
Advanced front-end automation with npm scripts
 
GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)GUC Tutorial Package (9.0)
GUC Tutorial Package (9.0)
 
Server Side Apocalypse, JS
Server Side Apocalypse, JSServer Side Apocalypse, JS
Server Side Apocalypse, JS
 
92 grand prix_2013
92 grand prix_201392 grand prix_2013
92 grand prix_2013
 
2008 MySQL Conference Recap
2008 MySQL Conference Recap2008 MySQL Conference Recap
2008 MySQL Conference Recap
 
Design a scalable site: Problem and solutions
Design a scalable site: Problem and solutionsDesign a scalable site: Problem and solutions
Design a scalable site: Problem and solutions
 
Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!
 
Salt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration ManagementSalt Stack pt. 2 : Configuration Management
Salt Stack pt. 2 : Configuration Management
 
Phorum MySQL tricks
Phorum MySQL tricksPhorum MySQL tricks
Phorum MySQL tricks
 
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
02 vng thanhnt-speedup_ntvv2_by_ph_pextmodule_
 
Modernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & BowerModernizing Your WordPress Workflow with Grunt & Bower
Modernizing Your WordPress Workflow with Grunt & Bower
 

Viewers also liked

ARMA Denver Implementing An ECM System Final 6_21_2016
ARMA Denver Implementing An ECM System Final 6_21_2016ARMA Denver Implementing An ECM System Final 6_21_2016
ARMA Denver Implementing An ECM System Final 6_21_2016
Craig Young
 
How gov 2.0 is taking the uk by storm ben fowkes
How gov 2.0 is taking the uk by storm   ben fowkesHow gov 2.0 is taking the uk by storm   ben fowkes
How gov 2.0 is taking the uk by storm ben fowkes
PublicVoice
 
UK E-Gov: An Overview
UK E-Gov: An OverviewUK E-Gov: An Overview
UK E-Gov: An Overview
Gordon Lu
 

Viewers also liked (12)

Plone on RelStorage
Plone on RelStoragePlone on RelStorage
Plone on RelStorage
 
Replicação e escalabidade do ZODB com RelStorage
Replicação e escalabidade do ZODB com RelStorageReplicação e escalabidade do ZODB com RelStorage
Replicação e escalabidade do ZODB com RelStorage
 
ZEO/RelStorage/PostgreSQL
ZEO/RelStorage/PostgreSQLZEO/RelStorage/PostgreSQL
ZEO/RelStorage/PostgreSQL
 
Large Files without the Trials
Large Files without the TrialsLarge Files without the Trials
Large Files without the Trials
 
PloneConf 2014 CDN terada
PloneConf 2014 CDN teradaPloneConf 2014 CDN terada
PloneConf 2014 CDN terada
 
The Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with PloneThe Mountaineers: Scaling the Heights with Plone
The Mountaineers: Scaling the Heights with Plone
 
ARMA Denver Implementing An ECM System Final 6_21_2016
ARMA Denver Implementing An ECM System Final 6_21_2016ARMA Denver Implementing An ECM System Final 6_21_2016
ARMA Denver Implementing An ECM System Final 6_21_2016
 
How gov 2.0 is taking the uk by storm ben fowkes
How gov 2.0 is taking the uk by storm   ben fowkesHow gov 2.0 is taking the uk by storm   ben fowkes
How gov 2.0 is taking the uk by storm ben fowkes
 
What is-ecm-1227461596391360-9
What is-ecm-1227461596391360-9What is-ecm-1227461596391360-9
What is-ecm-1227461596391360-9
 
Painless Consultation Publishing
Painless Consultation PublishingPainless Consultation Publishing
Painless Consultation Publishing
 
UK E-Gov: An Overview
UK E-Gov: An OverviewUK E-Gov: An Overview
UK E-Gov: An Overview
 
Resource registries plone conf 2014
Resource registries plone conf 2014Resource registries plone conf 2014
Resource registries plone conf 2014
 

Similar to High-performance high-availability Plone

Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and Scaling
Gerald Villorente
 
Overview of sheepdog
Overview of sheepdogOverview of sheepdog
Overview of sheepdog
Liu Yuan
 

Similar to High-performance high-availability Plone (20)

Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA SolutionsNagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
Nagios Conference 2014 - Andy Brist - Nagios XI Failover and HA Solutions
 
Virtualizing Development
Virtualizing DevelopmentVirtualizing Development
Virtualizing Development
 
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux AdminsLinuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
Linuxfest Northwest Proper Care and Feeding Of a MySQL for Busy Linux Admins
 
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux AdministratorsProper Care and Feeding of a MySQL Database for Busy Linux Administrators
Proper Care and Feeding of a MySQL Database for Busy Linux Administrators
 
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
The Proper Care and Feeding of a MySQL Database for Busy Linux Admins -- SCaL...
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
 
Docker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los AngelesDocker 0.11 at MaxCDN meetup in Los Angeles
Docker 0.11 at MaxCDN meetup in Los Angeles
 
Deploying Perl apps on dotCloud
Deploying Perl apps on dotCloudDeploying Perl apps on dotCloud
Deploying Perl apps on dotCloud
 
Pure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talkPure Speed Drupal 4 Gov talk
Pure Speed Drupal 4 Gov talk
 
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT[HKDUG] #20180512 - Fix Hacked Drupal with GIT
[HKDUG] #20180512 - Fix Hacked Drupal with GIT
 
Hong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8thHong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8th
 
Optimizing Drupal Performance. Tips and Tricks
Optimizing Drupal Performance. Tips and TricksOptimizing Drupal Performance. Tips and Tricks
Optimizing Drupal Performance. Tips and Tricks
 
Hosted PostgreSQL
Hosted PostgreSQLHosted PostgreSQL
Hosted PostgreSQL
 
Veeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and TricksVeeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and Tricks
 
Vietnam qa meetup
Vietnam qa meetupVietnam qa meetup
Vietnam qa meetup
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and Scaling
 
The Accidental DBA
The Accidental DBAThe Accidental DBA
The Accidental DBA
 
Integrating CloudStack & Ceph
Integrating CloudStack & CephIntegrating CloudStack & Ceph
Integrating CloudStack & Ceph
 
Overview of sheepdog
Overview of sheepdogOverview of sheepdog
Overview of sheepdog
 
Plone Intranet under the hood
Plone Intranet under the hoodPlone Intranet under the hood
Plone Intranet under the hood
 

More from Guido Stevens

More from Guido Stevens (9)

Filter Bubbles - the discovery of tacit knowledge
Filter Bubbles - the discovery of tacit knowledgeFilter Bubbles - the discovery of tacit knowledge
Filter Bubbles - the discovery of tacit knowledge
 
Designing for Culture Change
Designing for Culture ChangeDesigning for Culture Change
Designing for Culture Change
 
The state of Plone Intranet
The state of Plone IntranetThe state of Plone Intranet
The state of Plone Intranet
 
Plone Intranet Consortium - united we stand, divided we fall
Plone Intranet Consortium - united we stand, divided we fallPlone Intranet Consortium - united we stand, divided we fall
Plone Intranet Consortium - united we stand, divided we fall
 
Share content across subsites in Plone: cultact.subsite
Share content across subsites in Plone: cultact.subsiteShare content across subsites in Plone: cultact.subsite
Share content across subsites in Plone: cultact.subsite
 
Plonesocial Roadmap PloneConf 2013
Plonesocial Roadmap PloneConf 2013Plonesocial Roadmap PloneConf 2013
Plonesocial Roadmap PloneConf 2013
 
PloneSocial Roadmap PLOG2013
PloneSocial Roadmap PLOG2013PloneSocial Roadmap PLOG2013
PloneSocial Roadmap PLOG2013
 
Door to door
Door to doorDoor to door
Door to door
 
Plone goes social
Plone goes socialPlone goes social
Plone goes social
 

Recently uploaded

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

High-performance high-availability Plone

  • 1. High Availability High Performance Plone Guido Stevens guido.stevens@cosent.nl www.cosent.nl Social Knowledge Technology
  • 4. Please wave, to improve my speech
  • 5.
  • 6. Plone as usual ● Aspeli: über-buildout for a production Plone server ● Regebro: Plone-Buildout-Example – nginx frontend – varnish cache – haproxy balancer – 4x plone instance – zeo backend
  • 10. Plone as usual balancing across Plone instances
  • 11. Plone as usual Plone instances
  • 13. Meet the client ● High-profile internet technology NGO ● Slashdot traffic levels – 0.4 million page views / peak day – 4 million page views / month – 40 million hits / month ● Mission-critical web presence ● 100% uptime previous 5 years ● Non-Plone sysadmins ● High security
  • 15. Architecture Goals ● Must convince “file-based 100% uptime” sysadmins ● No SPOF – eliminate all Single Points Of Failure ● Automated failover – no manual intervention ● Extreme performance ● Extreme resilience – killall -9 Plone
  • 16. Meet Paul Stevens ● My brother ● mod_wodan + DBmail ● Plone developer ● pjstevns on irc/github/etc NFG Net Facilities Group ● premium hosting ● 24/7 MySQL HA – since stone age ● www.nfg.nl
  • 22. Load Balancer ● Client provided hardware load balancer ● Alternative: Linux Virtual Server + HAproxy – 2x HAproxy in active/passive config ● this would be an EXTRA layer of HAproxy not shown in diagram – use highly available “virtual” IP address – monitor with Heartbeat or comparable – failover virtual IP addres with arping broadcasts ● Alternative: AWS
  • 24. Ensure physical separation ● Ensure redundancy across physical servers – no use to fail over on same machine – separate machines in separate data centers ● Gotcha: moving virtuals around – Disable HA facilities of virtualization platform – We'll do our own HA
  • 27. ZEO versus Relstorage ● ZEO – ZEO protocol – filestorage – object pickles ● ZRS Replication – $$$ at the time – later opensourced ● No hot-failover – slave master reconfig→ ● Relstorage – ZEO protocol – MySQL or PostgreSQL – object pickles: no alchemy! ● MySQL replication – done that 24/7 since 2001 – widely used ● Hot failover – multi-master
  • 29. Blobstorage ● Not shown in diagram ● Client provided Netapp Metrocluster NFS disks – no need to care about replication and HA for those ● Alternatives: – DRBD + NFS – AWS Elastic Block Device – F-sniper + rsync + NFS ● Why not run database on that? – disk replication + NFS + ZEO – what can possibly go wrong?
  • 32. mod_wodan ● Caching module for Apache – C – Originally by ICS for nu.nl – Now maintained by NFG ● Store response body + headers on disk ● BOFH attitude to caching policies ● Used in anger ● Alternative: stxnext.staticdeployment
  • 33. Varnish ↔ Wodan ● Proxy process ● RAM memory cache – restart → empty cache – expired → gone ● Plays nice – request + response headers – etag split-view ● purge API – plone.app.caching ● Apache module ● Persistent disk cache – restart full cache→ – expired keep fallback→ ● BOFH – my way or the highway – single cache file per page ● Cronjobs maintenance – crawl sitemap – delete removed pages
  • 34. Varnish plus Wodan Varnish ● unload Plone ● plone.app.caching policies – pages 1 hour – resources longer – purge on edit ● etag split-view – per-user page versions – cache authenticated Wodan ● failsafe content delivery ● hard policy config – pages 1 minute – resources longer – edit 1-minute refresh→ ● Gotcha: anonymous only – editors bypass Wodan
  • 38. Multi Master MySQL ● multi-master – cross replication ● each slaves the other – any can be master ● hot failover and failback ● Gotcha: use only 1 master at a time – Relstorage is not multi-master – avoid replication errors ● mmm_agent server (not shown in diagram) – monitors mysql health and replication – manages virtual MySQL HA ip address ● think: Heartbeat for MySQL
  • 42. Readonly Rescue Mode ● File-based content delivery – mod_wodan – full cache of all pages + resources – cached search results (Subject / tag cloud) ● AJAX-driven graceful degradation – detect backend down via non-cached lightweight view ● @@ipaddress not a full page: minimal rendering overhead – disable interactive elements via CSS ● search bar, personal tools display:none→ ● Gotcha: anonymous only – down for authenticated until manual reconfig→ ● Gotcha: ErrorDocument – pre-cache nice page but preserve http error status code→