Roshan Bhattarai: Scaling WordPress for high traffic sites

2,162 views
2,055 views

Published on

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,162
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Roshan Bhattarai: Scaling WordPress for high traffic sites

  1. 1. Scaling WordPress for High Traffic
  2. 2. Roshan Bhattarai• Father• Author - (Co-author : PHP Ajax Cookbook )• Software Developer• And so called CTO @ proshore
  3. 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. 4. W3 Total CacheMain Features :• Page Caching• Minify• Database Caching• Headers: W3TC manages the HTTP headers (cache-control, expires)• Content Delivery Network (CDN )
  5. 5. Content Delivery Network• Serving static content directly from own server• Uploading static files to server and serving from there
  6. 6. Still problem ………………..Time to move to VPS or Dedicated Server 
  7. 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. 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. 9. Still high CPU and memory ususage on server Time to use multiple HTTP servers and multiple database servers.
  10. 10. Using Load balancer
  11. 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.
  12. 12. Database Replication
  13. 13. Database ShardingSoftware used for sharding MySQL : HiveDB
  14. 14. For WordPress use HyperDB • Ability to use multiple databases.• Supports partition of data.• Supports replication.• Supports failover.
  15. 15. Thank you for listening  Any questions?

×