SlideShare a Scribd company logo
Scaling WordPress for High
         Traffic
Roshan Bhattarai
•   Father
•   Author - (Co-author : PHP Ajax Cookbook )
•   Software Developer
•    And so called CTO @ proshore
Optimization Tips for Shared hosting
• Use W3 Total Cache plugin for caching page and
  datas .
• Serve all the static contents(JavaScript , CSS files
  and Images ) from Content Delivery Network.
• Use jQuery lazy load plugin to server images if
  there are many.
• Minify and Gzip the CSS and and JavaScript files.
• For big number of posts and comment table use
  MySQL’s logical partition.
  http://pento.net/2011/04/28/partitioning-the-
  wordpress-comments-table/
W3 Total Cache
Main Features :
• Page Caching
• Minify
• Database Caching
• Headers: W3TC manages the HTTP headers
  (cache-control, expires)
• Content Delivery Network (CDN )
Content Delivery Network

• Serving static content directly from own server
• Uploading static files to server and serving
  from there
Still problem
           ………………..

Time to move to VPS or Dedicated
           Server 
Recommended Server Configuration
• Use Nginx Web Server than Apache
• Use Varnish or Squid (Reverse Proxy Servers )for
  serving static content over Nginx server
• Use PHP-FMP (FastCGI Process Manager)
• Implement Sphinx search engine or Lucene
  Search Engine for full text search on database.
• As always use CDN 
• Use Opcode Cache Engine for W3 Total Cache (
  APC recommended)
That should be able to cope around 10
     million hits a day on normal
          Wordpress website.

http://www.ewanleith.com/blog/900/
10-million-hits-a-day-with-wordpress-
          using-a-15-server
Still high CPU and memory ususage on
                server 

Time to use multiple HTTP servers and
      multiple database servers.
Using Load balancer
Load Balancing Technique
• Round Robin DNS
• Software Load balancer ( recommended
  HaProxy)
• Hardware load Balancing ( Cisco , Citrix etc )

Note : Use NFS to store static files and data on
 database.
Database Replication
Database Sharding




Software used for sharding MySQL : HiveDB
For WordPress use HyperDB 
•   Ability to use multiple databases.
•   Supports partition of data.
•   Supports replication.
•   Supports failover.
Thank you for listening 

     Any questions?

More Related Content

What's hot

Microsoft Azure Media Services
Microsoft Azure Media ServicesMicrosoft Azure Media Services
Microsoft Azure Media Services
Pavel Revenkov
 
Storage Services
Storage ServicesStorage Services
Storage Services
Pavel Revenkov
 
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
MongoDB and Amazon Web Services: Storage Options for MongoDB DeploymentsMongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
MongoDB
 
Bcache and Aerospike
Bcache and AerospikeBcache and Aerospike
Bcache and Aerospike
Anshu Prateek
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Trivandrum
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performaceTuyển Đoàn
 
Scaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanScaling WordPress on DigitalOcean
Scaling WordPress on DigitalOcean
ServerGuy
 
Caching Strategies
Caching StrategiesCaching Strategies
Caching Strategies
Michal Špaček
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
Barney Hanlon
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
Chris Westin
 
Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applications
BrettTasker
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
Ratnesh kumar, CSM
 
Edge performance with in memory nosql
Edge performance with in memory nosqlEdge performance with in memory nosql
Edge performance with in memory nosql
Liviu Costea
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and ScalingGerald Villorente
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
Rohit Kelapure
 
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Atwix
 
Implementing High Performance Drupal Sites
Implementing High Performance Drupal SitesImplementing High Performance Drupal Sites
Implementing High Performance Drupal Sites
Shri Kumar
 
Memcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainMemcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainDrupal Camp Delhi
 

What's hot (18)

Microsoft Azure Media Services
Microsoft Azure Media ServicesMicrosoft Azure Media Services
Microsoft Azure Media Services
 
Storage Services
Storage ServicesStorage Services
Storage Services
 
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
MongoDB and Amazon Web Services: Storage Options for MongoDB DeploymentsMongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
MongoDB and Amazon Web Services: Storage Options for MongoDB Deployments
 
Bcache and Aerospike
Bcache and AerospikeBcache and Aerospike
Bcache and Aerospike
 
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s  | WordPress TrivandrumWordPress Hosting Best Practices - Do's and Don't s  | WordPress Trivandrum
WordPress Hosting Best Practices - Do's and Don't s | WordPress Trivandrum
 
Php & web server performace
Php & web server performacePhp & web server performace
Php & web server performace
 
Scaling WordPress on DigitalOcean
Scaling WordPress on DigitalOceanScaling WordPress on DigitalOcean
Scaling WordPress on DigitalOcean
 
Caching Strategies
Caching StrategiesCaching Strategies
Caching Strategies
 
Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014Next Generation DevOps in Drupal: DrupalCamp London 2014
Next Generation DevOps in Drupal: DrupalCamp London 2014
 
Building low latency java applications with ehcache
Building low latency java applications with ehcacheBuilding low latency java applications with ehcache
Building low latency java applications with ehcache
 
Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applications
 
Drupal performance optimization Best Practices
Drupal performance optimization Best PracticesDrupal performance optimization Best Practices
Drupal performance optimization Best Practices
 
Edge performance with in memory nosql
Edge performance with in memory nosqlEdge performance with in memory nosql
Edge performance with in memory nosql
 
Drupal Performance and Scaling
Drupal Performance and ScalingDrupal Performance and Scaling
Drupal Performance and Scaling
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
Host and Boast: Best Practices for Magento Hosting | Imagine 2013 Technolog…
 
Implementing High Performance Drupal Sites
Implementing High Performance Drupal SitesImplementing High Performance Drupal Sites
Implementing High Performance Drupal Sites
 
Memcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav JainMemcache and Drupal - Vaibhav Jain
Memcache and Drupal - Vaibhav Jain
 

Viewers also liked

Enhance WordPress Search Using Sphinx
Enhance WordPress Search Using SphinxEnhance WordPress Search Using Sphinx
Enhance WordPress Search Using Sphinx
Roshan Bhattarai
 
Project titles for B.E
Project titles for  B.EProject titles for  B.E
Project titles for B.E
Senthil Kumar
 
Qualidade em Sac 2.0
Qualidade em Sac 2.0Qualidade em Sac 2.0
Qualidade em Sac 2.0
Bianca Fabianowicz
 
Deepak strategic managemt -apple
Deepak  strategic managemt -appleDeepak  strategic managemt -apple
Deepak strategic managemt -apple
Deepak R Gorad
 
Brief about nature care hospital pvt.ltd.
Brief about nature care hospital pvt.ltd.Brief about nature care hospital pvt.ltd.
Brief about nature care hospital pvt.ltd.
harisharanaryal
 
Presentatie rotary
Presentatie rotaryPresentatie rotary
Presentatie rotarypgvanderpoel
 
What Makes Mobile Websites Tick - Oredev
What Makes Mobile Websites Tick - OredevWhat Makes Mobile Websites Tick - Oredev
What Makes Mobile Websites Tick - Oredev
Doug Sillars
 
めとべや東京#7セッション資料(公開用)
めとべや東京#7セッション資料(公開用)めとべや東京#7セッション資料(公開用)
めとべや東京#7セッション資料(公開用)
OD-10Z Midorikawa
 
Dsg steel1
Dsg steel1Dsg steel1
Dsg steel1
Deepak R Gorad
 
PolyU Design I MAKE Initiative (2015-10-31)
PolyU Design I MAKE Initiative (2015-10-31)PolyU Design I MAKE Initiative (2015-10-31)
PolyU Design I MAKE Initiative (2015-10-31)
Clifford Choy
 

Viewers also liked (14)

Enhance WordPress Search Using Sphinx
Enhance WordPress Search Using SphinxEnhance WordPress Search Using Sphinx
Enhance WordPress Search Using Sphinx
 
Project titles for B.E
Project titles for  B.EProject titles for  B.E
Project titles for B.E
 
Qualidade em Sac 2.0
Qualidade em Sac 2.0Qualidade em Sac 2.0
Qualidade em Sac 2.0
 
Deepak strategic managemt -apple
Deepak  strategic managemt -appleDeepak  strategic managemt -apple
Deepak strategic managemt -apple
 
Electricmotor2
Electricmotor2Electricmotor2
Electricmotor2
 
Brief about nature care hospital pvt.ltd.
Brief about nature care hospital pvt.ltd.Brief about nature care hospital pvt.ltd.
Brief about nature care hospital pvt.ltd.
 
Presentatie rotary
Presentatie rotaryPresentatie rotary
Presentatie rotary
 
Gmics vslides120811
Gmics vslides120811Gmics vslides120811
Gmics vslides120811
 
Hrm
HrmHrm
Hrm
 
What Makes Mobile Websites Tick - Oredev
What Makes Mobile Websites Tick - OredevWhat Makes Mobile Websites Tick - Oredev
What Makes Mobile Websites Tick - Oredev
 
E -commerce by DRG
E -commerce by DRGE -commerce by DRG
E -commerce by DRG
 
めとべや東京#7セッション資料(公開用)
めとべや東京#7セッション資料(公開用)めとべや東京#7セッション資料(公開用)
めとべや東京#7セッション資料(公開用)
 
Dsg steel1
Dsg steel1Dsg steel1
Dsg steel1
 
PolyU Design I MAKE Initiative (2015-10-31)
PolyU Design I MAKE Initiative (2015-10-31)PolyU Design I MAKE Initiative (2015-10-31)
PolyU Design I MAKE Initiative (2015-10-31)
 

Similar to Scaling wordpress for high traffic

05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebservertarensi
 
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)
jaredwsmith
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
David Newman
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
Chris Olbekson
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
Chapter Three
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
Danilo Ercoli
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
ProdigyView
 
DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
cherryhillco
 
High Performance Drupal Sites
High Performance Drupal SitesHigh Performance Drupal Sites
High Performance Drupal Sites
Abayomi Ayoola
 
Apache Content Technologies
Apache Content TechnologiesApache Content Technologies
Apache Content Technologies
gagravarr
 
hardenning Operating System Server Berbasis Linux
hardenning Operating System Server Berbasis Linuxhardenning Operating System Server Berbasis Linux
hardenning Operating System Server Berbasis Linux
jokerman16
 
You Can Be an Open Source Library
You Can Be an Open Source LibraryYou Can Be an Open Source Library
You Can Be an Open Source Library
Myka Kennedy Stephens
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experience
reeder29
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
Albert Chen
 
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
NoSQLmatters
 
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
Betclic Everest Group Tech Team
 
Aem offline content
Aem offline contentAem offline content
Aem offline content
Ashokkumar T A
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
Zero Point Development
 
Web Servers(IIS, NGINX, APACHE)
Web Servers(IIS, NGINX, APACHE)Web Servers(IIS, NGINX, APACHE)
Web Servers(IIS, NGINX, APACHE)
Reza Jebeli
 
Nginx caching
Nginx cachingNginx caching
Nginx caching
reneedv
 

Similar to Scaling wordpress for high traffic (20)

05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver05.m3 cms list-ofwebserver
05.m3 cms list-ofwebserver
 
WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)WordPress at Peak Performance (Radio Edit)
WordPress at Peak Performance (Radio Edit)
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
 
Optimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp HoustonOptimizing WordPress for Performance - WordCamp Houston
Optimizing WordPress for Performance - WordCamp Houston
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 
Improve WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of codeImprove WordPress performance with caching and deferred execution of code
Improve WordPress performance with caching and deferred execution of code
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
DrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalabilityDrupalCampLA 2014 - Drupal backend performance and scalability
DrupalCampLA 2014 - Drupal backend performance and scalability
 
High Performance Drupal Sites
High Performance Drupal SitesHigh Performance Drupal Sites
High Performance Drupal Sites
 
Apache Content Technologies
Apache Content TechnologiesApache Content Technologies
Apache Content Technologies
 
hardenning Operating System Server Berbasis Linux
hardenning Operating System Server Berbasis Linuxhardenning Operating System Server Berbasis Linux
hardenning Operating System Server Berbasis Linux
 
You Can Be an Open Source Library
You Can Be an Open Source LibraryYou Can Be an Open Source Library
You Can Be an Open Source Library
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experience
 
High Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance TuningHigh Concurrency Architecture and Laravel Performance Tuning
High Concurrency Architecture and Laravel Performance Tuning
 
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
Bruno Guedes - Hadoop real time for dummies - NoSQL matters Paris 2015
 
Mini-Training: To cache or not to cache
Mini-Training: To cache or not to cacheMini-Training: To cache or not to cache
Mini-Training: To cache or not to cache
 
Aem offline content
Aem offline contentAem offline content
Aem offline content
 
23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress23 Ways To Speed Up WordPress
23 Ways To Speed Up WordPress
 
Web Servers(IIS, NGINX, APACHE)
Web Servers(IIS, NGINX, APACHE)Web Servers(IIS, NGINX, APACHE)
Web Servers(IIS, NGINX, APACHE)
 
Nginx caching
Nginx cachingNginx caching
Nginx caching
 

Scaling wordpress for high traffic

  • 1. Scaling WordPress for High Traffic
  • 2. Roshan Bhattarai • Father • Author - (Co-author : PHP Ajax Cookbook ) • Software Developer • And so called CTO @ proshore
  • 3. Optimization Tips for Shared hosting • Use W3 Total Cache plugin for caching page and datas . • Serve all the static contents(JavaScript , CSS files and Images ) from Content Delivery Network. • Use jQuery lazy load plugin to server images if there are many. • Minify and Gzip the CSS and and JavaScript files. • For big number of posts and comment table use MySQL’s logical partition. http://pento.net/2011/04/28/partitioning-the- wordpress-comments-table/
  • 4. W3 Total Cache Main Features : • Page Caching • Minify • Database Caching • Headers: W3TC manages the HTTP headers (cache-control, expires) • Content Delivery Network (CDN )
  • 5. Content Delivery Network • Serving static content directly from own server • Uploading static files to server and serving from there
  • 6. Still problem ……………….. Time to move to VPS or Dedicated Server 
  • 7. Recommended Server Configuration • Use Nginx Web Server than Apache • Use Varnish or Squid (Reverse Proxy Servers )for serving static content over Nginx server • Use PHP-FMP (FastCGI Process Manager) • Implement Sphinx search engine or Lucene Search Engine for full text search on database. • As always use CDN  • Use Opcode Cache Engine for W3 Total Cache ( APC recommended)
  • 8. That should be able to cope around 10 million hits a day on normal Wordpress website. http://www.ewanleith.com/blog/900/ 10-million-hits-a-day-with-wordpress- using-a-15-server
  • 9. Still high CPU and memory ususage on server  Time to use multiple HTTP servers and multiple database servers.
  • 11. Load Balancing Technique • Round Robin DNS • Software Load balancer ( recommended HaProxy) • Hardware load Balancing ( Cisco , Citrix etc ) Note : Use NFS to store static files and data on database.
  • 13. Database Sharding Software used for sharding MySQL : HiveDB
  • 14. For WordPress use HyperDB  • Ability to use multiple databases. • Supports partition of data. • Supports replication. • Supports failover.
  • 15. Thank you for listening  Any questions?