<?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>Inkzee &#187; backend</title>
	<atom:link href="http://blog.inkzee.com/index.php/tag/backend/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.inkzee.com</link>
	<description>How to read more in less time</description>
	<lastBuildDate>Wed, 12 May 2010 13:23:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Efficent comunication protocols are critical</title>
		<link>http://blog.inkzee.com/index.php/2009/12/26/efficent-comunication-protocols-are-critical/</link>
		<comments>http://blog.inkzee.com/index.php/2009/12/26/efficent-comunication-protocols-are-critical/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 14:30:55 +0000</pubDate>
		<dc:creator>abarrera</dc:creator>
				<category><![CDATA[inkzee]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[communication protocol]]></category>
		<category><![CDATA[cpickle]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.inkzee.com/?p=78</guid>
		<description><![CDATA[As we said before, one on the problems we had when migrating to AWS was that the backend system was putting a lot of stress on the server. After a week of benchmarking we realized that the protocol we where using to communicate between the different subsystems we have was the main responsible for the [...]]]></description>
			<content:encoded><![CDATA[<p>As we <a href="http://blog.inkzee.com/index.php/2009/12/24/christmas-updates/">said before</a>, one on the problems we had when migrating to AWS was that the backend system was putting a lot of stress on the server. After a week of benchmarking we realized that the <strong>protocol</strong> we where using to <strong>communicate</strong> between the different subsystems we have was the <strong>main responsible for the load increment</strong>.</p>
<p>From day one we didn&#8217;t want to use complex and cryptic protocols so we chose <strong>xmlrpc</strong> for our communication channel. It was easy to implement, had wide support in php and python and was very easy to debug. We knew that at some point <strong>we would need to switch</strong> to a more efficient protocol, but we didn&#8217;t know it was going to be so soon.</p>
<p>After doing some <strong>extensive benchmarking</strong> we realize that the <strong>through output of the protocol was very low</strong>, not only that, if too many xmlrpc connections were spawned it would eventually consume all resources of the process (file descriptors, sockets and memory). This was a painful lesson to learn, but we did. So we <strong>switched</strong> to the most efficient protocol we could found, that is <strong>binary</strong>. To be more precise we employ <strong>python&#8217;s cPickle binary protocol</strong>. Saying that the use of this is orders of magnitude more efficient is not even close <img src='http://blog.inkzee.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>So after switching each subsystem to the new protocol we saw the load of the machines going down. As with all big changes in the backend of any system, it took a while to stabilize it. To avoid any havoc we actually put it into production subsystem by subsystem so <strong>during some time we had both protocols running at the same time</strong>.</p>
<p>And so, always remember that the choices you make will come to hunt you if not done correctly <img src='http://blog.inkzee.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inkzee.com/index.php/2009/12/26/efficent-comunication-protocols-are-critical/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>God bless the private invites</title>
		<link>http://blog.inkzee.com/index.php/2009/01/14/god-bless-the-private-invites/</link>
		<comments>http://blog.inkzee.com/index.php/2009/01/14/god-bless-the-private-invites/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 13:55:27 +0000</pubDate>
		<dc:creator>abarrera</dc:creator>
				<category><![CDATA[inkzee]]></category>
		<category><![CDATA[backend]]></category>
		<category><![CDATA[invites]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://blog.inkzee.com/?p=30</guid>
		<description><![CDATA[Hi all, After some finally tweaks, we managed to push another release today and finished migrating all users from the old alpha architecture. We were so excited, we decided it was time to send some more invites to some more users that have been waiting for it for ages! (We really regret that, sorry guys!). [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>After some finally tweaks, we managed to <strong>push another release today</strong> and<strong> finished migrating all users from the old alpha architecture</strong>. We were so excited, we decided it was time to send some more invites to some more users that have been waiting for it for ages! (We really regret that, sorry guys!).</p>
<p>Suddenly what we can only define as a <strong>shit storm</strong> came our way. Servers were on fire, even though we didn&#8217;t send too many invites. Problem is that our system scales with the number of feeds each users has. Some of our new alpha users are really <strong>feed junkies</strong> (you know who you are! <img src='http://blog.inkzee.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ) and really pushed the total number of feeds the system manages really fast. We are throwing some stats so you get some idea:</p>
<p><a href="http://blog.inkzee.com/wp-content/uploads/stats.png"><img class="aligncenter size-full wp-image-31" title="stats" src="http://blog.inkzee.com/wp-content/uploads/stats.png" alt="" width="416" height="299" /></a></p>
<p><a href="http://blog.inkzee.com/wp-content/uploads/stats1.png"><img class="aligncenter size-full wp-image-32" title="stats1" src="http://blog.inkzee.com/wp-content/uploads/stats1.png" alt="" width="406" height="288" /></a></p>
<p>As you can see, the number of feeds being tracked by Inkzee internally <strong>nearly triplicated in a 20 minute span</strong>. We are storing, displaying and sorting 32,859 posts right now and growing fast.</p>
<p>In the process of managing such a large amount of new feeds<strong> some parts of the backend went belly up</strong>. We are investigating it now and we hope we can fix them soon. Even though some things broke, they weren&#8217;t critical parts so the system recovered from the failures pretty fast which is good news.</p>
<p>The moment we stabilize the system again we&#8217;ll continue sending new invites. Right now we are also focusing in <strong>adding new features</strong>. The next one in our roadmap will be the ability of creating custom filters and keyword alerts. We hope to release that some time next week.</p>
<p>As usual, <strong>thanks a lot for your patient </strong>and keep coming, but gently <img src='http://blog.inkzee.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>The Inkzee Team</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.inkzee.com/index.php/2009/01/14/god-bless-the-private-invites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

