<?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#"
	>

<channel>
	<title>amazon prime video &#8211; Gareth Klose</title>
	<atom:link href="https://garethklose.com/tag/amazon-prime-video/feed" rel="self" type="application/rss+xml" />
	<link>https://garethklose.com</link>
	<description>writes about technology, television and travelling</description>
	<lastBuildDate>Sun, 07 May 2023 11:33:52 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
<site xmlns="com-wordpress:feed-additions:1">27787817</site>	<item>
		<title>About &#8220;That&#8221; Prime Engineering article</title>
		<link>https://garethklose.com/2023/05/about-that-prime-engineering-article</link>
		
		<dc:creator><![CDATA[gareth]]></dc:creator>
		<pubDate>Sun, 07 May 2023 09:50:34 +0000</pubDate>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[amazon prime video]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[microservices]]></category>
		<category><![CDATA[monolith]]></category>
		<category><![CDATA[pricing]]></category>
		<guid isPermaLink="false">https://garethklose.com/?p=13941</guid>

					<description><![CDATA[Everyone who has worked with managed cloud services has experienced the moment when it made sense to move away from managed services.

Turns out, so does Prime Video.]]></description>
										<content:encoded><![CDATA[
<p>Amazon Prime Video recently wrote about how <a href="https://www.primevideotech.com/video-streaming/scaling-up-the-prime-video-audio-video-monitoring-service-and-reducing-costs-by-90">changing away from managed services and writing a more integrated application</a> saved them money. Despite being a few months old, this appeared to blow-up this week, and predictably has caused some cries of &#8220;SEE, SEE YOU SHOULD JUST RUN EVERYTHING YOURSELF&#8221;.</p>



<p>But to those of use who have been building on AWS (and other providers) for many years, it&#8217;s not a surprise, and we all have stories where we&#8217;ve done similar.</p>



<p>I say this as someone who is an <a data-type="post" data-id="2170" href="https://garethklose.com/2019/05/my-workload-is-too-special-for-serverless">annoying cheerleader for serverless compute</a> and managed services, but despite that, I have home-rolled things, when it made sense.</p>



<h2 class="wp-block-heading">How do you solve a problem</h2>



<p>When you&#8217;re solving a problem, you look at what the managed services that you have available, considering factors like:</p>



<ul class="wp-block-list">
<li>Your teams experience with the service</li>



<li>Limitations on the service, and what it was intended for, against what you&#8217;re doing</li>



<li>What quotas may apply that you hit</li>



<li>How the pricing model works</li>
</ul>



<p>While pricing for managed-services is generally based on usage, sometimes specific costs will apply more to your workload, e.g. if you&#8217;re serving small images, you&#8217;ll be more impacted by the per-request cost than the bandwidth charges.</p>



<p>I would be surprised if an experienced architect hasn&#8217;t faced a situation where &#8220;Service X would be perfect for this, if only it didn&#8217;t have this restriction Y, or wasn&#8217;t priced for Z&#8221;.</p>



<h2 class="wp-block-heading">My example</h2>



<p>We&#8217;d built out a system that was performing 3 distinct processing steps on large files.</p>



<p>The system had built out incrementally, and we had the 3 steps on three different auto-scale groups, fed by queues.</p>



<p>While some of the requests could be processed from S3 as a stream, one task required downloading the file to a filesystem, and that download took time.</p>



<p>The users wanted to reduce the end-to-end processing time. Some of the tasks were predicated on passing prior steps, and so we didn&#8217;t want to make the steps parallel.</p>



<h2 class="wp-block-heading">Attempt 1: &#8220;EFS looks good&#8221;</h2>



<p>We used the &#8216;relatively&#8217; new Elastic File System service from AWS&#8230; The first component downloaded the file, subsequent operations used this download.</p>



<p>This also had the advantage that the since the &#8216;smallest&#8217; service was first, you paid for that download on the cheapest instance, and the more expensive instances didn&#8217;t have to download it.</p>



<p>We developed, deployed, and for the first morning it was really quick&#8230; until we discovered that we were using burst quota, and spent the afternoon rolling back.</p>



<p>Filesystem throughput was allocated based on the amount stored on the filesystem, but as this was a transient process, we didn&#8217;t replenish it quickly enough, and didn&#8217;t like the idea of just making large random files to earn it.</p>



<p>Now you can just pay for provisioned throughput, perhaps in a small part because of a conversation we had with the account managers.</p>



<h2 class="wp-block-heading">Attempt 2: &#8220;Sod it, just combine them&#8221;</h2>



<p>The processes varied in complexity, there was effectively a trivial, a medium, and a high complexity task&#8230; So the second solution we approached was combining all the tasks onto a single service&#8230; the computing power for the highest task would zoom through the other two tasks, and so we combined them into what I jokingly called &#8220;the microlith&#8221;.</p>



<p>We didn&#8217;t touch the other parts of the pipeline, or the database, they remained in other services, but combining the 3 steps worked.</p>



<h2 class="wp-block-heading">What did we gain</h2>



<p>The system was faster, and even more usefully to operators, more predictable.</p>



<p>Once processing had started you could tell, based on the file size, when the items would be ready&#8230;</p>



<p>Much like &#8220;lower p90 but higher maximum&#8221; feels better for user experience, this consistency was great.</p>



<h2 class="wp-block-heading">What did we lose</h2>



<p>Two of the three components had external dependancies, and this did mean this component was one of the less &#8216;safe&#8217; to deploy, and while tests built up to defend against that&#8230; the impact of failed deploy was larger than you&#8217;d want.</p>



<h2 class="wp-block-heading">In Conclusion</h2>



<p>There are always times when breaking your patterns makes sense, the key is knowing what you&#8217;re both gaining and losing, and taking decisions for the right reasons at the right times.</p>



<p>Prime video refining an architecture to better meet scaling and cost models, making it less &#8220;Pure&#8221;, isn&#8217;t the gotcha against these services that some people would have you believe.</p>



<p>&#8220;Pure&#8221; design doesn&#8217;t win prizes.</p>



<p>Suitable design does.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">13941</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 0/116 objects using APC
Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: cdn.garethklose.com
Minified using Disk
Database Caching using APC (Request-wide modification query)

Served from: garethklose.com @ 2026-06-10 20:21:22 by W3 Total Cache
-->