SlideShare a Scribd company logo
1 of 32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Web Cache
 
 
Brought to you from the Batcave ,[object Object]
 
 
 

More Related Content

More from WordCamp Cape Town

Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
WordCamp Cape Town
 
Jess green (get the wordpress relationship working)
Jess green (get the wordpress relationship working)Jess green (get the wordpress relationship working)
Jess green (get the wordpress relationship working)
WordCamp Cape Town
 

More from WordCamp Cape Town (9)

Neil pursey Yoast’s SEO plugin for WordPress
Neil pursey Yoast’s SEO plugin for WordPressNeil pursey Yoast’s SEO plugin for WordPress
Neil pursey Yoast’s SEO plugin for WordPress
 
Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)Roy foubister (hosting high traffic sites on a tight budget)
Roy foubister (hosting high traffic sites on a tight budget)
 
Making money with WordPress
Making money with WordPressMaking money with WordPress
Making money with WordPress
 
The future of WordPress
The future of WordPressThe future of WordPress
The future of WordPress
 
Matt geri (mobile as publishing platform)
Matt geri (mobile as publishing platform)Matt geri (mobile as publishing platform)
Matt geri (mobile as publishing platform)
 
Jess green (get the wordpress relationship working)
Jess green (get the wordpress relationship working)Jess green (get the wordpress relationship working)
Jess green (get the wordpress relationship working)
 
Fred roed (what a 60’s rock n’ roll band can teach us about online publishing)
Fred roed (what a 60’s rock n’ roll band can teach us about online publishing)Fred roed (what a 60’s rock n’ roll band can teach us about online publishing)
Fred roed (what a 60’s rock n’ roll band can teach us about online publishing)
 
David Perel About Obox
David Perel About OboxDavid Perel About Obox
David Perel About Obox
 
Rafiq phillips (seo fundamentalism)
Rafiq phillips (seo fundamentalism)Rafiq phillips (seo fundamentalism)
Rafiq phillips (seo fundamentalism)
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
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...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
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...
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Ashley Shaw (Scaling WordPress)

Editor's Notes

  1. Started in 2003 with shared Hosting on Hostgator CPanel to partition and resell hosting space Mostly static websites
  2. Finding a suitable hosting provider was a challenge Decided to move to Dreamhost because it was endorsed by wordpress.org  We started with their shared hosting and when they brought out VPS we were early adopters We had a VPS webserver and a VPS MySQL server At the same time the VPS solution allowed us to dynamically scale memory as we needed it Performance problems started, VPS Decided to start looking else where before it became a problem We setup systems in two other locations: linode.com SliceHost 6 months of testing
  3. Where did I get my inspiration to build FMM platform?  WordPress.com is what I dream about they now run Nginx 100%, no more light, lighttpd, apache 1500 servers in 3 data centers all running Nginx Caching = memcached Object caching with memchached Hard drives are solid state drives Used to use varnish, but its problematic, batcache replacing it Filesystem = ext4 - The ext4 or fourth extended filesystem is a journaling file system for Linux, developed as the successor to ext3.
  4. Launched in 2009 on Linode.com Hosting Number of HTTP requests: FMM ~100k per week, M24 ~200K per week Number of MySQL queries: ~500 qps (queries per second) Number of sites hosted: ~100 Live Sites, ~670 Dev Sites Monthly bandwidth usage: ~1TB per month, excluding internal traffic between servers ------ On WordPress.com we have over 218 million tables and perform tens of thousands queries per second.  To scale all of this, we shard our 24 million blogs across more than 550 MySQL servers.  This allows us to cope with load bursts and to handle database servers failures.
  5. HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying. It is particularly suited for web sites crawling under very high loads. Supporting tens of thousands of connections is clearly realistic with todays hardware. Its mode of operation makes its integration into existing architectures very easy and riskless, while still offering the possibility not to expose fragile web servers to the Net, So your website just went viral. Congrats! Now you have a new set of problems: How do you scale your application and services to meet your growing demand? How do you manage multiple Linodes all participating as a single system? How do you monitor the health of those Linodes, and take them in and out of rotation automatically? How do you coordinate deployment of new codebases without disrupting existing sessions? NodeBalancer is a managed load-balancer-as-a-service (lbaas), built upon a high-available cloud cluster architecture. Placing a NodeBalancer in front of your Linode cloud servers allows you to scale your applications and service horizontally and also adds conveniences like being able to perform rolling upgrades across your fleet without affecting existing sessions. A NodeBalancer is $19.95/mo and can balance multiple ports at no additional cost. Public network transfer is deducted from your existing Transfer Pool. 
  6. Pronounced “engine x” High performance low resource web server 7% of top million sites run nginx Stability, since starting to use it has never crashed
  7. The C10k problem refers to the problem of optimising web server software to handle a large number of clients at the same time.  Most web servers currently can handle at most ten thousand clients simultaneously. Nginx can handle more than 10k simultaneous requests.
  8. What is it PHP-FPM - Process management - Dynamic process spawning - Auto recovery if crash - Easy to integrate with NGiNX
  9. Scalability: distribute query workload from backend to multiple cheap front-end systems. Flexibility: achieve QoS, where each cache hosts different parts of the backend data Availability: by continued service for applications that depend only on cached tables even if the backend server is unavailable. Performance: by potentially responding fast because of locality of data and smoothing out load peaks by avoiding round-trips between middle-tier and data-tier
  10. A web cache is a mechanism for the temporary storage (caching) of web elements, to reduce bandwidth usage, server load, and perceived lag.  A web cache stores copies of web elements passing through it; subsequent requests may be satisfied from the cache if certain conditions are met.
  11. XCache is a fast, stable  PHP opcode cacher. It accelerates the performance of PHP, by caching compiled PHP for a pre defined amount of time therefore reducing the need to recompile the php on each subsequent pageload.  Faster for php-fpm than apc & eaccelerator
  12. Memcached Object Cache is a WordPress Plugin. Memcached Object Cache provides a persistent backend for the WordPress object cache.  Memcached Backend (WP Object Cache) -Caches queries, not page. Typical WordPress queries: --bloginfo() options (site title, description, language, theme stylesheet URL) --post or page title and contents --comments --sidebar widgets
  13. Batcache uses Memcached to store and serve rendered pages. It's not as fast as Donncha's WP-Super-Cache but it can be used where file-based caching is not practical or not desired. Development testing showed a 40x reduction in page generation times: pages generated in 200ms were served from the cache in 5ms. Traffic simulations with Siege demonstrate that WordPress can handle up to twenty times more traffic with Batcache installed. Batcache is aimed at preventing a flood of traffic from breaking your site. It does this by serving old pages to new users. This reduces the demand on the web server CPU and the database. It also means some people may see a page that is a few minutes old. However this only applies to people who have not interacted with your web site before. Once they have logged in or left a comment they will always get fresh pages. Possible future features: Comments, edits, and new posts will trigger cache regeneration Online installation assistance Configuration page Stats
  14. The dedicated database server’s run Percona MySQL Server  The Percona version of MySQL offers higher performance and stability over standard MySQL Benchmark for Percona Server: Percona Server is more than 40% faster than MySQL in overall throughput. Percona Server performance remains more stable over time than MySQL.
  15. Due to the nature of WordPress that requires allot of DB queries to be executed on each page load, utilizing the built in MySQL query cache can reduce extensive lookups by keeping the most recent queries in cache.
  16. HyperDB is a replacement for the standard wpdb class which adds the ability to use multiple databases. HyperDB supports partition of data as well as replication. Partitioning of Data - This involves moving different tables or different parts of the database into different databases, and normally on different servers. This allows you to scale an application by adding more database servers, so your data could be spread across several servers. HyperDB allows you to specify which data resides on which servers. Replication - Replication involves having one database server act as the master and other servers act as slaves. All the database writes must go to the master server, but database reads can be sent to slave servers, thus spreading the load amongst multiple servers. HyperDB allows you to split database writes and reads and assign each to an array of servers. Failover - HyperDB allows multiple servers to be configured and multiple routes to servers.