<?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>Life Scaling &#187; EC2</title>
	<atom:link href="http://orensol.com/category/ec2/feed/" rel="self" type="application/rss+xml" />
	<link>http://orensol.com</link>
	<description>Oren Solomianik's Blog</description>
	<lastBuildDate>Mon, 21 Jun 2010 08:10:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Paradox Of The Mail Server On The Cloud</title>
		<link>http://orensol.com/2009/10/29/the-paradox-of-the-mail-server-on-the-cloud/</link>
		<comments>http://orensol.com/2009/10/29/the-paradox-of-the-mail-server-on-the-cloud/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 13:56:06 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Blacklist]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[GoGrid]]></category>
		<category><![CDATA[mail server]]></category>
		<category><![CDATA[open relay]]></category>
		<category><![CDATA[PTR]]></category>
		<category><![CDATA[RackCloud]]></category>
		<category><![CDATA[RBL]]></category>
		<category><![CDATA[SMTP]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=290</guid>
		<description><![CDATA[<p>Providing your web application with a mail service that works flawlessly is probably essential for your business. You need to send activation emails to users, password reset emails, newsletters and probably a whole bunch of other emails that have to do with interactions with your application.</p>
<p>When there were only physical servers and static IP addresses, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-293" src="http://orensol.com/files/2009/10/nomail.png" alt="Cloud Mail Paradox" width="280" height="280" />Providing your web application with a mail service that works flawlessly is probably essential for your business. You need to send activation emails to users, password reset emails, newsletters and probably a whole bunch of other emails that have to do with interactions with your application.</p>
<p>When there were only physical servers and static IP addresses, everything worked perfectly. But now, when your application is in the cloud, setting up a working mail server next to your application is ridiculously impossible. If your application is successful and you would like to send emails to your millions of satisfied users, your options come down to:</p>
<ol>
<li>Use a physical hosted server.</li>
<li>Use a 3rd party email service.</li>
<li>Set up a mail server in the cloud and compromise on some/most being marked as spam.</li>
</ol>
<p>For us cloud oriented developers, option 1 is as useful as somebody suggesting you&#8217;d use a cassette tape recorder to put your favorite songs on. It&#8217;s old, unreliable, can&#8217;t scale. Option 2 is very costly if your business is successful, and most of <a href="http://www.icontact.com/pricing" target="_blank">these</a> <a href="http://www.dnsmadeeasy.com/s0306/price/mail.html#smtp" target="_blank">services</a> don&#8217;t deal with the amount of mails you need to send if you have a large scale user base. Option 3 will make your email communication efforts with your users almost non-existent, which means you can&#8217;t afford it as well. So your only option is to compromise somewhere.</p>
<h3>Why is sending email from the cloud so difficult?</h3>
<p>In order for your mail server to operate successfully and be trusted by mail services around the world, you need to abide by the following rules:</p>
<ol>
<li>Don&#8217;t be an <a href="http://en.wikipedia.org/wiki/Open_mail_relay" target="_blank">open relay</a>.</li>
<li><span style="background-color: #ffffff">Implement (and follow) <a href="http://www.openspf.org/" target="_blank">SPF</a> policy (and <a href="http://www.dkim.org/" target="_blank">DKIM</a> if possible).</span></li>
<li>Have a <a href="http://en.wikipedia.org/wiki/Reverse_DNS_lookup">PTR</a> record that resolves back exactly to your mail server hostname.</li>
<li>Don&#8217;t let your public IP address be listed in any <a href="http://en.wikipedia.org/wiki/DNSBL">RBLs</a>.</li>
</ol>
<p>Rule #1 is easily implemented in any mail server configuration, and there are also a number of <a href="http://www.mxtoolbox.com/" target="_blank">online</a> <a href="http://www.abuse.net/relay.html" target="_blank">tools</a> to test if you&#8217;re an open relay or not. Option #2 is also pretty easy to implement, assuming you control your DNS zone files and know your way around it.</p>
<p>The problem of mail on the cloud begins with rules #3 and #4. A PTR record, which is a reverse DNS entry, must be present and correct for your mail server to not be considered spammy. If your mail server is at 1.2.3.4 and is called mail.example.com, the PTR query for 1.2.3.4 (well, for 4.3.2.1.in-addr.arpa) must return mail.example.com. The PTR record can only be changed by the owner of the IP address, or by a delegation of his authority to you. <a href="http://aws.amazon.com/" target="_blank">Amazon Web Services</a> do not let you control PTR records, so there goes the option for a mail server on EC2.</p>
<p>Other clouds let you control the PTR records for the IP addresses they assigned to you. But they fail on Rule #4. While your specific IP address might not be blacklisted in RBLs, the entire block that it belongs to might be blacklisted, because these IP addresses are assigned dynamically and therefore are always suspected as spammy by these lists. This is the case with <a href="http://www.rackspacecloud.com/" target="_blank">Rackspace Cloud</a> for example, and is the only thing left to be solved before you can run a mail server there. And although they&#8217;re trying to get their address block de-listed, this problem still persists.</p>
<p>Other clouds I&#8217;ve examined in this space are <a href="http://www.gogrid.com/" target="_blank">GoGrid</a> and <a href="http://www.joyent.com/" target="_blank">Joyent</a>. GoGrid want you to fill up a questionnaire, and only then they open up port 25 for you. This sounds absurd, and against all the on-demand nature of the cloud (and I also personally don&#8217;t trust ServePath, the company that operates GoGrid). Joyent&#8217;s offering seem to disregard the option of hosting a mail server with them, and I couldn&#8217;t get their response on this matter.</p>
<p>So unless Rackspace Cloud solve their IP block blacklisting problem, or AWS offer a PTR setting option (plus no blacklisting as well), we&#8217;re left with the need to compromise.</p>
<p>The only feasible solution right now &#8212; seems like it&#8217;s back to physical hosting.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/10/29/the-paradox-of-the-mail-server-on-the-cloud/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Cron Script To Snapshot Any Attached EBS Volume</title>
		<link>http://orensol.com/2009/08/10/cron-script-to-snapshot-any-attached-ebs-volume/</link>
		<comments>http://orensol.com/2009/08/10/cron-script-to-snapshot-any-attached-ebs-volume/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 08:12:40 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Scaling]]></category>
		<category><![CDATA[Automatic]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Snapshot]]></category>
		<category><![CDATA[Volume]]></category>
		<category><![CDATA[XFS]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=267</guid>
		<description><![CDATA[<p>If you would like to cron snapshots of any attached volume to an instance, you can use the following script. It uses the EC2 command line tools to see what volumes are currently attached to this instance, and takes a snapshot. Make sure to replace all the variables on the top of the script to [...]]]></description>
			<content:encoded><![CDATA[<p>If you would like to cron snapshots of any attached volume to an instance, you can use the following script. It uses the EC2 command line tools to see what volumes are currently attached to this instance, and takes a snapshot. Make sure to replace all the variables on the top of the script to match your own.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">JAVA_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>java<span style="color: #000000; font-weight: bold;">/</span>default
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>vol<span style="color: #000000; font-weight: bold;">/</span>snap<span style="color: #000000; font-weight: bold;">/</span>ec2-api-tools-<span style="color: #000000;">1.3</span>-<span style="color: #000000;">26369</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_PRIVATE_KEY</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>PATH-TO-YOUR-PRIVATE-KEY<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">EC2_CERT</span>=<span style="color: #7a0874; font-weight: bold;">&#91;</span>PATH-TO-YOUR-CERT<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AWS_ACCESS_KEY_ID</span>=<span style="color: #ff0000;">&quot;[YOUR-ACCESS-KEY]&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">AWS_SECRET_ACCESS_KEY</span>=<span style="color: #ff0000;">&quot;[YOUR-SECRET-KEY]&quot;</span>
&nbsp;
<span style="color: #007800;">INSTANCE_ID</span>=<span style="color: #000000; font-weight: bold;">`</span>curl <span style="color: #660033;">-s</span> http:<span style="color: #000000; font-weight: bold;">//</span>169.254.169.254<span style="color: #000000; font-weight: bold;">/</span>latest<span style="color: #000000; font-weight: bold;">/</span>meta-data<span style="color: #000000; font-weight: bold;">/</span>instance-id<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Instance ID is <span style="color: #007800;">$INSTANCE_ID</span>&quot;</span>
<span style="color: #007800;">VOLUMES</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$EC2_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-describe-volumes <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;ATTACHMENT&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$INSTANCE_ID</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $2}'</span><span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Volumes are: <span style="color: #007800;">$VOLUMES</span>&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> VOLUME <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #007800;">$VOLUMES</span>; <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Snapping Volume <span style="color: #007800;">$VOLUME</span>&quot;</span>
        <span style="color: #007800;">DEVICE</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$EC2_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-describe-volumes <span style="color: #007800;">$VOLUME</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;ATTACHMENT&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$INSTANCE_ID</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $4}'</span><span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Device is <span style="color: #007800;">$DEVICE</span>&quot;</span>
        <span style="color: #007800;">MOUNTPOINT</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">df</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$DEVICE</span>&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $6}'</span><span style="color: #000000; font-weight: bold;">`</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Mountpoint is <span style="color: #007800;">$MOUNTPOINT</span>&quot;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># Snapshot</span>
        <span style="color: #007800;">SNAPSHOT_ID</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$EC2_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-create-snapshot <span style="color: #007800;">$VOLUME</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Snapshotted: <span style="color: #007800;">$SNAPSHOT_ID</span>&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>If you&#8217;re wondering why $MOUNTPOINT is important (it&#8217;s not used here after all), it&#8217;s because you might want to freeze your filesystem if it&#8217;s XFS, so you could safely take a snapshot of a MySQL database for example. So you could easily wrap the snapshot create command with this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">        <span style="color: #666666; font-style: italic;"># freeze</span>
        xfs_freeze <span style="color: #660033;">-f</span> <span style="color: #007800;">$MOUNTPOINT</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># Snapshot</span>
        <span style="color: #007800;">SNAPSHOT_ID</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #007800;">$EC2_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ec2-create-snapshot <span style="color: #007800;">$VOLUME</span><span style="color: #000000; font-weight: bold;">`</span>
&nbsp;
        <span style="color: #666666; font-style: italic;"># unfreeze</span>
        xfs_freeze <span style="color: #660033;">-u</span> <span style="color: #007800;">$MOUNTPOINT</span></pre></div></div>

<p>And if you are indeed using this script to snapshot a volume with MySQL on it, you need also to flush tables with read lock, and gather information on master and slave positions. For this task you can use <a href="http://twitter.com/esh" target="_blank">Eric Hammond</a>&#8217;s <a href="http://ec2-snapshot-xfs-mysql.notlong.com/" target="_blank">script</a>, and incorporate it to the cron script. (You can read more about MySQL and XFS on EC2 <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1663" target="_blank">on the AWS site</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/08/10/cron-script-to-snapshot-any-attached-ebs-volume/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Detaching Infrastructure From Physical Hosts: Fantasy vs. Reality</title>
		<link>http://orensol.com/2009/06/17/detaching-infrastructure-from-physical-hosts-fantasy-vs-reality/</link>
		<comments>http://orensol.com/2009/06/17/detaching-infrastructure-from-physical-hosts-fantasy-vs-reality/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 16:53:47 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Scaling]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[Host]]></category>
		<category><![CDATA[IaaS]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Instance]]></category>
		<category><![CDATA[Mirroring]]></category>
		<category><![CDATA[Physical]]></category>
		<category><![CDATA[Virtual]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=246</guid>
		<description><![CDATA[<p class="wp-caption-text">Image via http://www.flickr.com/photos/martinlatter/</p>
<p>Cloud computing has brought along the promise of easy-to-scale-and-yet-affordable computer clusters. There are various clouds out there that provide Infrastructure as a Service, such as <a href="http://aws.amazon.com/ec2/" target="_blank">Amazon EC2</a>, <a href="http://code.google.com/appengine/" target="_blank">Google App Engine</a>, <a href="http://www.mosso.com/" target="_blank">Mosso</a>, and the newcomer <a href="http://www.salesforce.com/platform/sites/" target="_blank">Force.com Sites</a> to name a few. I personally have experience [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_249" class="wp-caption alignright" style="width: 310px"><img class="size-full wp-image-249" src="http://orensol.com/files/2009/06/299981441_7f00c6af77.jpg" alt="Dead Harddrive" width="300" height="206" /><p class="wp-caption-text">Image via http://www.flickr.com/photos/martinlatter/</p></div>
<p>Cloud computing has brought along the promise of easy-to-scale-and-yet-affordable computer clusters. There are various clouds out there that provide Infrastructure as a Service, such as <a href="http://aws.amazon.com/ec2/" target="_blank">Amazon EC2</a>, <a href="http://code.google.com/appengine/" target="_blank">Google App Engine</a>, <a href="http://www.mosso.com/" target="_blank">Mosso</a>, and the newcomer <a href="http://www.salesforce.com/platform/sites/" target="_blank">Force.com Sites</a> to name a few. I personally have experience as a developer only with Amazon EC2, and I am a devoted fan and user of the entire AWS stack. Nonetheless, I believe that what I have to say here is relevant to all other platforms.</p>
<p>While the cloud and <a href="http://en.wikipedia.org/wiki/Infrastructure_as_a_Service" target="_blank">IaaS</a> model have indeed many significant advantages over traditional physical hosting, there is one major annoyance still to overcome in this space, and that is: your virtual host is still connected to a physical machine. And that machine is non-redundant, it doesn&#8217;t have any hot backup, and there&#8217;s no way to transparently and hassle-free fail over from it once its malfunctioning. And this is why, from time to time I get this email from Amazon:</p>
<blockquote><p>Hello,</p>
<p>We have noticed that one or more of your instances are running on a host degraded due to hardware failure.</p>
<p>i-XXXXXXXX</p>
<p>The host needs to undergo maintenance and will be taken down at XX:XX GMT on XXXX-XX-XX. Your instances will be terminated at this point.</p>
<p>The risk of your instances failing is increased at this point. We cannot determine the health of any applications running on the instances. We recommend that you launch replacement instances and start migrating to them.</p>
<p>Feel free to terminate the instances with the ec2-terminate-instance API when you are done with them.</p>
<p>Let us know if you have any questions.</p>
<p>Sincerely,</p>
<p>The Amazon EC2 Team</p></blockquote>
<p>At this stage, this is one of the greatest shortcomings of EC2 from my point of view. As a customer of EC2, I don&#8217;t want to care if a host has hardware failure. Why can&#8217;t my instance just be mirrored somewhere else, consistent hot-backup style, and upon failure of host hardware be transparently switched to the backup host? I don&#8217;t care paying the extra buck for this service.</p>
<p>In my vision, in a true IaaS cloud there is no connection between the virtual machine and the physical host. The virtual machine is truly floating in the cloud, unbound to the physical realm by means of some consistent mirroring across physical hosts.</p>
<p>And you might be thinking &#8220;you can implement this on your own on the existing infrastucture that EC2 offers&#8221;, and &#8220;you should be prepared for any instance going poof&#8221;. And you are correct, at the current offering of EC2, this is the case. You always have to be prepared for an instance failure (in the last month, I had 2 physical hosts failure out of about 20, that&#8217;s about a monthly 10% (!!) ), and you always have to build your architecture so that a single host failure can fail over gracefully. But were my vision a reality, I wouldn&#8217;t have to worry about these things, and wouldn&#8217;t have to spend time and money on the overhead that they incur.</p>
<p>I am not certain that this is the situation in the other clouds, but if it is not, it might come with the price of less flexibility, which is a major part of EC2 on which I am not willing to give up. If that flexibility can be maintained, I would love to see my vision become a reality on EC2.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/06/17/detaching-infrastructure-from-physical-hosts-fantasy-vs-reality/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Network Latency Inside And Across Amazon EC2 Availability Zones</title>
		<link>http://orensol.com/2009/05/24/network-latency-inside-and-across-amazon-ec2-availability-zones/</link>
		<comments>http://orensol.com/2009/05/24/network-latency-inside-and-across-amazon-ec2-availability-zones/#comments</comments>
		<pubDate>Sun, 24 May 2009 12:40:55 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Scaling]]></category>
		<category><![CDATA[Availability Zones]]></category>
		<category><![CDATA[Clusters]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[latency]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[RTT]]></category>
		<category><![CDATA[throughput]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=226</guid>
		<description><![CDATA[<p>I couldn&#8217;t find any info out there comparing network latency across <a target="_blank" href="http://aws.amazon.com/ec2/">EC2 Availability Zones</a> and inside any single Availability Zone. So I took 6 instances (2 on each US zone), ran some test using a simple ping, and measured 10 Round Trip Times (<a target="_blank" href="http://en.wikipedia.org/wiki/Round-trip_delay_time">RTT</a>). Here are the results.</p>
Single Availablity Zone Latency



Availability [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t find any info out there comparing network latency across <a target="_blank" href="http://aws.amazon.com/ec2/">EC2 Availability Zones</a> and inside any single Availability Zone. So I took 6 instances (2 on each US zone), ran some test using a simple ping, and measured 10 Round Trip Times (<a target="_blank" href="http://en.wikipedia.org/wiki/Round-trip_delay_time">RTT</a>). Here are the results.</p>
<h3>Single Availablity Zone Latency</h3>
<table border="0">
<tbody>
<tr>
<th>Availability Zone</th>
<th>Minimum RTT</th>
<th>Maximum RTT</th>
<th>Average RTT</th>
</tr>
<tr>
<td>us-east-1a</td>
<td>0.215ms</td>
<td>0.348ms</td>
<td>0.263ms</td>
</tr>
<tr>
<td>us-east-1b</td>
<td>0.200ms</td>
<td>0.327ms</td>
<td>0.259ms</td>
</tr>
<tr>
<td>us-east-1c</td>
<td>0.342ms</td>
<td>0.556ms</td>
<td>0.410ms</td>
</tr>
</tbody>
</table>
<p>It seems that at the time of my testing, zone us-east-1c had the worst RTT between 2 instances in it, almost twice as slow as the other 2 zones.</p>
<h3>Cross Availablity Zone Latency</h3>
<table border="0">
<tbody>
<tr>
<th>Availability Zones</th>
<th>Minimum RTT</th>
<th>Maximum RTT</th>
<th>Average RTT</th>
</tr>
<tr>
<td>Between us-east-1a and us-east-1b</td>
<td>0.885ms</td>
<td>1.110ms</td>
<td>0.937ms</td>
</tr>
<tr>
<td>Between us-east-1a and us-east-1c</td>
<td>0.937ms</td>
<td>1.080ms</td>
<td>1.031ms</td>
</tr>
<tr>
<td>Between us-east-1b and us-east-1c</td>
<td>1.060ms</td>
<td>1.250ms</td>
<td>1.126ms</td>
</tr>
</tbody>
</table>
<p>It&#8217;s worth noting that in cross availability zones traffic, the first ping was usually off the chart, so I disregarded it. For example, it could be anywhere between 300ms to 400ms, and the the rest would fall down to ~0.300. Probably some lazy routing techniques by Amazon&#8217;s routers.</p>
<h3>Conclusions</h3>
<ol>
<li>Zones are created different! &#8212; At least at the time of the testing, if you have a cluster on us-east-1b it performs almost twice as fast with regards to RTT between machines than a cluster on us-east-1c.</li>
<li>Cross Availability Zones latency can be 6 times higher than inner zone latency. For a network intensive application, better keep your instances crowded in the same zone.</li>
</ol>
<p>I should probably also make a throughput comparison between and across Availability Zones. I promise to share if I get to test it.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/05/24/network-latency-inside-and-across-amazon-ec2-availability-zones/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to delete those old EC2 EBS snapshots</title>
		<link>http://orensol.com/2009/02/12/how-to-delete-those-old-ec2-ebs-snapshots/</link>
		<comments>http://orensol.com/2009/02/12/how-to-delete-those-old-ec2-ebs-snapshots/#comments</comments>
		<pubDate>Thu, 12 Feb 2009 17:57:44 +0000</pubDate>
		<dc:creator>Oren</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[EC2]]></category>
		<category><![CDATA[Scaling]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Bulk]]></category>
		<category><![CDATA[Delete]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[Multiple]]></category>
		<category><![CDATA[Old]]></category>
		<category><![CDATA[Snapshots]]></category>

		<guid isPermaLink="false">http://orensol.com/?p=104</guid>
		<description><![CDATA[<p><a href="http://aws.amazon.com/ebs/" target="_blank">EBS snapshots</a> are a very powerful feature of <a href="http://aws.amazon.com/ec2/" target="_blank">Amazon EC2</a>. An EBS volume is readily available, elastic block storage device that can be attached, detached and re-attached to any instance in its availability zone. There are <a href="http://blog.rightscale.com/2008/08/20/amazon-ebs-explained/" target="_blank">numerous advantages</a> to using EBS over the local block storage devices of an [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aws.amazon.com/ebs/" target="_blank">EBS snapshots</a> are a very powerful feature of <a href="http://aws.amazon.com/ec2/" target="_blank">Amazon EC2</a>. An EBS volume is readily available, elastic block storage device that can be attached, detached and re-attached to any instance in its availability zone. There are <a href="http://blog.rightscale.com/2008/08/20/amazon-ebs-explained/" target="_blank">numerous advantages</a> to using EBS over the local block storage devices of an instance, and one of the most important of them is the ability to take a snapshot of the data on the volume.</p>
<p>Since snapshots are incremental by nature, after an initial snapshot of a volume, the following snapshots are quick and easy. Moreover, snapshots are always processed by Amazon&#8217;s processing power and not by the cpu of your instance, and are stored redundantly on S3. This is why using these snapshots in your backup methodology is a great idea (provided that you freeze/unfreeze your filesystem during the snapshot call, using <a href="http://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)" target="_blank">LVM</a> or <a href="http://en.wikipedia.org/wiki/XFS" target="_blank">XFS</a> for example).</p>
<p>But, and this is a really annoying but &#8211; snapshots are &#8220;easy come hard to go&#8221;. They are so convenient to use and so reliable, that it&#8217;s natural to use a cronned script to make a daily, or hell &#8212; hourly! &#8212; backup of your volume. But then, those snapshots keep piling up, and the only way to delete a snapshot is to call a single API call for a specific snapshot.If you have 5 volumes you back up hourly, you reach the 500 snapshots limit withing 4.5 days. Not very reliable now, huh?</p>
<p>I have been searching for a while for an option to bulk delete snapshots. The EC2 API is missing this feature, and the excellent <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=609" target="_blank">ElasticFox</a> add-on is not compensating. You just can&#8217;t bulk delete snapshots.</p>
<p>That is, until now <img src='http://orensol.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . I <a href="http://developer.amazonwebservices.com/connect/thread.jspa?messageID=116355" target="_blank">asked</a> in the AWS Forum if there is anything that can be done about this problem. They replied it&#8217;s a good idea, but if I really wanted it to be implemented quickly, I should build my own solution using the API. So I took the offer, and came up with a PHP command line tool that tries to emulate a &#8220;ec2-delete-old-snapshots&#8221; command, until one is added to the API.</p>
<p>The tool is <a href="http://code.google.com/p/ec2-delete-old-snapshots/" target="_blank">available on Google Code for checkout</a>. It uses the <a href="http://developer.amazonwebservices.com/connect/entry.jspa?externalID=1669" target="_blank">PHP EC2 library </a>which I bundled in (hope I didn&#8217;t break any licensing issue, please alert me if I did).</p>
<p>Usage is easy:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">php ec2-delete-old-snapshots.php <span style="color: #660033;">-v</span> vol-id <span style="color: #7a0874; font-weight: bold;">&#91;</span>-v vol-id ...<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">-o</span> days</pre></div></div>

<p>If you wanted to delete ec2 snapshots older than 7 days for 2 volumes you have, you would use:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">php ec2-delete-old-snapshots.php <span style="color: #660033;">-v</span> vol-aabbccdd <span style="color: #660033;">-v</span> vol-bbccddee <span style="color: #660033;">-o</span> <span style="color: #000000;">7</span></pre></div></div>

<p>Hope this helps all you people out there who need such a thing. I will be happy to receive <a href="http://twitter.com/orensol" target="_blank">feedback</a> (and bug fixes) if you start using this.</p>
]]></content:encoded>
			<wfw:commentRss>http://orensol.com/2009/02/12/how-to-delete-those-old-ec2-ebs-snapshots/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->