<?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>RightScale Blog &#187; Auto-scale</title>
	<atom:link href="http://blog.rightscale.com/tag/auto-scale/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rightscale.com</link>
	<description>Cloud Management News &#38; Conversations</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:06:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.rightscale.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>RightScale Blog &#187; Auto-scale</title>
		<link>http://blog.rightscale.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.rightscale.com/osd.xml" title="RightScale Blog" />
	<atom:link rel='hub' href='http://blog.rightscale.com/?pushpress=hub'/>
		<item>
		<title>Cloud Foundry Architecture and Auto-Scaling</title>
		<link>http://blog.rightscale.com/2011/04/14/cloud-foundry-architecture-and-auto-scaling/</link>
		<comments>http://blog.rightscale.com/2011/04/14/cloud-foundry-architecture-and-auto-scaling/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 15:00:22 +0000</pubDate>
		<dc:creator>Thorsten</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[PaaS]]></category>
		<category><![CDATA[Auto-scale]]></category>

		<guid isPermaLink="false">http://blog.rightscale.com/?p=731</guid>
		<description><![CDATA[Yesterday&#8217;s blog post mostly covered the benefits of VMware&#8217;s Cloud Foundry PaaS and how it fits with RightScale. Today I want to dive a little into the Cloud Foundry architecture and highlight how IaaS and PaaS really are complementary. I&#8217;m &#8230; <a href="http://blog.rightscale.com/2011/04/14/cloud-foundry-architecture-and-auto-scaling/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rightscale.com&amp;blog=2909729&amp;post=731&amp;subd=rightscale&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a title="Launch VMware’s CloudFoundry PaaS using RightScale" href="http://blog.rightscale.com/2011/04/12/launch-vmwares-cloudfoundry-paas-using-rightscale/">Yesterday&#8217;s blog post</a> mostly covered the benefits of VMware&#8217;s <a href="http://cloudfoundry.org">Cloud Foundry</a> PaaS and how it fits with RightScale. Today I want to dive a little into the Cloud Foundry architecture and highlight how IaaS and PaaS really are complementary. I&#8217;m really hoping that more PaaS options will become available so we can offer our users a choice of PaaS software.</p>
<p><strong><a href="http://rightscale.files.wordpress.com/2011/04/cloudfoundry2.png"><img class="alignright size-full wp-image-752" title="CloudFoundry" src="http://rightscale.files.wordpress.com/2011/04/cloudfoundry2.png?w=600" alt=""   /></a>CloudFoundry Architecture</strong></p>
<p>From a technical point of view I see two main innovations in Cloud Foundry. The first is that the software is  released as an open source project with an Apache license, which gives  users and third-parties access to make customizations and to operate Cloud Foundry on their own. The second is that Cloud Foundry is very modular and separates the data path from the control plane, i.e. the components that make user applications run from the ones that control Cloud Foundry itself and the deployment and scaling of user applications. The reason the latter innovation is significant is that it really opens up the door to innovate on the management of the PaaS as well as integrate it into existing frameworks such as RightScale&#8217;s Dashboard.</p>
<p>Enough prelude, the pieces that make up Cloud Foundry are:</p>
<ul>
<li>At the core the <strong>app execution engine</strong> is the piece  that runs your application. It&#8217;s what launches and manages the Rails,  Java, and other language app servers. As your app is scaled up more app  execution engines will launch an app server with your code. The way the  app execution engine is architected is nice in that it is fairly  stand-alone. It can be launched on any suitably configured server, then  it connects to the other servers in the PaaS and starts running user  applications (the app execution engines can be configured to run a single app per server or multiple). This means that to scale up the PaaS infrastructure itself  the primary method is to launch more suitably configured app execution engines,  something that is easy to do in a RightScale server array!</li>
<li>The <strong>request router</strong> is the front door to the PaaS:  it accepts all the HTTP requests for all the applications running in the  PaaS and routes them to the best app execution engine that runs the  appropriate application code. In essence the request router is a load  balancer that knows which app is running where. The request router needs to be told about the hostname used by each application and it keeps track of the available app execution engines for each app. Request routers are generally not scaled frequently, in part because DNS entries point to them and it&#8217;s good practice to keep DNS as stable as possible, and also because a small number of request routers go a long way compared to app execution engines. It is possible, however to place regular load balancers in front of the request routers to make it easy to scale them without DNS changes.</li>
<li>The <strong>cloud controller</strong> implements the external API used by tools to load/unload apps and control their environment, including the number of app execution engines that should run each application. As part of taking in new applications it creates the bundles that app execution engines load to run an application. A nice aspect of the cloud controller is that it is relatively policy-free, meaning that it relies on external input to perform operations such as scaling how many app execution engines each application uses. This allows different management policies to be plugged-in.</li>
<li>A set of <strong>services </strong>provide data storage and other functions that can be leveraged by applications. In analogy with operating systems these are the device drivers. Each service tends to consist of two parts: the application implementing the service itself, much as MySQL, MongoDB, redis, etc. and a Cloud Foundry management layer that establishes the connections between applications and the service itself. For example, in the MySQL case this layer creates a separate logical database for each application and manages the credentials such that each application has access to its database.</li>
<li>A <strong>health manager</strong> responsible for keeping applications alive and ensuring that if an app execution engine crashes the applications it ran are restarted elsewhere.</li>
</ul>
<p>All these parts are tied together using a simple message bus, which, among other things allows all the servers to find each other.</p>
<p><strong>Auto-scaling Cloud Foundry</strong></p>
<p>&#8220;So, does it auto-scale&#8221;? seems to be the question everyone asks. (I wonder who started this auto-scaling business? <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) The answer is &#8220;no, but trivially so&#8221;. There are actually two levels at which Cloud Foundry scales, whether automatically or not. The first is at the Cloud Foundry infrastructure level, e.g. how many app execution engines, how many request routers, how many cloud controllers, and how many services there are. The second level is at the individual application level and is primarily expressed in how many app execution engines are &#8220;running&#8221; the application (really, how many have the application loaded and are accepting requests from the request router).</p>
<p>The first level of scaling the Cloud Foundry infrastructure is the responsibility of the PaaS operator. The operator needs to monitor the load on the various servers and launch additional or terminate idle ones as appropriate. In particular, there should always be a number of idle app execution engines that can accept the next application or that can be brought to bear on an application that needs more resources. This level of scaling can be performed relatively easily manually or automatically in RightScale. The app execution engines can be placed in a server array and scaled based on their load.</p>
<p>The second level of scaling is the responsibility of each application&#8217;s owner. The nice thing about the modularity of Cloud Foundry is that it exposes the necessary hooks to adding external application monitoring and scaling decisions. It is also interesting that Cloud Foundry in effect exposes the resource costs and lets the application owner decide how much to consume&#8211;and pay for. This is in contrast to other systems that make it difficult to limit the resources other than by setting quotas at which point an application is suspended as opposed to simply running slower.</p>
<p>What we envision in working with Cloud Foundry is simple: RightScale will be able to monitor the various servers in the Cloud Foundry cluster, and determine for example when it’s “slack pool” of warm, ready-to-go app execution engines has dropped below a given threshold (or exceeded an idle threshold), and either boot new servers to add to the “slack pool” or de-commission unnecessary ones to save on cost, as appropriate.</p>
<p><strong><img class="alignright" style="margin-left:10px;margin-right:10px;" src="http://www.rightscale.com/lp/images/lp-foundry-rightscale.gif" alt="" width="409" height="120" />PaaS and IaaS Synergy</strong></p>
<p><strong></strong>The benefits of PaaS come from defining a constrained application deployment environment. That makes it necessary for many applications to &#8220;punch out&#8221; and leverage services outside of the PaaS framework. In some cases this may be a simple service, like a messaging server or a special form of data storage. In other cases it will end up being almost a reversed situation where a large portion of the application runs outside of the PaaS and the portions in the PaaS are really just complements or front-ends for the main system. Cloud Foundry makes it relatively easy to make outside services available to applications in the PaaS, but these outside applications still need to be managed. This is where an IaaS management framework like RightScale is great because it can bring the whole infrastructure under one roof.</p>
<p>Some examples for this punching out:</p>
<ul>
<li>Databases from the SQL variety to NoSQL and other models. Accessing legacy databases as well as leveraging popular DB setups like our MySQL Manager, which provides master slave replication.</li>
<li>Different load balancers in front of the request routers, perhaps with extensive caching features, global load balancing, or other goodies. Examples would be Zeus, Squid and many others.</li>
<li>Legacy or licensed software, for example video encoding software or PDF generators.</li>
<li>Special back-end services, such as a telephony server.</li>
</ul>
<p>If there&#8217;s one thing I&#8217;ve learned about customers at RightScale it&#8217;s the incredible variety of needs, architectures, and software packages that are in use. For this reason alone I see PaaS as another very nice tool in the RightScale toolbox.</p>
<p>Can you run Cloud Foundry without RightScale? Of course. It certainly runs on raw servers. They can PXE boot a base image and join the PaaS in one of the above server roles. However in a mixed environment it is much more beneficial to run the Cloud Foundry roles within a managed infrastructure cloud.</p>
<p>It seems obvious from the traditional SaaS/PaaS/IaaS cloud diagrams that these different layers were made to interoperate.  And that’s what we’ve already seen our customers doing: combining PaaS and IaaS in ways that meet their needs.  There are a number of PaaS solutions in the market with more on the horizon. We will continue to support as many as we can and to the extent that their architectures allow it, because cloud is a heterogeneous world and customers want choice.  In the case of Cloud Foundry, we have a particularly open architecture that provides a compelling fit – and we’re excited to see where our joint customers take us together.</p>
<br />Filed under: <a href='http://blog.rightscale.com/category/cloud-computing/'>Cloud Computing</a>, <a href='http://blog.rightscale.com/category/ec2/'>EC2</a>, <a href='http://blog.rightscale.com/category/paas/'>PaaS</a> Tagged: <a href='http://blog.rightscale.com/tag/auto-scale/'>Auto-scale</a>, <a href='http://blog.rightscale.com/tag/cloud-computing/'>Cloud Computing</a>, <a href='http://blog.rightscale.com/tag/ec2/'>EC2</a>, <a href='http://blog.rightscale.com/tag/paas/'>PaaS</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rightscale.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rightscale.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rightscale.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rightscale.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rightscale.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rightscale.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rightscale.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rightscale.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rightscale.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rightscale.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rightscale.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rightscale.wordpress.com/731/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rightscale.wordpress.com/731/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rightscale.wordpress.com/731/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rightscale.com&amp;blog=2909729&amp;post=731&amp;subd=rightscale&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rightscale.com/2011/04/14/cloud-foundry-architecture-and-auto-scaling/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b359e9ce1a8fb5f3315fbec8beda697?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">TvE</media:title>
		</media:content>

		<media:content url="http://rightscale.files.wordpress.com/2011/04/cloudfoundry2.png" medium="image">
			<media:title type="html">CloudFoundry</media:title>
		</media:content>

		<media:content url="http://www.rightscale.com/lp/images/lp-foundry-rightscale.gif" medium="image" />
	</item>
		<item>
		<title>Animoto&#8217;s Facebook scale-up</title>
		<link>http://blog.rightscale.com/2008/04/23/animoto-facebook-scale-up/</link>
		<comments>http://blog.rightscale.com/2008/04/23/animoto-facebook-scale-up/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 09:00:31 +0000</pubDate>
		<dc:creator>Thorsten</dc:creator>
				<category><![CDATA[EC2]]></category>
		<category><![CDATA[Auto-scale]]></category>

		<guid isPermaLink="false">http://rightscale.wordpress.com/?p=53</guid>
		<description><![CDATA[The Animoto guys did hit the jackpot on Facebook this past week. Jeff Barr mentioned a few of the stats on his blog: Animoto ramped from 25,000 users to 250,000 users in three days, signing up 20,000 new users per &#8230; <a href="http://blog.rightscale.com/2008/04/23/animoto-facebook-scale-up/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rightscale.com&amp;blog=2909729&amp;post=53&amp;subd=rightscale&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://blog.animoto.com/">Animoto guys</a> did hit the jackpot on Facebook this past week. Jeff Barr mentioned a few of the stats on <a href="http://aws.typepad.com/aws/2008/04/animoto---scali.html">his blog</a>: Animoto ramped from 25,000 users to 250,000 users in three days, signing up 20,000 new users per hour at peak. The system they run using RightScale is quite complicated with the www.animoto.com web site, then a separate site for the facebook app run by Hungry Machines, both of these feeding into a back-end web services site which then orchestrates uploads, and, most importantly, the render farm which creates the cool videos.</p>
<p>The upshot is that there are a lot of moving parts! Each one of the subsystems consists of many servers and everything needs to scale-up as the load increases. What Animoto CTO Stevie Clifton did really well is to connect all the operations using queues, many of them in SQS. One queue contains work items that list photo URLs to fetch from other sites, such as Facebook, Flickr, etc., and that is processed by one array of worker instances. Another queue has the list of render jobs and each work item in there points to the set of photos sitting at the ready in S3 and at the music files also on S3. All of these queues are held in Amazon SQS and the arrays of worker instances are managed by RightScale. This allows the monitoring part of our service to detect when the queue gets too large and more instances need to be launched. What’s nice about using queues is that it decouples the various parts of the site, so if the renderers get backlogged the queue simply builds up and users have to wait a little longer for their video to be produced. Waiting is not good, but dropping requests on the floor is much worse!</p>
<p>Producing the videos takes 8-9 minutes on average and at peak Animoto has pumped over 450 render requests per minute into the queue. Last week we ended up with just under 3500 instances in the various Animoto deployments and tonight it was more than 4000 and it looks like it will not drop under 2000 instances through the night. Yikes! At peak RightScale was launching and configuring 40 new instances per minute pretty much sustained to handle the injection of thousands of render jobs that needed special handling. Mind-boggling stuff&#8230;</p>
<p>Lessons learned&#8230; First of all, when you scale 10x and then 10x again to run on thousands of servers every little problem turns into a large one. That insignificant error rate of 0.1% gets multiplied by 1000x per second and you end up with an error a second, and actually, the error rate typically increases in itself too because of the added load on the system. So suddenly it&#8217;s not something you can ignore anymore. An example for this was having exponential backoff for uploads to S3 when using curl, but forgetting that the 5th retry exceeds the S3 connection timeout. Normally, this happens only once in a blue moon, but when tens of uploader instances are banging hard on one S3 bucket the S3 error rate goes up a bit and suddenly uploads are failing left and right. Once we changed this to a constant retry timeout it all went smooth again.</p>
<p>Now does this mean that you should fix all the little issues before going live? Of course not: you can&#8217;t! What I&#8217;ve found to be most effective is to think about every little problem that you come across for a few minutes. Don&#8217;t just brush it aside as being insignificant. It is now, but it *will* trip you up tomorrow or the day after. So spend 5 minutes to troubleshoot and hypothesize as far as you can get. You don&#8217;t have to solve it immediately. Think up a work-around or how you would troubleshoot further, or perhaps how you&#8217;d fix it. Then move on. Come tomorrow, when and if the issue becomes big, you will have an invaluable head-start. Instead of being caught off-guard you&#8217;ll be able to immediately kick into action and solve the issue.</p>
<p>Another lesson learned is not to forget the manual overrides. Yup, I know, we have this super smart auto-scaling algorithm. But we also have manual overrides and when Animoto went from about 50 instances to 4000 instances we used it. We wanted to make sure the extra instances didn&#8217;t overload the database, the queue, and that everything was running smoothly (and, yes, to take a pause and fix some issues before scaling up further). Stevie and the Hungry Machines guys also had put in some overrides to queue-up automatically generated videos and let manually requested ones zip through. This was essential in keeping the active users happy when everything first exploded and the system had trouble keeping up with the load. A lot of the queued videos were processed a bit later when the load went back down. Automation is cool for the daily routine events but for something like this you want the overrides.</p>
<p>Animoto is a great example of leveraging the cloud for its strengths of instant availability and virtually limitless scope.<span> </span>Of course, most sites don&#8217;t need to launch 4000 servers in one go, but its nice to know you can if you need to.<span> </span>Whether the number is 4 or 40 or 4000 &#8212; getting the resources you need at the time you need them is a key benefit of &#8220;right-scaling&#8221; your deployment using the cloud.<span> </span>Looking at our database today I noticed that RightScale has launched, configured, and managed over 200,000 instances to date! That&#8217;s an impressive number &#8212; but as the Animoto scale-up proves, we&#8217;re only just beginning&#8230;</p>
<p><a href="http://rightscale.files.wordpress.com/2008/06/animoto_graphs.gif"><img src="http://rightscale.files.wordpress.com/2008/06/animoto_graphs.gif?w=600" alt="Animoto AutoScaling Graphs"   class="alignnone size-full wp-image-63" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rightscale.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rightscale.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rightscale.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rightscale.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rightscale.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rightscale.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/rightscale.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/rightscale.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/rightscale.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/rightscale.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rightscale.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rightscale.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rightscale.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rightscale.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rightscale.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rightscale.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.rightscale.com&amp;blog=2909729&amp;post=53&amp;subd=rightscale&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.rightscale.com/2008/04/23/animoto-facebook-scale-up/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0b359e9ce1a8fb5f3315fbec8beda697?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">TvE</media:title>
		</media:content>

		<media:content url="http://rightscale.files.wordpress.com/2008/06/animoto_graphs.gif" medium="image">
			<media:title type="html">Animoto AutoScaling Graphs</media:title>
		</media:content>
	</item>
	</channel>
</rss>
