<?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>Azavea Labs &#187; Jeremy Heffner</title>
	<atom:link href="http://www.azavea.com/blogs/labs/author/jheffner/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.azavea.com/blogs/labs</link>
	<description>Insight on what our engineers are doing</description>
	<lastBuildDate>Thu, 26 Jan 2012 16:14:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Bring on the data focused basemaps, Esri</title>
		<link>http://www.azavea.com/blogs/labs/2011/08/bring-on-the-data-focused-basemaps-esri/</link>
		<comments>http://www.azavea.com/blogs/labs/2011/08/bring-on-the-data-focused-basemaps-esri/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 18:33:16 +0000</pubDate>
		<dc:creator>Jeremy Heffner</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[ArcGIS.com]]></category>
		<category><![CDATA[Basemap]]></category>
		<category><![CDATA[ESRI]]></category>

		<guid isPermaLink="false">http://www.azavea.com/blogs/labs/?p=1660</guid>
		<description><![CDATA[It&#8217;s great to read that Esri is working on features and basemaps to include within ArcGIS.com to support data visualization.     Sometimes the map isn&#8217;t the focus; sometimes the data is the focus.  A few weeks ago, Bern Szukalski wrote an article for the Esri Insider blog that spoke about Esri&#8217;s efforts to create [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s great to read that <a href="http://www.esri.com">Esri</a> is working on features and basemaps to include within <a href="http://www.arcgis.com">ArcGIS.com</a> to support data visualization.     Sometimes the map isn&#8217;t the focus; sometimes the data is the focus.  A few weeks ago, Bern Szukalski wrote an article for the Esri Insider blog <a href="http://blogs.esri.com/Info/blogs/esri-insider/archive/2011/07/25/inside-new-basemaps.aspx">that spoke about Esri&#8217;s efforts to create new basemaps including basemaps for data visualization purposes</a>.   I think this is a great move for Esri.   Last fall, <a href="http://ideas.arcgis.com/ideaView?id=087300000008FU7AAM">I suggested such a muted basemap</a> via the <a href="http://ideas.arcgis.com">ideas.arcgis.com</a> portal, so I was quite excited to hear it is in the works.</p>
<p>A post today, also by Bern, explained a new feature within <a href="http://blogs.esri.com/Support/blogs/arcgisonline/archive/2011/08/11/using-basemap-transparency.aspx">ArcGIS.com to allow the user to mute the basemap by adjusting it&#8217;s display transparency</a>.    The <a href="http://www.azavea.com/products/hunchlab/">HunchLab</a> team stumbled upon this idea a few months back and it&#8217;s been a great way to use the existing topographic basemap.    In our demo instance of HunchLab, we are using the ArcGIS.com Topographic tiles set to a transparency of 60%.   You can see what it looks like below.</p>
<p>Kudos to Esri &#8212; keep the basemap options coming!</p>
<p><img class="aligncenter size-full wp-image-1665" title="2011-08-11_1834--basemaptransparency" src="http://www.azavea.com/blogs/labs/wp-content/uploads/2011/08/2011-08-11_1834-basemaptransparency.png" alt="" width="450" height="331" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.azavea.com/blogs/labs/2011/08/bring-on-the-data-focused-basemaps-esri/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Wants To Be Square</title>
		<link>http://www.azavea.com/blogs/labs/2010/09/html-wants-to-be-square/</link>
		<comments>http://www.azavea.com/blogs/labs/2010/09/html-wants-to-be-square/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 02:14:27 +0000</pubDate>
		<dc:creator>Jeremy Heffner</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Optimization]]></category>

		<guid isPermaLink="false">http://www.azavea.com/blogs/labs/?p=842</guid>
		<description><![CDATA[I just stumbled upon this great video from 2009 of Marissa Mayer from Google talking about how web application speed impacts user engagement.   It is definitely worth watching.]]></description>
			<content:encoded><![CDATA[<p>I just stumbled upon this great video from 2009 of <a href="http://blip.tv/file/2290442?utm_source=player_embedded">Marissa Mayer from Google talking about how web application speed impacts user engagement</a>.   It is definitely worth watching.</p>
<p><embed src="http://blip.tv/play/AYGM2w4C" type="application/x-shockwave-flash" width="480" height="300" allowscriptaccess="always" allowfullscreen="true"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://www.azavea.com/blogs/labs/2010/09/html-wants-to-be-square/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How We Launched a New CMS (301 redirects and counting)</title>
		<link>http://www.azavea.com/blogs/labs/2010/08/how-we-launched-a-new-cms-301-redirects-and-counting/</link>
		<comments>http://www.azavea.com/blogs/labs/2010/08/how-we-launched-a-new-cms-301-redirects-and-counting/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 20:15:10 +0000</pubDate>
		<dc:creator>Jeremy Heffner</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Varnish]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.azavea.com/blogs/labs/?p=820</guid>
		<description><![CDATA[When we decided to give our website a brand new look, we also evaluated whether to change Content Management Systems and decided to migrate our content management system to Concrete 5 from DotNetNuke.  DotNetNuke had served us well, but we wanted to move to a more modern and lightweight framework with a better administrative interface. [...]]]></description>
			<content:encoded><![CDATA[<p>When we decided to give our website <a href="http://www.azavea.com/blogs/atlas/2010/08/a-brand-new-look/">a brand new look</a>, we also evaluated whether to change Content Management Systems and decided to migrate our content management system to <a href="http://www.concrete5.org/">Concrete 5</a> from <a href="http://www.dotnetnuke.com/">DotNetNuke</a>.  DotNetNuke had served us well, but we wanted to move to a more modern and lightweight framework with a better administrative interface.   This migration presented us with a few challenges to overcome.</p>
<p>While we redesigned our company website, we didn&#8217;t want to wait to launch it until we had migrated all of our product websites to Concrete 5.   To combine the two systems under one domain name, we leveraged <a href="http://varnish-cache.org/">Varnish</a> as a proxy to split requests between our LAMP stack hosting Concrete 5 and our Windows server hosting DotNetNuke.    We&#8217;ve found Varnish to be a robust and yet lightweight tool for proxying, caching, and load balancing.  You can read more about how we used <a href="http://www.azavea.com/blogs/labs/2009/12/scaling-walkshed-org-with-varnish-and-amazon-web-services/">Varnish to host Walkshed on Amazon Web Services in this related blog post</a>.</p>
<p>Another concern when migrating CMS&#8217;s is making sure that the old URLs continue to function and issue the right redirects to users and search engines.   <a href="http://www.azavea.com/about-us/staff-profiles/andrew-jennings/">Andrew Jennings</a> took this project on and whipped up a URL redirection system for us using Apache&#8217;s <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">mod_rewrite</a> module.</p>
<ul>
<li>As requests come into Varnish, we first test to see if Concrete5 can respond to the URL.</li>
<li>If Concrete5 isn&#8217;t managing the content for the URL, the request bounces into our redirection system that maps old URLs to new URLs using a <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritemap">binary hashtable</a> and issues <a href="http://en.wikipedia.org/wiki/URL_redirection#HTTP_status_codes_3xx">301 permanent redirects</a> to the client.   We found that this approach is faster than simply relying on <a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html">Apache .htaccess</a> files since we have several thousand legacy URLs to support.</li>
<li>If the URL request is not in the mapping file, we simply forward the request to the Windows server to be served by DotNetNuke.</li>
<li>If DotNetNuke returns a 404 error, we redirect the request back to Concrete 5 to respond with a 404 error so that our redirection is invisible to the user.</li>
</ul>
<p>A final goal of the CMS migration was to improve page load times for our visitors.   Having pages that load quickly not only <a href="http://www.hitwise.com/news/au201001.html#body_third">improves the experience for our web visitors</a>, but also has an <a href="http://searchengineland.com/google-now-counts-site-speed-as-ranking-factor-39708">impact on search engine rankings</a>.    Concrete5 suggested we setup <a href="http://pecl.php.net/package/APC">Alternative PHP Cache (APC)</a> to speed up the pages it is serving, which has definitely improved performance on our new pages.</p>
<p>We found a great WordPress plugin (which runs our blogs) that can also leverage APC called <a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a>.   It provides a host of other functionality that we&#8217;re exploring including HTML, JS, and CSS minification as well as pushing design assets to Amazon&#8217;s CDN.</p>
<p>I always find it amusing how something as straight forward as a new website launch has so much happening behind the scenes.   To find out more <a href="http://www.azavea.com/blogs/atlas/2010/09/whats-in-a-new-website-beyond-a-new-look-content-that-defines-a-whole-brand/">about the content that went into the new Azavea website read Rachel&#8217;s related blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.azavea.com/blogs/labs/2010/08/how-we-launched-a-new-cms-301-redirects-and-counting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Scaling Walkshed.org with Varnish and Amazon Web Services</title>
		<link>http://www.azavea.com/blogs/labs/2009/12/scaling-walkshed-org-with-varnish-and-amazon-web-services/</link>
		<comments>http://www.azavea.com/blogs/labs/2009/12/scaling-walkshed-org-with-varnish-and-amazon-web-services/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 22:33:59 +0000</pubDate>
		<dc:creator>Jeremy Heffner</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Amazon Web Services]]></category>

		<guid isPermaLink="false">http://www.azavea.com/blogs/labs/?p=398</guid>
		<description><![CDATA[We&#8217;re excited for voting to open today for our entry into the NYC Big Apps Contest &#8212; Walkshed NYC. Walkshed is very CPU intensive since we generate heatmaps for users&#8217; custom walkability factors on the fly.  Building on the work we did with using Amazon&#8217;s content delivery network for RedistrictingTheNation.com, we decided to expand our [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re excited for voting to open today for <a href="http://www.nycbigapps.com/application-gallery/walkshed-nyc">our entry into the NYC Big Apps Contest</a> &#8212; <a href="http://walkshed.org/nyc">Walkshed NYC</a>.</p>
<p>Walkshed is very CPU intensive since we generate heatmaps for users&#8217; custom walkability factors on the fly.  <a href="http://www.azavea.com/blogs/labs/2009/10/bracing-for-potential-catastrophic-success-amazons-cloudfront-cdn/">Building on the work we did with using Amazon&#8217;s content delivery network</a> for <a href="http://www.redistrictingthenation.com/">RedistrictingTheNation.com</a>, we decided to expand our use of Amazon Web Services (AWS) for Walkshed as well as incorporate technology from the open source <a href="http://varnish.projects.linpro.no/">Varnish </a>project.</p>
<h1>Varnish for hardening (and an easier life)</h1>
<p>Varnish is a HTTP accelerator that runs on Linux (and other Unix style OSes).  We experimented with Varnish to solve a few goals:</p>
<ul>
<li>Caching frequently requested files and heatmaps tiles (i.e. the default walkability heatmap tiles)</li>
<li>Scaling by letting Varnish load balance between multiple servers</li>
<li>Improving reliability by allowing Varnish to resubmit failed requests and monitor server health</li>
</ul>
<p>By pointing <a href="http://walkshed.org">Walkshed.org</a> directly to Varnish, we are able to adjust server configurations on the fly without bringing down our application.   Currently, Varnish provides load balancing between 4 server instances which generate tiles  using Walkshed&#8217;s <a href="http://www.azavea.com/products/decisiontree/home.aspx">DecisionTree engine</a>.  About 50% of the HTTP requests running through Varnish are cache hits, which helps eliminate unnecessary traffic clogging up our application servers.</p>
<p>One instance is hosted on our private server and is often able to meet demand, but adding 3 <a href="http://aws.amazon.com/ec2/#instance">High-CPU Extra Large Instances</a> from Amazon lets us improve fault tolerance and handle larger bursts in traffic.  Varnish also monitors the health of our servers and removes them from the cluster if they become unresponsive.</p>
<h1>Amazon EC2 Instances (bigger is better)</h1>
<p>Our Amazon instances are using the new EBS-based images to improve boot speed.   We&#8217;ve found that it takes about 7 minutes from when we launch an instance until it is successfully added to our Varnish pool, which certainly isn&#8217;t bad.   By combining Varnish with Amazon&#8217;s on-demand resources, we should theoretically be able to scale as much as necessary.  For this demo application, scaling is a manual process, but we are looking toward a future where the cluster would scale automatically based on demand.</p>
<p>We also experimented with a few EC2 instance sizes.   Since our application is CPU intensive we really found we had to go with the High-CPU Extra Large Instance to get decent performance.   The instances still don&#8217;t meet the performance we get on our private VMware-based server, but our hunch is that this is due to layers of virtualization causing memory allocation to be slow.</p>
<h1>Technologies Used:</h1>
<ul>
<li><a href="http://aws.amazon.com/ec2/">Amazon EC2</a> <a href="http://aws.amazon.com/ec2/#instance">High-CPU Extra Large</a> <a href="http://aws.amazon.com/about-aws/whats-new/2009/12/03/amazon-ec2-instances-now-can-boot-from-amazon-ebs/">EBS-based</a> Instances virtualizing .NET application servers</li>
<li><a href="http://www.vmware.com/products/esxi/">VMware ESXi</a> virtualizing .NET application server</li>
<li>VMware ESXi virtualizing <a href="http://www.ubuntu.com/">Ubuntu</a> based  <a href="http://varnish.projects.linpro.no/">Varnish</a> server</li>
<li><a href="http://aws.amazon.com/cloudfront/">Amazon Cloudfront CDN</a> for static assets</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.azavea.com/blogs/labs/2009/12/scaling-walkshed-org-with-varnish-and-amazon-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bracing for (Potential) Catastrophic Success &#8212; Amazon&#8217;s Cloudfront CDN</title>
		<link>http://www.azavea.com/blogs/labs/2009/10/bracing-for-potential-catastrophic-success-amazons-cloudfront-cdn/</link>
		<comments>http://www.azavea.com/blogs/labs/2009/10/bracing-for-potential-catastrophic-success-amazons-cloudfront-cdn/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:13:23 +0000</pubDate>
		<dc:creator>Jeremy Heffner</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.azavea.com/blogs/labs/?p=304</guid>
		<description><![CDATA[Most of the web applications we build are either used internally by our clients or have a steady stream of public user activity.   With our recent Redistricting the Nation launch we wanted to experiment with some optimizations to make our site more resilient to traffic spikes as well as to improve the user experience. [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the web applications we build are either used internally by our clients or have a steady stream of public user activity.   With our recent <a href="http://www.redistrictingthenation.com">Redistricting the Nation</a> launch we wanted to experiment with some optimizations to make our site more resilient to traffic spikes as well as to improve the user experience.</p>
<p>Our strategy is broken down into a few components:</p>
<ul>
<li>Improving download speed using <a href="http://aws.amazon.com/cloudfront/">Amazon&#8217;s Content Delivery Network, Cloudfront</a></li>
<li>Reducing the size of the page components to improve loads times</li>
<li>Measuring results with Yahoo&#8217;s <a href="http://developer.yahoo.com/yslow/">YSlow</a> toolkit</li>
</ul>
<p>This post covers the Cloudfront CDN.</p>
<p>Previously, we had experimented with Amazon&#8217;s Web Services stack to host applications, but we hadn&#8217;t experimented with their <a href="http://aws.amazon.com/cloudfront/">Cloudfront CDN</a> product.   Pricing for the CDN is quite similar to <a href="http://aws.amazon.com/s3/">Amazon S3</a> and allows organizations to build scalable applications without the upfront cost of most CDNs.  We decided to use the CDN to host some large Javascript assets as well as our image components.</p>
<p>Cloudfront is quite easy to setup.   We simply created an Amazon S3 bucket called<em><strong> s3.azavea.com</strong></em> and pointed a CNAME record for <strong><em>s3.azavea.com</em></strong> to the full bucket domain &#8212; <strong><em>s3.azavea.com.s3.amazonaws.com.    <span style="font-weight: normal;"><span style="font-style: normal;">Then, we enabled a Cloudfront distribution for the</span><strong> s3.azavea.com</strong><span style="font-style: normal;"> bucket using the free tool <a href="http://cloudberrylab.com/">Cloudberry</a>.   Finally, we setup a CNAME record for <strong><em>cdn.azavea.com</em></strong> to the Cloudfront distribution domain </span><strong>d17ib0dlm1q8qa.cloudfront.net</strong><span style="font-style: normal;"> and we were rolling.</span></span></em></strong></p>
<p><strong><em><span style="font-style: normal; font-weight: normal;">Since the CDN is heavily cached, it was easiest to use </span>s3.azavea.com<span style="font-style: normal; font-weight: normal;"> links during development to reduce the amount of file versioning that was necessary.   Once we were settled on our assets, we switched to </span>cdn.azavea.com<span style="font-style: normal; font-weight: normal;"> links and started using the CDN. </span></em></strong></p>
<p><strong><em><span style="font-style: normal; font-weight: normal;">The speed of the CDN is quite astounding.  Splitting assets across another domain name also improves the browser&#8217;s ability to request more files at once improving the user experience.  We were quite pleased with how easily we could offload assets to Cloudfront and realize gains with limited time investment.</span></em></strong></p>
<p><strong><em><span style="font-style: normal; font-weight: normal;">A few notes to keep in mind when you are working with a CDN for the first time:</span></em></strong></p>
<ul>
<li>Since there is no way to flush assets out of Cloudfront&#8217;s edge nodes, be sure to use file name versioning.   This was a bit alien to us, but is easy to incorporate once you think it through.   For instance, we decided not to set a far-future expiration header on our PDF assets as they are often directly linked to and we wanted to be able to update them regularly.</li>
<li>Speaking of PDFs, it seems that while Cloudfront supports byte-range requests for assets, it doesn&#8217;t assert the &#8220;Accept-Ranges: bytes&#8221; HTTP header. This makes our large PDFs fully download before Adobe displays them within the browser.  Unfortunately there is no way to add this header at the moment.</li>
<li><a href="http://cloudberrylab.com/">Cloudberry</a> is great to add HTTP headers to S3 assets.   We decided that most of our assets would have a six month cache lifespan by asserting the &#8220;Cache-Control: max-age=15552000&#8243; header.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.azavea.com/blogs/labs/2009/10/bracing-for-potential-catastrophic-success-amazons-cloudfront-cdn/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

