<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FeedMyMedia</title>
	<atom:link href="http://feedmymedia.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://feedmymedia.com</link>
	<description>WordPress Hosting for those who know better</description>
	<lastBuildDate>Sun, 30 Oct 2011 11:41:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Scaling WordPress: A FeedMyMedia Case Study</title>
		<link>http://feedmymedia.com/optimised-server-for-wordpress-multisite-and-buddypress/</link>
		<comments>http://feedmymedia.com/optimised-server-for-wordpress-multisite-and-buddypress/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 17:58:28 +0000</pubDate>
		<dc:creator>Ashley Shaw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Case Study]]></category>

		<guid isPermaLink="false">http://feedmydemo.co.za/?p=520</guid>
		<description><![CDATA[Build an optimised server config for WordPress Multisite and BuddyPress.]]></description>
				<content:encoded><![CDATA[<p>I spoke at <a title="WordCamp Cape Town" href="http://2011.capetown.wordcamp.org/" target="_blank">WordCamp Cape Town</a> on 15th of September 2011 about the FeedMyMedia.com infrastructure and scaling WordPress.</p>
<p><iframe width="940" height="529" src="http://www.youtube.com/embed/0PnugqbqIrM?feature=oembed" frameborder="0" allowfullscreen></iframe></p>
<p>We have been researching how to setup an optimized WordPress Multisite install as well as how to scale the server resources to server hundreds of thousands of HTTP requests. Its so hard to tell when you will need to scale, my advice is to scale before you need to.</p>
<p>Figure out how much your system can handle before it cracks. Here is what we did to setup a self-monitoring optimized dedicated redundant server, which is not scalable (will get to that later) yet but at least a solid base. Read about FeedMyMedia over the coming weeks:</p>
<ul>
<li><a title="Load Balancing" href="http://feedmymedia.com/load-balancing/">HAProxy Load Balancer</a></li>
<li><a title="NGINX with PHP-FPM" href="http://feedmymedia.com/nginx-with-php-fpm/">NGINX</a></li>
<li><a title="NGINX with PHP-FPM" href="http://feedmymedia.com/nginx-with-php-fpm/">PHP-FPM</a></li>
<li><a title="MySQL with MyISAM I/O and HyperDB" href="http://feedmymedia.com/mysql-with-innodb-io-and-hyperdb/">MySQL</a></li>
<li><a title="MySQL with MyISAM I/O and HyperDB" href="http://feedmymedia.com/mysql-with-innodb-io-and-hyperdb/">MyISAM I/O Scalability</a></li>
<li>HyperDB</li>
<li><a title="WordPress Caching" href="http://feedmymedia.com/wordpresscaching/">Batcache (WordPress Caching) + Memcached Object Cache</a></li>
<li><a title="File Sychronisation using Unison" href="http://feedmymedia.com/file-sychronisation-using-unison/">File Synchronisation &#8211; Unison</a></li>
<li><a title="WordPress Caching" href="http://feedmymedia.com/wordpresscaching/">XCACHE (Opcode Caching)</a></li>
</ul>
<div style="width: 425px">
<p><strong><a title="Ashley Shaw (Scaling WordPress)" href="http://www.slideshare.net/wordcampct/ashley-shaw-scaling-word-press" target="_blank">Ashley Shaw (Scaling WordPress) Presentation</a></strong></p>
<div style="padding: 5px 0 12px">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/wordcampct" target="_blank">WordCamp Cape Town</a></div>
<h2>FeedMyMedia (The Setup!)</h2>
<p>We have the following in our cluster:</p>
<ul>
<li>3x <a title="Load Balancing" href="http://feedmymedia.com/load-balancing/">Load Balancers</a></li>
<li>3x web-tier servers</li>
<li>1x Dedicated Database servers</li>
<li>1x Caching / Backup / Database server</li>
<li>2x Development servers</li>
</ul>
<p>Our web-tier servers each run an optimised NGiNX configuration, php-fpm dynamic pool and a memcached instance, the three servers are synchronised using Unison.</p>
<p>The dedicated database server’s run <a title="MySQL with MyISAM I/O and HyperDB" href="http://feedmymedia.com/mysql-with-innodb-io-and-hyperdb/">Percona MySQL Server</a> (which offers higher performance and stability over standard MySQL)</p>
<p>Caching we use the memcached object cache + WordPress Batcache (which utilizes the memcached-backend object cache)</p>
<p>&nbsp;</p>
<h3>STATS</h3>
<ul>
<li>Launched 2009 at Linode</li>
<li>Number of HTTP requests: FMM ~100k per week, M24 ~200K per week</li>
<li>Number of MySQL queries: ~500 qps (queries per second)</li>
<li>Number of sites hosted: ~100 Live Sites, ~670 Dev Sites</li>
<li>Monthly bandwidth usage: ~1TB per month, excluding internal traffic between servers</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://feedmymedia.com/optimised-server-for-wordpress-multisite-and-buddypress/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress Caching</title>
		<link>http://feedmymedia.com/wordpresscaching/</link>
		<comments>http://feedmymedia.com/wordpresscaching/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 15:24:21 +0000</pubDate>
		<dc:creator>Ashley Shaw</dc:creator>
				<category><![CDATA[Case Study]]></category>

		<guid isPermaLink="false">http://feedmymedia.com/?p=11263</guid>
		<description><![CDATA[We use Batcache (WordPress Caching) + Memcached Object Cache Memcached Backend (Object Cache) Caches queries, not page Typical ...]]></description>
				<content:encoded><![CDATA[<p>We use <a title="Batcache" href="http://wordpress.org/extend/plugins/batcache/" target="_blank">Batcache</a> (WordPress Caching) + <a title="Memcache" href="http://wordpress.org/extend/plugins/memcached/" target="_blank">Memcached Object Cache</a></p>
<h3>Memcached Backend (Object Cache)</h3>
<ul>
<li>Caches queries, not page</li>
<li>Typical WordPress queries:</li>
<ul>
<li>bloginfo() options (site title, description, language, theme stylesheet URL)</li>
<li>post or page title and contents</li>
<li>comments</li>
<li>sidebar widgets</li>
</ul>
</ul>
<h3>Batcache</h3>
<ul>
<li>Store cached pages in memcached</li>
<li>Reduces disk I/O load</li>
</ul>
<p>We touched on the use of batcache last we spoke. I would like to know as much as possible about how we have implemented batcache, issues encountered, solutions, as much as possible.</p>
<p>Batcache Implementation is fairly easy</p>
<ul>
<li>Download latest version http://downloads.wordpress.org/plugin/batcache.1.0.zip-</li>
<li>Upload advanced-cache.php to the /wp-content/ directory</li>
<li>Add this line the top of wp-config.php to activate Batcache: define(&#8216;WP_CACHE&#8217;, true);</li>
<li>Tweak the options near the top of advanced-cache.php</li>
<li>Optionally, upload batcache.php to /wp-content/plugins/ directory.</li>
<li>Issues encountered &#8211; none really, works as it is intended to.</li>
</ul>
<h3>XCACHE (Opcode Caching)</h3>
<ul>
<li>compiled PHP cache stored in memory</li>
<li>Alternatives available (eAccellerator and APC), XCACHE works best with PHP-FPM and WordPress</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://feedmymedia.com/wordpresscaching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL with MyISAM I/O and HyperDB</title>
		<link>http://feedmymedia.com/mysql-with-innodb-io-and-hyperdb/</link>
		<comments>http://feedmymedia.com/mysql-with-innodb-io-and-hyperdb/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 15:24:18 +0000</pubDate>
		<dc:creator>Ashley Shaw</dc:creator>
				<category><![CDATA[Case Study]]></category>

		<guid isPermaLink="false">http://feedmymedia.com/?p=11262</guid>
		<description><![CDATA[Percona MySQL 5.5 The dedicated database server’s run Percona MySQL Server (which offers higher performance and stability over ...]]></description>
				<content:encoded><![CDATA[<h2>Percona MySQL 5.5</h2>
<p>The dedicated database server’s run Percona MySQL Server (which offers higher performance and stability over standard MySQL)</p>
<p>We use a special version of MySQL from Percona &#8211; http://www.percona.com/software/</p>
<p>Percona Server is an enhanced drop-in replacement for MySQL.</p>
<p>Percona Server Feature Comparison</p>
<ul>
<li>Queries will run faster and more consistently.</li>
<li>Consolidate servers on powerful hardware.</li>
<li>Delay sharding, or avoid it entirely.</li>
<li>Save money on hosting fees and power.</li>
<li>Spend less time tuning and administering.</li>
<li>Achieve higher uptime.</li>
<li>Ttroubleshoot without guesswork.</li>
</ul>
<p>Benchmark for Percona Server</p>
<ul>
<li>Percona Server is more than 40% faster than MySQL in overall throughput.</li>
<li>Percona Server performance remains more stable over time than MySQL.</li>
</ul>
<p>Benchmarking</p>
<ul>
<li>Super Smack (http://jeremy.zawodny.com/mysql/super-smack/)</li>
<li>mysqlslap (http://dev.mysql.com/doc/refman/5.5/en/mysqlslap.html)</li>
</ul>
<p>Tuning configuration (my.cnf)</p>
<ul>
<li>mysqltuner (http://mysqltuner.pl/mysqltuner.pl)</li>
<li>Tuning Primer (https://launchpad.net/mysql-tuning-primer)</li>
</ul>
<h2>MyISAM I/O Scalability</h2>
<p>MyISAM is a complex storage engine, but must be configured properly to perform at its best.</p>
<p>Tuning my.cnf for MyISAM I/O scalability:</p>
<p>innodb_buffer_pool_size &#8211; Set the amount of memory allocated to both MyISAM and the index buffer cache, when the server requests data available in the cache it can be processed right away. Otherwise, the OS will request the data be loaded from disk to buffer, therefore it is important to set the value as high as possible to use the more efficient MyISAM data and index buffer cache instead of operating system buffer. Recommended to be set to 70 &#8211; 80% of available primary memory.</p>
<p>innodb_flush_log_at_trx_commit &#8211; MyISAM flushes the transaction log to disk once per second in the background. Default value is set to 1. innodb_flush_log_at_trx_commit = 0 &#8211; No log flushing on each transaction commit, however transaction data will be lost in case of MySQL crash. Recommended use on replication slaves that can offer a performance improvement of ~4%. innodb_flush_log_at_trx_commit = 2 &#8211; flush the log to Operating Systems Cache to save disk I/O on each transaction commit.</p>
<h2>HyperDB</h2>
<p>Replacement for the WPDB class which adds the ability to use multiple databases. HyperDB allows multiple servers to be configured and multiple routes to servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://feedmymedia.com/mysql-with-innodb-io-and-hyperdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NGINX with PHP-FPM</title>
		<link>http://feedmymedia.com/nginx-with-php-fpm/</link>
		<comments>http://feedmymedia.com/nginx-with-php-fpm/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 15:24:11 +0000</pubDate>
		<dc:creator>Ashley Shaw</dc:creator>
				<category><![CDATA[Case Study]]></category>

		<guid isPermaLink="false">http://feedmymedia.com/?p=11261</guid>
		<description><![CDATA[NGINX How to achieve optimal NGiNX configuration: gzip static assets (jpg, css, javascript) worker_processes = number of CPU’s ...]]></description>
				<content:encoded><![CDATA[<h2 style="text-align: left;">NGINX</h2>
<p style="text-align: left;">How to achieve optimal NGiNX configuration:</p>
<ul style="text-align: left;">
<li>gzip static assets (jpg, css, javascript)</li>
<li>worker_processes = number of CPU’s</li>
<li>try_files not if</li>
<li>expires</li>
</ul>
<h2 style="text-align: left;">PHP-FPM</h2>
<ul style="text-align: left;">
<li>Process management</li>
<li>Dynamic process spawning</li>
<li>Auto recovery if crash</li>
<li>Easy to integrate with NGiNX</li>
<li>Use Unix sockets (not TCP/IP) achieve optimal and secure PHP-FPM setup</li>
</ul>
<h2 style="text-align: left;">NGINX Configuratrion</h2>
<p style="text-align: left;">This NGINX configuration guide and setup is optimised for Ubuntu 10.04 or later releases</p>
<p style="text-align: left;">Stable &#8211; nginx-1.0.5 <a href="about:blank">(http://nginx.org/download/nginx-1.0.5.tar.gz)</a><br />
Linux Kernel 3.0 builds, use dev version 1.1.1 <a href="about:blank">(http://nginx.org/download/nginx-1.1.1.tar.gz)</a></p>
<table class="alignleft">
<colgroup>
<col width="*" /></colgroup>
<tbody>
<tr>
<td style="text-align: left;">./configure \<br />
&#8211;prefix=/opt/nginx \<br />
&#8211;conf-path=/etc/nginx/nginx.conf \<br />
&#8211;pid-path=/var/run/nginx.pid \<br />
&#8211;lock-path=/var/lock/nginx.lock \<br />
&#8211;http-log-path=/var/log/nginx/access.log \<br />
&#8211;error-log-path=/var/log/nginx/error.log \<br />
&#8211;http-client-body-temp-path=/var/lib/nginx/body \<br />
&#8211;http-proxy-temp-path=/var/lib/nginx/proxy \<br />
&#8211;http-fastcgi-temp-path=/var/lib/nginx/fastcgi \<br />
&#8211;http-uwsgi-temp-path=/var/lib/nginx/uwsgi \<br />
&#8211;http-scgi-temp-path=/var/lib/nginx/scgi \<br />
&#8211;with-http_ssl_module \<br />
&#8211;with-http_gzip_static_module \<br />
&#8211;user=www-data \<br />
&#8211;group=www-data \<br />
&#8211;without-mail_pop3_module \<br />
&#8211;without-mail_imap_module \<br />
&#8211;without-mail_smtp_module</td>
</tr>
</tbody>
</table>
<h4 style="text-align: left;" dir="ltr">NGiNX startup script (e.g. /etc/init.d/nginx)</h4>
<p style="text-align: left;">Download <a href="http://nginx-init-ubuntu.googlecode.com/files/nginx-init-ubuntu_v2.0.0-RC2.tar.bz2">http://nginx-init-ubuntu.googlecode.com/files/nginx-init-ubuntu_v2.0.0-RC2.tar.bz2</a><br />
Change:<br />
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/nginx/sbin<br />
DAEMON=/opt/nginx/sbin/nginx<br />
lockfile=/var/lock/nginx.lock<br />
NGINX_CONF_FILE=&#8221;/etc/nginx/nginx.conf&#8221;</p>
<h4 style="text-align: left;" dir="ltr">Basic NGiNX WordPress MS config (e.g. /etc/nginx/sites-enabled/sitename.com)</h4>
<div style="text-align: left;" dir="ltr">
<table>
<colgroup>
<col width="*" /></colgroup>
<tbody>
<tr>
<td>server {<br />
listen 80;<br />
server_name sitename.com *.sitename.com;<br />
error_log /var/log/nginx/sitename.com/error.log;<br />
access_log /var/log/nginx/sitename.com/access.log;<br />
root   /var/www/sitename.com/;<br />
index index.php;location / {<br />
try_files $uri $uri/ /index.php?$args;<br />
}# Expires for static assets<br />
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {<br />
expires 24h;<br />
log_not_found off;<br />
}</p>
<p style="text-align: left;">#  Rewrite multisite upload files<br />
location ^~ /files/ {<br />
rewrite /files/(.+) /wp-includes/ms-files.php?file=$1 last;<br />
}</p>
<p style="text-align: left;">location ~ \.php$ {<br />
try_files $uri =404;<br />
fastcgi_split_path_info ^(.+\.php)(/.+)$;<br />
include fastcgi_params;<br />
fastcgi_index index.php;<br />
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br />
fastcgi_pass php;<br />
}<br />
}</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2 style="text-align: left;" dir="ltr">Main NGiNX Configuration (e.g. /etc/nginx/nginx.conf) - <span class="Apple-style-span" style="font-size: 20px;">Optimised for Linux O/S</span></h2>
<div dir="ltr">
<table class="alignleft">
<colgroup>
<col width="*" /></colgroup>
<tbody>
<tr>
<td># Generic startup file.<br />
user {user} {group};<br />
#worker_processes should be equal to the amount of available processing threads/less<br />
worker_processes  4;<br />
error_log  /var/log/nginx/error.log;<br />
access_log /var/log/nginx/access.log<br />
pid        /var/run/nginx.pid;events {</p>
<p style="text-align: left;" dir="ltr">#max allowable worker_connections per worker_process<br />
worker_connections  1024;</p>
<p style="text-align: left;" dir="ltr">multi_accept on;</p>
<p style="text-align: left;" dir="ltr">use epoll;<br />
}</p>
<p style="text-align: left;">http {<br />
include mime.types;<br />
default_type       application/octet-stream;</p>
<p style="text-align: left;" dir="ltr">sendfile on;</p>
<p style="text-align: left;" dir="ltr">tcp_nodelay on;</p>
<p style="text-align: left;" dir="ltr">tcp_nopush on;</p>
<p style="text-align: left;" dir="ltr">keepalive_timeout 65;</p>
<p style="text-align: left;" dir="ltr">client_header_timeout = 300;</p>
<p style="text-align: left;" dir="ltr">client_body_timeout = 300;</p>
<p style="text-align: left;" dir="ltr">send_timeout = 300;</p>
<p style="text-align: left;" dir="ltr">connection_pool_size 256;</p>
<p style="text-align: left;" dir="ltr">client_header_buffer_size 128k;</p>
<p style="text-align: left;" dir="ltr">large_client_header_buffers 4 2k;</p>
<p style="text-align: left;" dir="ltr">output_buffers 1 32k;</p>
<p style="text-align: left;" dir="ltr">postpone_output 1460;</p>
<p style="text-align: left;" dir="ltr">ignore_invalid_headers on;</p>
<p style="text-align: left;" dir="ltr">marker</p>
<p style="text-align: left;" dir="ltr">#Reset timed out connections</p>
<p style="text-align: left;" dir="ltr">reset_timedout_connection on;</p>
<p style="text-align: left;" dir="ltr">##Compression</p>
<p style="text-align: left;" dir="ltr">gzip on;</p>
<p style="text-align: left;" dir="ltr">gzip_http_version 1.1;</p>
<p style="text-align: left;" dir="ltr">gzip_buffers   16 8k;</p>
<p style="text-align: left;" dir="ltr">gzip_vary on;</p>
<p style="text-align: left;" dir="ltr">gzip_proxied any;</p>
<p style="text-align: left;" dir="ltr">gzip_comp_level 2;</p>
<p style="text-align: left;" dir="ltr">gzip_disable &#8220;msie6&#8243;;</p>
<p style="text-align: left;" dir="ltr">gzip_types text/plain text/css application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript;</p>
<p style="text-align: left;" dir="ltr">#Serve already compressed files directly</p>
<p style="text-align: left;" dir="ltr">gzip_static on;</p>
<p style="text-align: left;" dir="ltr"># Upstream to abstract backend connection(s) for PHP.<br />
upstream php {<br />
server unix:/tmp/php-fpm.sock;<br />
}</p>
<p style="text-align: left;">include sites-enabled/*;<br />
}</p>
</td>
</tr>
</tbody>
</table>
<h2 style="text-align: left;">PHP-FPM Configuration (Part of PHP-5.3+)</h2>
<p style="text-align: left;">This PHP-FPM configuration guide and setup is optimised for Ubuntu 10.04 or later releases</p>
<p style="text-align: left;">Stable &#8211; PHP-5.3.8 <a href="about:blank">(http://us2.php.net/distributions/php-5.3.8.tar.gz)</a></p>
<table class="alignleft">
<colgroup>
<col width="*" /></colgroup>
<tbody>
<tr>
<td>./buildconf &#8211;force./configure \<br />
&#8211;prefix=/opt/php5 \<br />
&#8211;with-config-file-path=/opt/php5/etc \<br />
&#8211;with-config-file-scan-dir=/opt/php5/etc/conf.d \<br />
&#8211;with-fpm-user=www-data \<br />
&#8211;with-fpm-group=www-data \<br />
&#8211;enable-fpm \<br />
&#8211;with-mcrypt \<br />
&#8211;enable-mbstring \<br />
&#8211;with-openssl \<br />
&#8211;with-mysql \<br />
&#8211;with-mysql-sock \<br />
&#8211;with-gd \<br />
&#8211;with-png-dir \<br />
&#8211;with-jpeg-dir \<br />
&#8211;with-xpm-dir= \<br />
&#8211;enable-gd-native-ttf  \<br />
&#8211;with-pdo-mysql \<br />
&#8211;with-libxml-dir \<br />
&#8211;with-mysqli \<br />
&#8211;with-curl \<br />
&#8211;enable-zip \<br />
&#8211;enable-sockets \<br />
&#8211;with-zlib \<br />
&#8211;enable-exif \<br />
&#8211;enable-ftp \<br />
&#8211;with-iconv \<br />
&#8211;with-gettext \<br />
&#8211;enable-gd-native-ttf \<br />
&#8211;with-t1lib \<br />
&#8211;with-freetype-dir</p>
<p style="text-align: left;">make<br />
make install</p>
</td>
</tr>
</tbody>
</table>
<h2 style="text-align: left;">PHP Configuration (e.g. /opt/php5/etc/php.ini)</h2>
<h3 style="text-align: left;">[Optimised variables to set for WPMS + NGiNX]</h3>
<table class="alignleft">
<colgroup>
<col width="*" /></colgroup>
<tbody>
<tr>
<td style="text-align: left;">; Maximum execution time of each script, in seconds<br />
max_execution_time = 300<br />
; Maximum amount of time each script may spend parsing request data.<br />
max_input_time = 600<br />
; Maximum amount of memory a script may consume (Needs to be set fairly high for hosting a WordPress MS install)<br />
memory_limit = 512M<br />
;Allow file uploads.<br />
file_uploads = On<br />
; Maximum size of post data that PHP will accept. Note: this value needs to be the same as set in nginx.conf under the client_max_body_size paramater.<br />
upload_max_filesize = 100M<br />
; Maximum number of files that can be uploaded via a single request<br />
max_file_uploads = 20<br />
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. Note: needs to be set to use fastcgi_split_path_info in nginx.<br />
cgi.fix_pathinfo=0<br />
; Define default timezone<br />
date.timezone = Africa/Johannesburg<br />
; Session<br />
; Handler used to store/retrieve data. Note this needs to be set to tie into your entire memcached pool<br />
session.save_handler = memcache<br />
; Use a comma separated list of server urls to use for storage:<br />
session.save_path = &#8220;tcp://localhost:11211?persistent=1&amp;weight=1&amp;timeout=1&amp;retry_interval=15&#8243;<br />
;Use cookies &#8211; needs to be enabled for WP<br />
session.use_cookies = 1</td>
</tr>
</tbody>
</table>
<h2 style="text-align: left;">PHP-FPM Configuration (e.g. /opt/php5/etc/php-fpm.conf)</h2>
<h3 style="text-align: left;">Optimised variables to set:</h3>
<table class="alignleft">
<colgroup>
<col width="*" /></colgroup>
<tbody>
<tr>
<td style="text-align: left;">;Global Options<br />
;Pid file<br />
pid = run/php-fpm.pid<br />
; Send FPM to background<br />
daemonize = yes;Pool Definitions<br />
;The address on which to accept FastCGI requests, needs to be the same as configured in nginx.conf, we use the unix socket which offers the highest optimisation and security<br />
listen = /var/run/php5-fpm.sock<br />
;Set permissions for unix sockets, needs to be the same as configured in nginx.conf<br />
listen.owner = www-data<br />
listen.group = www-data<br />
;Unix user/group of processes<br />
user = www-data<br />
group &#8211; www-data;Choose how the process manager will control the number of child processes.<br />
pm = dynamic<br />
;This value sets the limit on the number of simultaneous requests that will be served, these values have been optimised for a 2Gb box, start with a low enough value and monitor<br />
pm.max_children = 25<br />
; The number of child processes created on startup.<br />
; Default Value: min_spare_servers + (max_spare_servers &#8211; min_spare_servers) / 2<br />
pm.start_servers = 4<br />
; The desired minimum number of idle server processes.<br />
pm.min_spare_servers = 2<br />
; The desired maximum number of idle server processes.<br />
pm.max_spare_servers = 10<br />
; The number of requests each child process should execute before respawning.<br />
pm.max_requests = 500;Additional variables that could be set:<br />
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f email@yoursysadmin.com<br />
php_admin_value[memory_limit] = 512M<br />
php_admin_value[upload_max_filesize] = 100M<br />
php_admin_value[max_file_uploads] = 20<br />
php_admin_value[post_max_size] = 100M<br />
php_admin_value[date.timezone] = Africa/Johannesburg</td>
</tr>
</tbody>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://feedmymedia.com/nginx-with-php-fpm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File Sychronisation using Unison</title>
		<link>http://feedmymedia.com/file-sychronisation-using-unison/</link>
		<comments>http://feedmymedia.com/file-sychronisation-using-unison/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 15:24:02 +0000</pubDate>
		<dc:creator>Ashley Shaw</dc:creator>
				<category><![CDATA[Case Study]]></category>

		<guid isPermaLink="false">http://feedmymedia.com/?p=11280</guid>
		<description><![CDATA[Unison allows the same version of files to be maintained on multiple servers.]]></description>
				<content:encoded><![CDATA[<p><a title="Unison" href="http://www.cis.upenn.edu/~bcpierce/unison/" target="_blank">Unison</a> allows the same version of files to be maintained on multiple servers, therefore when multiple folders/files are synchronised the current version of the file is available on all servers, regardless when it was last modified.</p>
<p><strong>Features:</strong></p>
<ul>
<li>’Conflicts’ detection, where a file has been modified on two sources</li>
<li>Communication via TCP/IP protocol or by secured tunnel over encrypted SSH</li>
<li>Uses rsync algorithm, only transferring the parts of a file that has changed</li>
<li>Robust design in the event of a program or system crash or communication falure</li>
<li>Extremely fast synchronisation</li>
</ul>
<p><strong>NFS versus Unison:</strong></p>
<p>NFS allows a system to share directories and files with others over a network, by using NFS users and programs can access files on remote systems, therefore requires the primary NFS mount to always be online or clients won’t be able to access files if its down.</p>
]]></content:encoded>
			<wfw:commentRss>http://feedmymedia.com/file-sychronisation-using-unison/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load Balancing</title>
		<link>http://feedmymedia.com/load-balancing/</link>
		<comments>http://feedmymedia.com/load-balancing/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 14:59:57 +0000</pubDate>
		<dc:creator>Ashley Shaw</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Case Study]]></category>

		<guid isPermaLink="false">http://feedmymedia.com/?p=11272</guid>
		<description><![CDATA[We use HAProxy Load Balancer, more specifically we are using Linode.com NodeBalancer.  What is it? Load balancing is ...]]></description>
				<content:encoded><![CDATA[<p>We use HAProxy Load Balancer, more specifically we are using Linode.com <a title="NodeBalancer" href="http://www.linode.com/nodebalancers/" target="_blank">NodeBalancer</a>. <a href="http://feedmymedia.com/load-balancing/nodebalancer-diagram/" rel="attachment wp-att-11273"><img class="alignright size-full wp-image-11273" src="http://feedmymedia.com/wp-content/blogs.dir/1/files/2011/10/nodebalancer-diagram.png" alt="" width="263" height="248" /></a></p>
<p><strong>What is it?</strong></p>
<ul>
<li>Load balancing is a technique to spread work between two or more computers</li>
<li>Load balancer is a tool that directs a client to the least busy or most appropriate web server among several servers that contain mirrored contents</li>
</ul>
<p><strong>Why?</strong></p>
<ul>
<li>Web server may not be able to handle high volumes of incoming traffic</li>
<li>Upgrading server resources will no longer be cost effective</li>
<li>Users will have to wait until the web server is free to process their requests</li>
</ul>
<p><strong>How?</strong></p>
<ul>
<li>More servers need to be added to distribute the load among the group of servers (aka server cluster)</li>
<li>Load distribution among these servers is known as load balancing.</li>
<li>Load balancing applies to all types of servers</li>
</ul>
<p><strong>Load balancing algorithms:</strong></p>
<ul>
<li>Round-robin: requests are rotated among the servers</li>
<li>Leastconn: request is sent to the server with the lowest number of connections</li>
<li>Source: a hash of the source IP is divided by the total weight of the running servers to determine which server will receive the request.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://feedmymedia.com/load-balancing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
