<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Scalable PHP with APC, memcached and LVS (Part 2)</title>
	<link>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/</link>
	<description>stuff and things, according to Mike Morgan</description>
	<pubDate>Thu, 20 Nov 2008 22:29:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: Enzo</title>
		<link>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-74798</link>
		<pubDate>Fri, 19 Oct 2007 20:32:51 +0000</pubDate>
		<guid>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-74798</guid>
					<description>Maybe I missed it, but are you using Squid? 

You should be using Squid to cache before you even hit the webservers. If there's a cache miss there, you should hit Apache2/Lighttpd. If you have to do any dynamic PHP,  then you should hit the APC cache first. If that is a miss and you have to generate dynamic page using PHP, then hopefully MySQL Query Cache is also being used. Lastly, if all else fails, MySQL will actually have to do a disk read.

The point is that there should be a heirarchy of caches used.</description>
		<content:encoded><![CDATA[<p>Maybe I missed it, but are you using Squid? </p>
<p>You should be using Squid to cache before you even hit the webservers. If there&#8217;s a cache miss there, you should hit Apache2/Lighttpd. If you have to do any dynamic PHP,  then you should hit the APC cache first. If that is a miss and you have to generate dynamic page using PHP, then hopefully MySQL Query Cache is also being used. Lastly, if all else fails, MySQL will actually have to do a disk read.</p>
<p>The point is that there should be a heirarchy of caches used.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: MikeFM</title>
		<link>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-70467</link>
		<pubDate>Thu, 27 Sep 2007 06:57:18 +0000</pubDate>
		<guid>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-70467</guid>
					<description>Instead of using a template engine like Smarty and database abstraction libraries I instead split my applications up into multiple parts. Each component speaks to other components via XML-RPC.

The UI layer processes user inputs into a usable form and outputs. It does templating and a few basic UI related tasks and that's pretty much it. The UI component passes requests to an application logic component that does all of the real work. In some cases this component will call other components such as our enterprise back-end system, a remote system such as UPS, or a database - again always communicating in XML-RPC.

The code is kept clean and uncomplex by only using one method to interface between different systems. Systems that don't speak XML-RPC, such as our enterprise system, are wrapped so that they do. It also makes it very easy to integrate these components into other applications regardless to what language you're programming them in and of course you have the option to write different components in different languages if you need to. By breaking code into components each component can stay very clean, short, and to the point.

The work required to encode and decode XML-RPC requests is minimal and  the different components can be on the same network or server. Your http connections can be reused so that there is no need to open them again for each request. If load gets high you can load balance multiple copies of individual components across multiple machines easily. It's not bad for security too as you can firewall off back-end systems and databases so that the only possible access to them is through your exposed XML-RPC interface.</description>
		<content:encoded><![CDATA[<p>Instead of using a template engine like Smarty and database abstraction libraries I instead split my applications up into multiple parts. Each component speaks to other components via XML-RPC.</p>
<p>The UI layer processes user inputs into a usable form and outputs. It does templating and a few basic UI related tasks and that&#8217;s pretty much it. The UI component passes requests to an application logic component that does all of the real work. In some cases this component will call other components such as our enterprise back-end system, a remote system such as UPS, or a database - again always communicating in XML-RPC.</p>
<p>The code is kept clean and uncomplex by only using one method to interface between different systems. Systems that don&#8217;t speak XML-RPC, such as our enterprise system, are wrapped so that they do. It also makes it very easy to integrate these components into other applications regardless to what language you&#8217;re programming them in and of course you have the option to write different components in different languages if you need to. By breaking code into components each component can stay very clean, short, and to the point.</p>
<p>The work required to encode and decode XML-RPC requests is minimal and  the different components can be on the same network or server. Your http connections can be reused so that there is no need to open them again for each request. If load gets high you can load balance multiple copies of individual components across multiple machines easily. It&#8217;s not bad for security too as you can firewall off back-end systems and databases so that the only possible access to them is through your exposed XML-RPC interface.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: PHP Architectures that power your favourite big websites - TechEnclave</title>
		<link>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-68997</link>
		<pubDate>Wed, 19 Sep 2007 21:13:23 +0000</pubDate>
		<guid>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-68997</guid>
					<description>[...] permalink                 The next time someone asks you what language you work on , don't fret to say that you work on PHP . I've been doing some research on building high performance websites. And how PHP ,from a web development perspective is involved in truly scalable architectures. And for those investing their career in web development - PHP 's rising presence is evident from the programming index maintained annually .  From the smallest you can think of , to the biggest sites out there - use PHP . Ofcourse there are other things to learn like caching , harware and software load balancing , clustering / replication / federation / sharding of databases , choosing between flat files vs rdbms , proxies , mirroring , and so on.   To make a site that really scales, you can defintely find success with PHP as your prefered scripting language. Some of the few companies that use PHP are :   FlickrFlickr and PHPFlickr Architecture YahooMaking the case for PHP at Yahoo.(talk from 2002)One year of PHP at Yahoo (talk from 2003)Large Scale PHP DiggDiggHow Digg uses LAMPDigg ArchitectureDigg PHP's Scalability and Performance FacebookPHP's APC at FacebookFacebook Internals TechEnclave  ,and tens of thousands of other forums (Comparison of Internet forum software using PHP  ), wiki' s , websites .  Misc. PHP web architecture linksWikimedia architectureZend Developer Zone: A Review of &amp;#34;Scalable Internet Architectures&amp;#34;High Performance PHPFriendstar switching from JSP to PHPPHP Development From Java Architects EyeGetting Rich with PHPJames Gosling, the &amp;#34;father of Java,&amp;#34; commenting on PHPNice blog at procataScalable PHP with APC, memcached and LVS  Building scalable applications is an art in itself . And if you become a master of designing high performance applications in PHP or any language for that matter - you rule 8 ) .  __________________ Keep Clicking, BoskyTE Rig Gallery &amp;#124; TE Hardware Price list &amp;#124; TE Guides &amp;#38; Tutorials &amp;#124; FunEnclave &amp;#124; TE Geek Quotes [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] permalink                 The next time someone asks you what language you work on , don&#8217;t fret to say that you work on PHP . I&#8217;ve been doing some research on building high performance websites. And how PHP ,from a web development perspective is involved in truly scalable architectures. And for those investing their career in web development - PHP &#8217;s rising presence is evident from the programming index maintained annually .  From the smallest you can think of , to the biggest sites out there - use PHP . Ofcourse there are other things to learn like caching , harware and software load balancing , clustering / replication / federation / sharding of databases , choosing between flat files vs rdbms , proxies , mirroring , and so on.   To make a site that really scales, you can defintely find success with PHP as your prefered scripting language. Some of the few companies that use PHP are :   FlickrFlickr and PHPFlickr Architecture YahooMaking the case for PHP at Yahoo.(talk from 2002)One year of PHP at Yahoo (talk from 2003)Large Scale PHP DiggDiggHow Digg uses LAMPDigg ArchitectureDigg PHP&#8217;s Scalability and Performance FacebookPHP&#8217;s APC at FacebookFacebook Internals TechEnclave  ,and tens of thousands of other forums (Comparison of Internet forum software using PHP  ), wiki&#8217; s , websites .  Misc. PHP web architecture linksWikimedia architectureZend Developer Zone: A Review of &quot;Scalable Internet Architectures&quot;High Performance PHPFriendstar switching from JSP to PHPPHP Development From Java Architects EyeGetting Rich with PHPJames Gosling, the &quot;father of Java,&quot; commenting on PHPNice blog at procataScalable PHP with APC, memcached and LVS  Building scalable applications is an art in itself . And if you become a master of designing high performance applications in PHP or any language for that matter - you rule 8 ) .  __________________ Keep Clicking, BoskyTE Rig Gallery | TE Hardware Price list | TE Guides &amp; Tutorials | FunEnclave | TE Geek Quotes [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: using DBobject - Discussweb IT Community - Web Development, Software Programming, SEO, Quality Assurance, 3D, Web Hosting and more...</title>
		<link>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-61805</link>
		<pubDate>Sat, 28 Jul 2007 10:43:43 +0000</pubDate>
		<guid>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-61805</guid>
					<description>[...] Re: using DBobject -  07-28-2007, 03:43 AM       Yes... you correct. But consider one thing...  Why we go for those kinds of massive libraries or classes or over generalize things, for a DB migration.   I Accept PEAR, Smarty and DBObjects are widely libraries in PHP. But how it increases the web site capabilities?  Just have a look this bellow link how the generalized libraries affect your web site performance.  Mike Morgan - morgamic.com » Blog Archive » Scalable PHP with APC, memcached and LVS (Part 2)  Thanks -Kathir [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Re: using DBobject -  07-28-2007, 03:43 AM       Yes&#8230; you correct. But consider one thing&#8230;  Why we go for those kinds of massive libraries or classes or over generalize things, for a DB migration.   I Accept PEAR, Smarty and DBObjects are widely libraries in PHP. But how it increases the web site capabilities?  Just have a look this bellow link how the generalized libraries affect your web site performance.  Mike Morgan - morgamic.com » Blog Archive » Scalable PHP with APC, memcached and LVS (Part 2)  Thanks -Kathir [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: nihilist</title>
		<link>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-6776</link>
		<pubDate>Mon, 25 Sep 2006 19:55:49 +0000</pubDate>
		<guid>http://morgamic.com/2006/04/14/scalable-php-with-phpa-apc-memcached-and-lvs-part-2/#comment-6776</guid>
					<description>Is there a diagram showing the layout of the LVS nodes, how memcached was setup, etc?  I'm curious as to how the infrastructure is setup.</description>
		<content:encoded><![CDATA[<p>Is there a diagram showing the layout of the LVS nodes, how memcached was setup, etc?  I&#8217;m curious as to how the infrastructure is setup.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
