<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Barry on WordPress</title>
	<atom:link href="http://barry.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://barry.wordpress.com</link>
	<description>Barry on WordPress.com</description>
	<lastBuildDate>Wed, 05 Jun 2013 13:39:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='barry.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/9d76a0bdad6065d9fe3b3f9a3454d05d?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Barry on WordPress</title>
		<link>http://barry.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://barry.wordpress.com/osd.xml" title="Barry on WordPress" />
	<atom:link rel='hub' href='http://barry.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Anycast</title>
		<link>http://barry.wordpress.com/2013/03/16/anycast/</link>
		<comments>http://barry.wordpress.com/2013/03/16/anycast/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 18:13:57 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=1038</guid>
		<description><![CDATA[This week we started testing our global anycast network. We have a real-time map which shows which people are served by each location. Today we have three locations online, we hope to have 10-12 by the end of the year. The Internet is definitely not a big truck&#8230;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=1038&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>This week we started testing our global <a href="http://en.wikipedia.org/wiki/Anycast">anycast</a> network. We have a real-time map which shows which people are served by each location.  Today we have three locations online, we hope to have 10-12 by the end of the year. </p>
<p><a href="http://barry.files.wordpress.com/2013/03/anycast.png"><img src="http://barry.files.wordpress.com/2013/03/anycast.png?w=490&#038;h=296" alt="anycast" width="490" height="296" class="alignnone size-full wp-image-1039" /></a></p>
<p>The Internet is definitely <a href="http://en.wikipedia.org/wiki/Series_of_tubes">not a big truck</a>&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/1038/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/1038/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=1038&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2013/03/16/anycast/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>

		<media:content url="http://barry.files.wordpress.com/2013/03/anycast.png" medium="image">
			<media:title type="html">anycast</media:title>
		</media:content>
	</item>
		<item>
		<title>Batcache 1.2</title>
		<link>http://barry.wordpress.com/2012/12/10/batcache-bugfix-release/</link>
		<comments>http://barry.wordpress.com/2012/12/10/batcache-bugfix-release/#comments</comments>
		<pubDate>Tue, 11 Dec 2012 03:11:50 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=978</guid>
		<description><![CDATA[Batcache version 1.2 was released today. It fixes a fun bug that could cause incorrect cached content to be returned in some cases. The default Batcache key has been updated to include $_SERVER['REQUEST_METHOD'] which means when you upgrade, all of your keys will be immediately invalidated. For most folks using a short TTL this won&#8217;t [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=978&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Batcache version 1.2 was released today.  It fixes a fun bug that could cause incorrect cached content to be returned in some cases.  The default Batcache key has been updated to include <code>$_SERVER['REQUEST_METHOD']</code> which means when you upgrade, all of your keys will be immediately invalidated.  For most folks using a short TTL this won&#8217;t matter.  It&#8217;s a good idea to upgrade.  <a href="http://downloads.wordpress.org/plugin/batcache.1.2.zip">Download</a> version 1.2 today!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/978/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/978/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=978&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2012/12/10/batcache-bugfix-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>
	</item>
		<item>
		<title>Formula 1 Tickets</title>
		<link>http://barry.wordpress.com/2012/10/23/formula-1-tickets/</link>
		<comments>http://barry.wordpress.com/2012/10/23/formula-1-tickets/#comments</comments>
		<pubDate>Tue, 23 Oct 2012 21:04:39 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[Formula 1]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=950</guid>
		<description><![CDATA[See you in Austin!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=950&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><a href="http://barry.wordpress.com/2012/10/23/formula-1-tickets/f1-tix/" rel="attachment wp-att-951"><img src="http://barry.files.wordpress.com/2012/10/f1-tix.jpg?w=490&#038;h=656" alt="" title="F1-tix" width="490" height="656" class="alignnone size-full wp-image-951" /></a></p>
<p>See you in Austin!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/950/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/950/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=950&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2012/10/23/formula-1-tickets/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>

		<media:content url="http://barry.files.wordpress.com/2012/10/f1-tix.jpg" medium="image">
			<media:title type="html">F1-tix</media:title>
		</media:content>
	</item>
		<item>
		<title>Nginx Case Study</title>
		<link>http://barry.wordpress.com/2012/10/02/nginx-case-study/</link>
		<comments>http://barry.wordpress.com/2012/10/02/nginx-case-study/#comments</comments>
		<pubDate>Tue, 02 Oct 2012 06:07:23 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[technical]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=938</guid>
		<description><![CDATA[A case study I worked on with Andrew Alexeev at Nginx was republished on High Scalability.  The Hacker News thread has some good conversation as well.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=938&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>A <a href="http://www.nginx.com/cs/nginx-automattic.html">case study</a> I worked on with Andrew Alexeev at Nginx was <a href="http://highscalability.com/blog/2012/9/26/wordpresscom-serves-70000-reqsec-and-over-15-gbitsec-of-traf.html">republished on High Scalability</a>.  The <a href="http://news.ycombinator.com/item?id=4578258">Hacker News thread</a> has some good conversation as well. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/938/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/938/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=938&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2012/10/02/nginx-case-study/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>
	</item>
		<item>
		<title>Nginx, SPDY, and Automattic</title>
		<link>http://barry.wordpress.com/2012/06/16/nginx-spdy-and-automattic/</link>
		<comments>http://barry.wordpress.com/2012/06/16/nginx-spdy-and-automattic/#comments</comments>
		<pubDate>Sun, 17 Jun 2012 00:26:07 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[spdy]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=863</guid>
		<description><![CDATA[Yesterday, Valentin Bartenev, a developer at Nginx, Inc., announced SPDY support for the Nginx web server. SPDY is a next-generation networking protocol developed by Google and focused on making the web faster. More information on SPDY can be found on Wikipedia. At Automattic, we have used Nginx since 2008. Since then, it has made its [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=863&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Yesterday, <a href="http://vbart.info/">Valentin Bartenev</a>, a developer at Nginx, Inc., <a href="http://mailman.nginx.org/pipermail/nginx-devel/2012-June/002343.html">announced</a> SPDY support for the Nginx web server. SPDY is a next-generation networking protocol developed by Google and focused on making the web faster. More information on SPDY can be found <a href="http://en.wikipedia.org/wiki/SPDY">on Wikipedia</a>.</p>
<p>At Automattic, we have used Nginx <a href="https://barry.wordpress.com/2008/04/28/load-balancer-update/">since 2008</a>. Since then, it has made its way into almost every piece of our web infrastructure. We use it for load balancing, image serving (via <a href="//mogilefs.org">MogileFS</a>), serving static and dynamic web content, and caching. In fact, we have almost 1000 servers running Nginx today, serving over 100,000 requests <em>per second</em>.</p>
<p>I met Andrew and <a href="http://sysoev.ru/en/">Igor</a> at WordCamp San Fransicso in 2011.  For the next six months, we discussed the best way for Automattic and Nginx, Inc. to work together. In December 2011, we agreed that Automattic would sponsor the development and integration of SPDY into Nginx. The only real requirement from our end was that the resulting code be released under an open source license so that others could benefit from all the hard work.</p>
<p>For the past 6 months, Valentin and others have been implementing SPDY support in Nginx, and for the past month or so, we have been continually testing SPDY, fixing bugs, and improving stability. Things are almost ready for production and we hope to enable SPDY for all of WordPress.com in the next few weeks. Today, this site is SPDY-enabled if you are using a recent version of Chrome or Firefox and accessing this site over SSL. You can download the Chrome extension <a href="https://chrome.google.com/webstore/detail/mpbpobfflnpcgagjijhmgnchggcjblin">here</a> and the one for FireFox <a href="https://addons.mozilla.org/en-US/firefox/addon/spdy-indicator/">here</a>.</p>
<p style="text-align:center;"><img class="size-full wp-image-867 aligncenter" title="spdy" src="https://barry.files.wordpress.com/2012/06/spdy.png?w=490" alt=""   /></p>
<p>Thanks to the Nginx team for all their hard work implementing SPDY, and thanks to all of my <a href="http://automattic.com/about/">Automattic co-workers</a> who helped us test SPDY.  I hope to post some real-world performance numbers in the next few weeks as we complete our SPDY deployment and gather more data. We are also looking forward to SPDY support being part of the official Nginx source in the near future.</p>
<blockquote>
<p style="text-align:left;">&#8220;We&#8217;d like to say big thanks to the team at Automattic and especially to Pyry Hakulinen who has been great in helping us test and debug this first public version of SPDY module for nginx. Automattic is a great partner, and we will continue to work with Barry and his team on improvements to nginx and to nginx/SPDY in particular.&#8221;<cite></cite></p>
<p style="text-align:right;"><cite>Andrew Alexeev &#8211; Nginx, Inc.</cite></p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/863/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/863/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=863&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2012/06/16/nginx-spdy-and-automattic/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>

		<media:content url="https://barry.files.wordpress.com/2012/06/spdy.png" medium="image">
			<media:title type="html">spdy</media:title>
		</media:content>
	</item>
		<item>
		<title>Speaking about WordPress Security in Houston</title>
		<link>http://barry.wordpress.com/2012/01/28/speaking-about-wordpress-security-in-houston/</link>
		<comments>http://barry.wordpress.com/2012/01/28/speaking-about-wordpress-security-in-houston/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 03:31:52 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=794</guid>
		<description><![CDATA[UPDATE: Slides have been posted on SlideShare. I am going to be giving a talk about WordPress Security at next month&#8217;s Houston WordPress Meetup. If you are around Houston on February 8th, come by and say hi howdy.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=794&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><strong>UPDATE</strong>:  Slides have been <a href="http://www.slideshare.net/bazza/wordpress-security-11507087">posted on SlideShare</a>.</p>
<p>I am going to be giving a talk about WordPress Security at next month&#8217;s <a href="http://www.meetup.com/houston-wordpress/events/49500222/">Houston WordPress Meetup</a>.  If you are around Houston on February 8th, come by and say <strike>hi</strike> howdy.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/794/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/794/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=794&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2012/01/28/speaking-about-wordpress-security-in-houston/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>
	</item>
		<item>
		<title>iPad Stats Visualization</title>
		<link>http://barry.wordpress.com/2011/11/30/ipad-stats-visualization/</link>
		<comments>http://barry.wordpress.com/2011/11/30/ipad-stats-visualization/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 15:39:01 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[automattic]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=733</guid>
		<description><![CDATA[Evan has a cool post showing some of our internal heat map stats and some interesting points on data visualization.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=733&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>Evan has a <a href="http://evansolomon.me/notes/data-visualization-is-itself-data/">cool post</a> showing some of our internal heat map stats and some interesting points on data visualization. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/733/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/733/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=733&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2011/11/30/ipad-stats-visualization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>
	</item>
		<item>
		<title>Speaking at WordCamp San Francisco</title>
		<link>http://barry.wordpress.com/2011/07/20/speaking-at-wordcamp-san-francisco/</link>
		<comments>http://barry.wordpress.com/2011/07/20/speaking-at-wordcamp-san-francisco/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 03:30:53 +0000</pubDate>
		<dc:creator>Barry</dc:creator>
				<category><![CDATA[wordcamp]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=650</guid>
		<description><![CDATA[After a 3 year speaking hiatus from WordCamp SF, I am excited about speaking again this year.  The most interesting part of my talks is usually the Q&#38;A at the end, so this time we decided to get rid of the talk and go straight to the Q&#38;A. It will focus on running large WordPress installations, but [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=650&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>After a 3 year speaking hiatus from WordCamp SF, I am excited about <a href="http://2011.sf.wordcamp.org/2011/07/17/a-dozen-more-speakers-announced/">speaking</a> again this year.  The most interesting part of my talks is usually the Q&amp;A at the end, so this time we decided to get rid of the talk and go straight to the Q&amp;A. It will focus on running large WordPress installations, but I&#8217;m sure there will be time to discuss other WordPress-related things. Bring your questions and make them difficult!  If you have a question but won&#8217;t be able to attend, please ask in the comments and I will try to answer it during the session (which I think will be recorded).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/650/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/650/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=650&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2011/07/20/speaking-at-wordcamp-san-francisco/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/713072bbe89035a79c17d19e53dd5d9b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">barry</media:title>
		</media:content>
	</item>
		<item>
		<title>HyperDB Replication Lag Detection</title>
		<link>http://barry.wordpress.com/2011/07/20/hyperdb-lag-detection/</link>
		<comments>http://barry.wordpress.com/2011/07/20/hyperdb-lag-detection/#comments</comments>
		<pubDate>Wed, 20 Jul 2011 07:09:51 +0000</pubDate>
		<dc:creator>Iliya Polihronov</dc:creator>
				<category><![CDATA[scaling]]></category>
		<category><![CDATA[wordpress.com]]></category>
		<category><![CDATA[hyperdb]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=612</guid>
		<description><![CDATA[Howdy &#8211; Iliya here again. Seems like I am taking over Barry&#8217;s blog. Hopefully this will motivate him to blog more. 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 [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=612&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><cite>Howdy &#8211; Iliya here again. Seems like I am taking over Barry&#8217;s blog. Hopefully this will motivate him to blog more.</cite></p>
<p>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.</p>
<p>For those who are unfamiliar, MySQL data replication is asynchronous and works as follows:</p>
<ol>
<li><strong>[Master]</strong> Receives a query that modifies database structure or content (INSERT, UPDATE, ALTER etc.)</li>
<li><strong>[Master]</strong> The query is written to a log file (aka the binlog).</li>
<li><strong>[Master]</strong> The query is executed on the master.</li>
<li><strong>[Slaves]</strong> Create a “Slave I/O” thread that connects to the [Master] and requests all new queries from the mater’s binlog.</li>
<li><strong>[Master]</strong> Creates a “Binlog dump” thread for each connected slave, that reads the requested events from the binlog and sends them to the slave.</li>
<li><strong>[Slaves]</strong> Start a “Slave SQL” thread which reads queries from the log file written by the “Slave I/O” thread and executes them</li>
</ol>
<p>There are a number of things to be considered in this scenario, which can lead to a condition known as <em><strong>replication lag </strong></em>where the slaves have older data then the master:</p>
<ul>
<li>Since only one thread on the slave executes write queries, and there are many execution threads on the master, there is no guarantee that the slave will be able to execute queries with the same speed as the master.</li>
<li>Long running SELECTs or explicit locks on the slave, will cause the “Slave SQL” thread to wait, thus slowing it down.</li>
<li>Long running queries on the master would take at least the same amount of time to run on the slave, causing it to fall behind the master</li>
<li>I/O (disk or network) issues can prevent or slow down the slave from reading and replaying the binlog events</li>
</ul>
<p>In order to deal with this, we needed a way to avoid connections to lagged slaves as long as there are slaves that are current. This would allow for the lagged ones to recover faster and avoid returning old data to our users. It also had to be something flexible enough, so we could have different settings for acceptable replication lag per dataset or stop tracking it altogether. Since we use the advanced database class, <a href="http://codex.wordpress.org/HyperDB">HyperDB</a>, for all our database connections, it was the obvious place to integrate this.</p>
<p>We implemented it  in the following steps:</p>
<ul>
<li>If a connection modifies data in a given table, then all subsequent SELECTs on the same connection for that table are sent to the master. Chances are replication won&#8217;t be fast enough to propagate the changes to the slaves on the same page load.  This logic has existed in HyperDB for a while.</li>
<li>Before we make a connection to a slave, we use a callback, to check if we have information for this slave’s lag in the cache and we skip it based on that, unless all slaves in the dataset are considered lagged.  In case replication breaks on all slaves, we would rather return old data then overload the master with read queries and cause an outage.</li>
<li>After a successful connection to a slave, if there was nothing in the cache regarding its lag status and not all slaves are considered lagged, we execute a second callback that checks whether this slave is lagged and updates the cache.</li>
</ul>
<p>A slave is considered lagged when it has a “lag threshold” defined in it’s dataset configuration and the current lag is more than this threshold.</p>
<p>We considered the following options for checking if a slave is lagged.  No MySQL patches are required for any of them:</p>
<ul>
<li>Checking the value of <strong>Seconds_Behind_Master </strong>from the <code>SHOW SLAVE STATUS</code> statement executed on the slave. It shows the difference between the timestamp of the currently executed query and the latest query we have received from the master. Although it is easy to implement and has low overhead, the main problem with using this option is that it is not completely reliable, as it can be tricked by IO latency and/or master connection problems.</li>
<li>Tracking the “File” and “Position” on <code>SHOW MASTER STATUS</code> executed on the master and comparing it to Relay_Master_Log_File and Exec_Master_Log_Pos of <code>SHOW SLAVE STATUS</code> on the slave. This way we can wait until the slave executes the queries from binlog “file” and position “position” before send certain queries to that slave and thus effectively we wait for the data to be replicated to the point where we need it. While very reliable, this option is more complex, has lots of overhead and doesn’t give us clock time value which we can track and set between servers.</li>
<li>Tracking the difference between the current time on the slave and the replication of a timestamp update from the master, which runs every second. This is basically what <a href="//www.maatkit.org/doc/mk-heartbeat.html">mk-heartbeat</a> does. It requires proper time sync between the master and the slave servers but is otherwise very reliable.</li>
</ul>
<p>The third option fit our needs best, however the code is flexible enough to easily support any of these. For caching, we decided to go with memcached, since it works well in our distributed, multi-server, multi-datacenter environment, but other methods (APC cache, shared memory, custom daemon etc.) would work just fine.</p>
<p>HyperDB is free, open-source and easy to integrate in your WordPress installation. You can download it <a href="//wordpress.org/extend/plugins/hyperdb/">here</a>.  We hope you enjoy this new functionality and please let us know if you have any questions in the comments.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/612/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=612&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2011/07/20/hyperdb-lag-detection/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://2.gravatar.com/avatar/b0be4235dbf38547a7c26ef8ec94934b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vnsavage</media:title>
		</media:content>
	</item>
		<item>
		<title>Uptime related server crashes</title>
		<link>http://barry.wordpress.com/2011/06/14/uptime-related-server-crashes/</link>
		<comments>http://barry.wordpress.com/2011/06/14/uptime-related-server-crashes/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 05:48:30 +0000</pubDate>
		<dc:creator>Iliya Polihronov</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://barry.wordpress.com/?p=549</guid>
		<description><![CDATA[This is a guest post by Iliya Polihronov.  Iliya is the newest member of the global infrastructure, systems, and security team at Automattic and the first ever guest blogger here on barry.wordpress.com. Hey, my name is Iliya and as a Systems Wrangler at Automattic, I am one of the people handling the server-side issues across the 2000 [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=549&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p><cite>This is a guest post by Iliya Polihronov.  Iliya is the newest member of the global infrastructure, systems, and security team at Automattic and the first ever guest blogger here on barry.wordpress.com.</cite></p>
<p>Hey, my name is Iliya and as a Systems Wrangler at Automattic, I am one of the people handling the server-side issues across the 2000 servers running WordPress.com and other <a href="http://automattic.com/">Automattic services</a>.</p>
<p>Last week, within two hours of each other, two of our <a href="http://code.google.com/p/mogilefs/wiki/Users">MogileFS</a> storage servers locked up with the following trace:</p>
<p><a href="http://barry.wordpress.com/2011/06/14/uptime-related-server-crashes/find_busiest_group/" rel="attachment wp-att-552"><img class="aligncenter size-medium wp-image-552" title="find_busiest_group" src="http://barry.files.wordpress.com/2011/05/find_busiest_group.jpg?w=500" alt="" width="500" /></a></p>
<p>The next day, a few more servers crashed with similar traces.</p>
<p>We started searching for a common pattern. All hosts were running <strong>Debian kernels ranging from 2.6.32-21 to 2.6.32-24</strong>, some of them were in different data centers and had different purposes in our network.</p>
<p>One thing we noticed was that all of the servers crashed after having an uptime of a little more than 200 days. After some research and investigation, we found that the culprit appears to be a quite interesting kernel bug.</p>
<p>As part of the scheduler load balancing algorithm, the kernel searches for the busiest group within a given scheduling domain. In order to do that it has to take into account the average load for all groups. It is calculated in the function find_busiest_group() with:</p>
<p><code>sds.avg_load = (SCHED_LOAD_SCALE * sds.total_load) / sds.total_pwr;</code></p>
<p><strong>sds.total_load</strong> is the sum of the load on all CPUs in the scheduling domain, based on the run queue tasks and their priority.</p>
<p><strong>SCHED_LOAD_SCALE</strong> is a constant used to increase resolution.</p>
<p><strong>sds.total_pwr</strong> is the sum of the power of all CPUs in the scheduling domain. This sum ends up being zero and that’s what causing the crash &#8211; <strong>division by zero</strong>.</p>
<p>The “CPU power” is used to take into account how much calculating capabilities a CPU has compared to the other CPUs and the main factors for calculating it are:</p>
<p>1. Whether the CPU is shared, for example by using multithreading.<br />
2. How many real-time tasks the CPU is processing.<br />
3. In newer kernels,  how much time the CPU had spent processing IRQs.</p>
<p>The current <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;f=kernel/sched_fair.c;h=74cccfae87a8e9a6e6d0845374dab82cd367500c;hp=c358d4081b81854dedd3d6bb8488af9dfbc18497;hb=aa483808516ca5cacfa0e5849691f64fec25828e;hpb=305e6835e05513406fa12820e40e4a8ecb63743c">suggested fix</a> for this bug is relying on the theory that while taking into account the real-time tasks (#2 above), scale_rt_power() could return negative value, and thus the sum of all CPU powers may end up being zero.</p>
<p>This was merged into the <strong>2.6.32.29 vanilla kernel</strong>, together with the IRQ accounting into the cpu_power (#3  above). It is also merged into the <strong>Debian 2.6.32-31 kernel</strong>.</p>
<p>Alternatively, the scheduling load balancing can be turned off, which would effectively skip the related code. This can be done using control groups, however it should be used with caution as it may cause performance issues:</p>
<p><code> mount -t cgroup -o cpuset cpuset /cgroups<br />
echo 0 &gt; /cgroups/cpuset.sched_load_balance<br />
</code></p>
<p>As it is yet not absolutely clear if the suggested fix really fixes the problem, we will try to post updates on any new developments as we observe them.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/barry.wordpress.com/549/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/barry.wordpress.com/549/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=barry.wordpress.com&#038;blog=20261&#038;post=549&#038;subd=barry&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://barry.wordpress.com/2011/06/14/uptime-related-server-crashes/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://2.gravatar.com/avatar/b0be4235dbf38547a7c26ef8ec94934b?s=96&#38;d=identicon" medium="image">
			<media:title type="html">vnsavage</media:title>
		</media:content>

		<media:content url="http://barry.files.wordpress.com/2011/05/find_busiest_group.jpg" medium="image">
			<media:title type="html">find_busiest_group</media:title>
		</media:content>
	</item>
	</channel>
</rss>
