Started in 2003 with shared Hosting on Hostgator CPanel to partition and resell hosting space Mostly static websites
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
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.
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.
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.
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
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.
What is it PHP-FPM - Process management - Dynamic process spawning - Auto recovery if crash - Easy to integrate with NGiNX
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
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.
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
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
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
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.
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.
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.