<?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>iiilx&#039;s blog</title>
	<atom:link href="http://blog.iiilx.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.iiilx.com</link>
	<description>do something</description>
	<lastBuildDate>Sat, 26 Jan 2013 23:56:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>A little burned out at work</title>
		<link>http://blog.iiilx.com/programming/a-little-burned-out-at-work/</link>
		<comments>http://blog.iiilx.com/programming/a-little-burned-out-at-work/#comments</comments>
		<pubDate>Sat, 26 Jan 2013 23:56:36 +0000</pubDate>
		<dc:creator>iiilx</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.iiilx.com/?p=766</guid>
		<description><![CDATA[I&#8217;ve been at my startup for a year and a half or so, and things are looking up, but I&#8217;m pretty tired and need some time to decompress. I&#8217;m currently writing a lot of code that had to get rewritten &#8230; <a href="http://blog.iiilx.com/programming/a-little-burned-out-at-work/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been at my startup for a year and a half or so, and things are looking up, but I&#8217;m pretty tired and need some time to decompress. I&#8217;m currently writing a lot of code that had to get rewritten for multiple reasons. It&#8217;s not that fun, although I am doing some more interesting stuff with Mongodb, and implementing ways to make writes to the db atomic and only occur once even if the write is made by multiple threads (i.e. race conditions, out of band processes, etc).</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iiilx.com/programming/a-little-burned-out-at-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>use nginx caching if you&#8217;re already using nginx and are serving data that doesn&#8217;t change frequently</title>
		<link>http://blog.iiilx.com/programming/use-nginx-caching-if-youre-already-using-nginx-and-are-serving-data-that-doesnt-change-frequently/</link>
		<comments>http://blog.iiilx.com/programming/use-nginx-caching-if-youre-already-using-nginx-and-are-serving-data-that-doesnt-change-frequently/#comments</comments>
		<pubDate>Tue, 02 Oct 2012 07:13:44 +0000</pubDate>
		<dc:creator>iiilx</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.iiilx.com/?p=764</guid>
		<description><![CDATA[we have a lot of slow APIs at work that are just returning the same information the majority of the time. one API in particular takes 3-6 seconds to return because of all the data it&#8217;s fetching from the db &#8230; <a href="http://blog.iiilx.com/programming/use-nginx-caching-if-youre-already-using-nginx-and-are-serving-data-that-doesnt-change-frequently/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>we have a lot of slow APIs at work that are just returning the same information the majority of the time. one API in particular takes 3-6 seconds to return because of all the data it&#8217;s fetching from the db (i.e. client configuration data). This is a disaster and will easily bring your app down to a halt with enough concurrent requests. memcache is definitely helpful as well, but that could be another layer behind nginx caching which will give you the best performance imo. just know how/when to invalidate the nginx cache (i.e. you can send a request with a certain cookie key to get nginx). Or you could make a cookie&#8217;s value part of the cache key. Cached responses served by nginx after that change show a duration of 0 seconds (I&#8217;m not sure why it records as 0.000 but hey, I&#8217;ll take it). The results are far better than 3-6 seconds!. To prevent stampede scenarios, you could also warm nginx&#8217;s cache before serving live traffic (i.e. some time during deployment).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iiilx.com/programming/use-nginx-caching-if-youre-already-using-nginx-and-are-serving-data-that-doesnt-change-frequently/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postgres tuning</title>
		<link>http://blog.iiilx.com/programming/postgres-tuning/</link>
		<comments>http://blog.iiilx.com/programming/postgres-tuning/#comments</comments>
		<pubDate>Wed, 05 Sep 2012 06:59:59 +0000</pubDate>
		<dc:creator>iiilx</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.iiilx.com/?p=757</guid>
		<description><![CDATA[i was raising the max connections to postgres to 1000 and: * The PostgreSQL server failed to start. Please check the log output:2012-09-04 23:51:06 PDT FATAL:  could not create shared memory segment: Invalid argument2012-09-04 23:51:06 PDT DETAIL:  Failed system call &#8230; <a href="http://blog.iiilx.com/programming/postgres-tuning/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>i was raising the max connections to postgres to 1000 and:</p>
<p>* The PostgreSQL server failed to start. Please check the log output:2012-09-04 23:51:06 PDT FATAL:  could not create shared memory segment: Invalid argument2012-09-04 23:51:06 PDT DETAIL:  Failed system call was shmget(key=5432001, size=53542912, 03600).2012-09-04 23:51:06 PDT HINT:  This error usually means that PostgreSQL&#8217;s request for a shared memory segment exceeded your kernel&#8217;s SHMMAX parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMMAX.  To reduce the request size (currently 53542912 bytes), reduce PostgreSQL&#8217;s shared_buffers parameter (currently 3200) and/or its max_connections parameter (currently 1004).	If the request size is already small, it&#8217;s possible that it is less than your kernel&#8217;s SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.	The PostgreSQL documentation contains more information about shared memory configuration.</p>
<p>solution was to raise the max:</p>
<p>sudo sysctl -w kernel.shmmax=60000000</p>
<p>more info here: <a href="http://michael.otacoo.com/postgresql-2/take-care-of-kernel-memory-limitation-for-postgresql-shared-buffers/">http://michael.otacoo.com/postgresql-2/take-care-of-kernel-memory-limitation-for-postgresql-shared-buffers/</a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iiilx.com/programming/postgres-tuning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proxiesforrent scam</title>
		<link>http://blog.iiilx.com/programming/proxiesforrent-scam/</link>
		<comments>http://blog.iiilx.com/programming/proxiesforrent-scam/#comments</comments>
		<pubDate>Fri, 27 Jul 2012 06:33:41 +0000</pubDate>
		<dc:creator>iiilx</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.iiilx.com/?p=755</guid>
		<description><![CDATA[I&#8217;ve been emailing proxiesforrent for almost a year now&#8230; Here&#8217;s my last email subject: PLEASE cancel my account, it&#8217;s been almost a year since I&#8217;ve tried to cancel&#8230; body: Hi, I&#8217;ve been trying to cancel for almost a YEAR NOW&#8230;.This &#8230; <a href="http://blog.iiilx.com/programming/proxiesforrent-scam/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been emailing proxiesforrent for almost a year now&#8230;</p>
<p>Here&#8217;s my last email</p>
<p>subject:</p>
<blockquote><p>PLEASE cancel my account, it&#8217;s been almost a year since I&#8217;ve tried to cancel&#8230;</p></blockquote>
<p>body:</p>
<blockquote><p>Hi, I&#8217;ve been trying to cancel for almost a YEAR NOW&#8230;.This has to be ILLEGAL. PLEASE PLEASE cancel my account. I can&#8217;t even login to your website and you dont have my email address when I try to retrieve my password.</p>
<p>My email address for this account is ben86lee@gmail.com</p>
<p>Thank you.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.iiilx.com/programming/proxiesforrent-scam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Parallel deployment to ec2 instances in python</title>
		<link>http://blog.iiilx.com/programming/parallel-deployment-to-ec2-instances-in-python/</link>
		<comments>http://blog.iiilx.com/programming/parallel-deployment-to-ec2-instances-in-python/#comments</comments>
		<pubDate>Sat, 23 Jun 2012 23:48:49 +0000</pubDate>
		<dc:creator>iiilx</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.iiilx.com/?p=752</guid>
		<description><![CDATA[this is the side project i&#8217;m working on now. so far i can get X instances up of a given AMI Y with whatever tags Z you want on them and some DB records of these instances. after the isntances &#8230; <a href="http://blog.iiilx.com/programming/parallel-deployment-to-ec2-instances-in-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>this is the side project i&#8217;m working on now. </p>
<p>so far i can get X instances up of a given AMI Y with whatever tags Z you want on them and some DB records of these instances.</p>
<p>after the isntances are all running, my script attempts to copy over a shell script to execute on each instance (the copying happens in parallel and in a non-blocking manner).</p>
<p>then I connect to each instance over SSH and run the shell script I just copied over (parallel + nonblocking using gevent).</p>
<p>the shell script each instance runs is basically a set of commands to install puppet and connect to a puppet master.</p>
<p>so far the scripts will download puppet + dependencies, but i dont keep a puppet master running normally. </p>
<p>ill spend some time later setting up a puppet master. and to get more advanced, running masterless puppet would be ideal, although I haven&#8217;t explored that at all or tried to learn it.</p>
<p>setting up puppet though is pretty annoying, at least when I tried for hours one weekend. I eventually got it running, but it took so long I didn&#8217;t care.</p>
<p>I suppose the next step is to see puppet through to manage role based deployments.</p>
<p>i know there are simpler configuration management tools than puppet, but puppet is probably the most comprehensive tool out there from what I read.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.iiilx.com/programming/parallel-deployment-to-ec2-instances-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
