<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Scalable Web Applications</title>
	<atom:link href="http://blog.nickbelhomme.com/php/scalable-web-applications_158/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158</link>
	<description>Programming your life and the net, one day at a time</description>
	<lastBuildDate>Mon, 04 Jan 2010 11:14:22 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Rizky Rukmana</title>
		<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158/comment-page-1#comment-6695</link>
		<dc:creator>Rizky Rukmana</dc:creator>
		<pubDate>Tue, 01 Dec 2009 04:17:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickbelhomme.com/?p=158#comment-6695</guid>
		<description>Hi,

This is interested post.
Anyway what is Application Level Partitioning ? is it database Sharding? 

tip 7: Shared Storage System like NFS/SAN.
tip 8: Separate your static files or CDNed.
tip 9: Do database archiving
tip 10: Separate OLTP database from OLAP usage</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>This is interested post.<br />
Anyway what is Application Level Partitioning ? is it database Sharding? </p>
<p>tip 7: Shared Storage System like NFS/SAN.<br />
tip 8: Separate your static files or CDNed.<br />
tip 9: Do database archiving<br />
tip 10: Separate OLTP database from OLAP usage</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158/comment-page-1#comment-3870</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 25 Jun 2009 18:42:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickbelhomme.com/?p=158#comment-3870</guid>
		<description>Well there you have it, from the main man himself. Thank you so much for the clarifications Eli!</description>
		<content:encoded><![CDATA[<p>Well there you have it, from the main man himself. Thank you so much for the clarifications Eli!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EliW</title>
		<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158/comment-page-1#comment-3869</link>
		<dc:creator>EliW</dc:creator>
		<pubDate>Thu, 25 Jun 2009 18:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickbelhomme.com/?p=158#comment-3869</guid>
		<description>Hey Nick!  Thanks for this writeup, it&#039;s a great summary of my talk.   A few things I want to clarify:

The references to &#039;Facebook&#039; in this talk about caching discrete units of data.  My example there was actually Digg.com  (I used Facebook in an example about partitioning).  In this case, it&#039;s using memcached, and simply instead of caching large sets of data that will have duplication in them.  (Such as caching all the stories dugg by each of a user&#039;s 100 friends as a whole unit).  It&#039;s about breaking that down into reusable pieces.  So in this case, separately putting in memcached the &#039;stories dugg&#039; by each user.  Then when someone logs in, you just request each of their friend&#039;s information.  Yes, you end up making 100 memcached queries for example in that case.  But that&#039;s still better than making 1 DB query.  And by making the units small enough, you&#039;ve gained other efficiencies as discussed in this article (when the second user logs on, you get to read even less from the database)

On a second point.  The example code you give above nick for doing master/slave writing.  It&#039;s some good basic example code.  But it should be clarified that it&#039;s not a complete solution.  Part of that solution would involve handling failover for example.  (If one slave fails to connect, just try another one, gaining you not only scalability, but uptime)

Also, as your code there is written, it always makes a connection to both the master and a slave.  It would be preferable to make those connections on the fly.  Afterall that way if you have a page that never needs a &#039;master&#039; connection in the first place, then you don&#039;t waste resources connecting to it.

And as response to claylenhart:  You are correct.  For &#039;small to medium to large-ish&#039; tables, just making indices is perfectly valid and was already assumed.  What Nick&#039;s writeup here doesn&#039;t quite convey, was that these were &#039;steps&#039; I was going through, in order.  Doing Vertical and Horizontal partitioning are things that should only be breached well beyond the realm of issues you are talking about.   Where you are talking about billions of rows (and potentially wide rows), and where you are literally seeing performance issues of your indices not keeping up.   These are extreme measures at the outer limits of scalability.

Thanks again Nick!</description>
		<content:encoded><![CDATA[<p>Hey Nick!  Thanks for this writeup, it&#8217;s a great summary of my talk.   A few things I want to clarify:</p>
<p>The references to &#8216;Facebook&#8217; in this talk about caching discrete units of data.  My example there was actually Digg.com  (I used Facebook in an example about partitioning).  In this case, it&#8217;s using memcached, and simply instead of caching large sets of data that will have duplication in them.  (Such as caching all the stories dugg by each of a user&#8217;s 100 friends as a whole unit).  It&#8217;s about breaking that down into reusable pieces.  So in this case, separately putting in memcached the &#8217;stories dugg&#8217; by each user.  Then when someone logs in, you just request each of their friend&#8217;s information.  Yes, you end up making 100 memcached queries for example in that case.  But that&#8217;s still better than making 1 DB query.  And by making the units small enough, you&#8217;ve gained other efficiencies as discussed in this article (when the second user logs on, you get to read even less from the database)</p>
<p>On a second point.  The example code you give above nick for doing master/slave writing.  It&#8217;s some good basic example code.  But it should be clarified that it&#8217;s not a complete solution.  Part of that solution would involve handling failover for example.  (If one slave fails to connect, just try another one, gaining you not only scalability, but uptime)</p>
<p>Also, as your code there is written, it always makes a connection to both the master and a slave.  It would be preferable to make those connections on the fly.  Afterall that way if you have a page that never needs a &#8216;master&#8217; connection in the first place, then you don&#8217;t waste resources connecting to it.</p>
<p>And as response to claylenhart:  You are correct.  For &#8217;small to medium to large-ish&#8217; tables, just making indices is perfectly valid and was already assumed.  What Nick&#8217;s writeup here doesn&#8217;t quite convey, was that these were &#8217;steps&#8217; I was going through, in order.  Doing Vertical and Horizontal partitioning are things that should only be breached well beyond the realm of issues you are talking about.   Where you are talking about billions of rows (and potentially wide rows), and where you are literally seeing performance issues of your indices not keeping up.   These are extreme measures at the outer limits of scalability.</p>
<p>Thanks again Nick!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#187; Zend Framework 1.8 Workshop at the Dutch PHP Conference 09 Programming the new world: Programming your life and the net, one day at a time</title>
		<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158/comment-page-1#comment-3862</link>
		<dc:creator>&#187; Zend Framework 1.8 Workshop at the Dutch PHP Conference 09 Programming the new world: Programming your life and the net, one day at a time</dc:creator>
		<pubDate>Thu, 25 Jun 2009 08:51:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickbelhomme.com/?p=158#comment-3862</guid>
		<description>[...] every single model but only the DAOs. If you want to know more about scalability I will be doing an entry on this based on the incredible presentation done by Eli White, PHP Community Manager &amp; [...]</description>
		<content:encoded><![CDATA[<p>[...] every single model but only the DAOs. If you want to know more about scalability I will be doing an entry on this based on the incredible presentation done by Eli White, PHP Community Manager &amp; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit</title>
		<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158/comment-page-1#comment-3861</link>
		<dc:creator>Amit</dc:creator>
		<pubDate>Thu, 25 Jun 2009 07:25:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickbelhomme.com/?p=158#comment-3861</guid>
		<description>Your self examples and good closing notes made it a good read even though its mostly summary of &quot;Habits of Highly Scalable Web Applications&quot; slide By Eli White. Thanks for sharing your thoughts.</description>
		<content:encoded><![CDATA[<p>Your self examples and good closing notes made it a good read even though its mostly summary of &#8220;Habits of Highly Scalable Web Applications&#8221; slide By Eli White. Thanks for sharing your thoughts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: claylenhart</title>
		<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158/comment-page-1#comment-3858</link>
		<dc:creator>claylenhart</dc:creator>
		<pubDate>Wed, 24 Jun 2009 20:52:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickbelhomme.com/?p=158#comment-3858</guid>
		<description>I want to discourage the two partitioning tips, 3 and 4.  

For vertical partitioning, a good alternative is covering indexes that would include the frequently used columns such as id, nickname, password and firstname.  The database engine will just read the columns from the index and will not read the table, effectively giving vertical partitioning without the effort.

For horizontal partitioning, indexes are not as bad as you might think.  For 8 million rows, the DB engine will only need to read about 4 pages of data to find a singe record (it depends on the width of the clustered index).  Splitting the table into multiple 1 million row tables will, at best, reduce this by one to 3 pages, but still could be 4 pages.  In the best case when you only need to examine one table, it will be better, but when you need to examine multiple tables, you&#039;ll likely join these partitioned tables and the query will likely look for each record in all the partitioned tables making the query much slower.</description>
		<content:encoded><![CDATA[<p>I want to discourage the two partitioning tips, 3 and 4.  </p>
<p>For vertical partitioning, a good alternative is covering indexes that would include the frequently used columns such as id, nickname, password and firstname.  The database engine will just read the columns from the index and will not read the table, effectively giving vertical partitioning without the effort.</p>
<p>For horizontal partitioning, indexes are not as bad as you might think.  For 8 million rows, the DB engine will only need to read about 4 pages of data to find a singe record (it depends on the width of the clustered index).  Splitting the table into multiple 1 million row tables will, at best, reduce this by one to 3 pages, but still could be 4 pages.  In the best case when you only need to examine one table, it will be better, but when you need to examine multiple tables, you&#8217;ll likely join these partitioned tables and the query will likely look for each record in all the partitioned tables making the query much slower.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zerone</title>
		<link>http://blog.nickbelhomme.com/php/scalable-web-applications_158/comment-page-1#comment-3854</link>
		<dc:creator>zerone</dc:creator>
		<pubDate>Wed, 24 Jun 2009 16:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nickbelhomme.com/?p=158#comment-3854</guid>
		<description>Hey, nice article!

This facebook data units are files? Plain files? Or a bunch of serialized data?

Or a file per user with the top online friends (for the chat, for example). Can you elaborate a bit more. Thanks</description>
		<content:encoded><![CDATA[<p>Hey, nice article!</p>
<p>This facebook data units are files? Plain files? Or a bunch of serialized data?</p>
<p>Or a file per user with the top online friends (for the chat, for example). Can you elaborate a bit more. Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
