KEMBAR78
WordCamp IL 2016 - WordPress Scale on AWS | PDF
Scale WordPress on AWS
(in 15 minutes)
Boaz Ziniman – Zend Technologies
2
Agenda
• Introduction
• WordPress Challenges in a cluster set up
• Zend Server on AWS
• Setup your Cluster
• Deploy your cluster ready WordPress app on AWS
• Q&A
3
About me
• Working @Zend for the last 9+ years
• Managing Zend’s Cloud initiatives (and few other roles...)
• AWS user for….ever
• Years of web applications development and operations
• Blogging about Cloud in H-E-B-R-E-W!
Find me @:
boaz.z@zend.com
@ziniman
http://ziniman.com
WordPress Challenges
in a cluster set up
Why do we need a cluster?
• High Availability
• Scalability
6
Storing	images	and	media	on	multiple	servers
7
Deployments
8
Scale	up	and	SCALE	DOWN
9
Synchronize	Settings
"RAF	Red	Arrows	- Rhyl Air	Show"	 by	Tim	Fields
10
Sessions	handling
11
WordPress Challenges in a cluster setup
• Storing images and media on multiple servers
• Deployments
– New code
– Repeatable deployments
– Automations
• Scale up and SCALE DOWN
• Synchronize Settings (between environments and
servers)
• Sessions handling
• Cron jobs*
The Solution
13
Why use this approach
• Better than NFS and rsync solutions
• No need to have a master node
• No need to capture images of servers to scale from
• Easier deployments
• Zend Server provides
– Caching out of the box
– Session Clustering
– Job Queue (can be used for Crons)
14
Zend Server on AWS Marketplace
• The fastest way to get Zend Server in the Cloud
• Pay as you go (based on your instance type)
• 30 days free trial
• Full SLA and Support
• Available for PHP 5.3 – 5.6 (PHP7 coming soon)
• Devbox for less than ¢5/hour
• AWS Z-Ray extension
• CloudFormation template generator
15
Basic Single Server Setup
• One instance with Zend Server using AWS Marketplace
• MySQL for app
• Elastic IP
Developer
http://wordpress.zendcloud.com/
Zend	Server	AWS	
Marketplace	Instance Application	DB
16
Zero to Cluster in 15 min
Users
http://wordpress-cluster.zendcloud.com
Zend	Server	AWS	
Marketplace	
Instance
Zend	Server	DB
Zend	Server	AWS	
Marketplace	
Instance
Zend	Server	AWS	
Marketplace	
Instance
Zend	Server	AWS	
Marketplace	
Instance
Zend	Server	AWS	
Marketplace	
Instance
ELB
Application	DB
Auto scaling Group
CloudWatch
Alarm
AWS	
CloudFormation
Template
17
Local Setup
• Zend Server and MySQL running on Docker containers
• Latest Vanilla WordPress (4.4.2) from wordpress.org
– A nice theme (Radiate)
– Amazon Web Services & WP Offload S3 Lite
• A repository on github (https://github.com/ziniman)
• Zend Studio to edit my code and create a Zend Server
ZPK
18
Some shortcuts I did
• Setup WordPress on my local box (Docker using
Kitmatic)
• Configure my blog
• Dump the DB
• On AWS
– Deploy my Dev DB on it
– Edit DB to production hostname
15 minutes…. GO
20
Resources
• Zend CloudFormation generator
– http://bit.ly/zendcf
• Zend Server on AWS Marketplace
– http://bit.ly/awszend
• Zend Server on Docker
– http://bit.ly/dockerzend (or search for Zend on Docker Hub)
• Git repo of this demo
– http://bit.ly/wpcluster
21
Thank	You!
boaz.z@zend.com
@ziniman

WordCamp IL 2016 - WordPress Scale on AWS

  • 1.
    Scale WordPress onAWS (in 15 minutes) Boaz Ziniman – Zend Technologies
  • 2.
    2 Agenda • Introduction • WordPressChallenges in a cluster set up • Zend Server on AWS • Setup your Cluster • Deploy your cluster ready WordPress app on AWS • Q&A
  • 3.
    3 About me • Working@Zend for the last 9+ years • Managing Zend’s Cloud initiatives (and few other roles...) • AWS user for….ever • Years of web applications development and operations • Blogging about Cloud in H-E-B-R-E-W! Find me @: boaz.z@zend.com @ziniman http://ziniman.com
  • 4.
  • 5.
    Why do weneed a cluster? • High Availability • Scalability
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
    11 WordPress Challenges ina cluster setup • Storing images and media on multiple servers • Deployments – New code – Repeatable deployments – Automations • Scale up and SCALE DOWN • Synchronize Settings (between environments and servers) • Sessions handling • Cron jobs*
  • 12.
  • 13.
    13 Why use thisapproach • Better than NFS and rsync solutions • No need to have a master node • No need to capture images of servers to scale from • Easier deployments • Zend Server provides – Caching out of the box – Session Clustering – Job Queue (can be used for Crons)
  • 14.
    14 Zend Server onAWS Marketplace • The fastest way to get Zend Server in the Cloud • Pay as you go (based on your instance type) • 30 days free trial • Full SLA and Support • Available for PHP 5.3 – 5.6 (PHP7 coming soon) • Devbox for less than ¢5/hour • AWS Z-Ray extension • CloudFormation template generator
  • 15.
    15 Basic Single ServerSetup • One instance with Zend Server using AWS Marketplace • MySQL for app • Elastic IP Developer http://wordpress.zendcloud.com/ Zend Server AWS Marketplace Instance Application DB
  • 16.
    16 Zero to Clusterin 15 min Users http://wordpress-cluster.zendcloud.com Zend Server AWS Marketplace Instance Zend Server DB Zend Server AWS Marketplace Instance Zend Server AWS Marketplace Instance Zend Server AWS Marketplace Instance Zend Server AWS Marketplace Instance ELB Application DB Auto scaling Group CloudWatch Alarm AWS CloudFormation Template
  • 17.
    17 Local Setup • ZendServer and MySQL running on Docker containers • Latest Vanilla WordPress (4.4.2) from wordpress.org – A nice theme (Radiate) – Amazon Web Services & WP Offload S3 Lite • A repository on github (https://github.com/ziniman) • Zend Studio to edit my code and create a Zend Server ZPK
  • 18.
    18 Some shortcuts Idid • Setup WordPress on my local box (Docker using Kitmatic) • Configure my blog • Dump the DB • On AWS – Deploy my Dev DB on it – Edit DB to production hostname
  • 19.
  • 20.
    20 Resources • Zend CloudFormationgenerator – http://bit.ly/zendcf • Zend Server on AWS Marketplace – http://bit.ly/awszend • Zend Server on Docker – http://bit.ly/dockerzend (or search for Zend on Docker Hub) • Git repo of this demo – http://bit.ly/wpcluster
  • 21.