<?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#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Yatendra Khandelwal</title>
	<atom:link href="http://yatendra.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yatendra.wordpress.com</link>
	<description>...technology, business, technology in business, business in technology ... and more</description>
	<lastBuildDate>Tue, 12 Jul 2011 18:59:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='yatendra.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Yatendra Khandelwal</title>
		<link>http://yatendra.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://yatendra.wordpress.com/osd.xml" title="Yatendra Khandelwal" />
	<atom:link rel='hub' href='http://yatendra.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MongoDB @ KhojKhabar</title>
		<link>http://yatendra.wordpress.com/2011/07/12/mongodb-khojkhabar/</link>
		<comments>http://yatendra.wordpress.com/2011/07/12/mongodb-khojkhabar/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 18:48:01 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mongolab]]></category>
		<category><![CDATA[khojkhabar]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=150</guid>
		<description><![CDATA[These days NoSQL databases are getting very popular. These databases don&#8217;t have a SQL interface for querying data and a lot of times don&#8217;t store data as collections of rows and tables. MongoDB is one such database that stores data in form of BSON(a form of JSON) documents and collections. The data in MongoDB can be queried [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=150&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>These days NoSQL databases are getting very popular. These databases don&#8217;t have a SQL interface for querying data and a lot of times don&#8217;t store data as collections of rows and tables. <a title="MongoDB" href="http://www.mongodb.org/" target="_blank">MongoDB</a> is one such database that stores data in form of BSON(a form of JSON) documents and collections. The data in MongoDB can be queried using a REST API. It has a <a title="MongoDB .Net driver" href="http://www.mongodb.org/display/DOCS/CSharp+Language+Center" target="_blank">.Net driver available</a> and there are a couple of hosted MongoDB cloud hosted providers with a free plan so I thought I will try to convert <a title="Khoj Khabar" href="http://khojkhabar.in" target="_blank">KhojKhabar</a> data store from SQLite to MongoDB.</p>
<p>Out of <a title="MongoHQ" href="http://mongohq.com" target="_blank">MongoHQ</a> and <a title="MongoLab" href="http://mongolab.com" target="_blank">MongoLab</a> I decided to use MongoLab as it allows 240 MB (vs 16 MB by MongoHQ). MongoLab also provides an option to host your MongoDB instance on Amazon or Rackspace cloud. So if your app is hosted on one of these providers you can reduce latency by hosting MongoDB on the same provider. Moving data storage of khojkhabar to MongoDB was not that difficult as the driver usage is like a combination of dataset style programming and fluid function calls (like used in subsonic 2), so someone with experience these can pick it up easily. There is also a good <a title="MongoDB tutorial" href="http://www.mongodb.org/display/DOCS/CSharp+Driver+Tutorial" target="_blank">tutorial available at MongoDb.org</a>, which was very helpful. Now the live <a title="Khoj Khabar" href="http://khojkhabar.in" target="_blank">khojkhabar</a> site is using MongoLab as the data store.In khojkhabar right now I store the news data of last 10 days only so I think 240 MB storage quota should be fine for now.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/150/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/150/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/150/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=150&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2011/07/12/mongodb-khojkhabar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
		<item>
		<title>AppHarbor &#8211; Heroku like service for ASP.Net</title>
		<link>http://yatendra.wordpress.com/2011/02/17/appharbor-heroku-like-service-for-asp-net/</link>
		<comments>http://yatendra.wordpress.com/2011/02/17/appharbor-heroku-like-service-for-asp-net/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 22:13:23 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[appharbor]]></category>
		<category><![CDATA[asp.net]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=124</guid>
		<description><![CDATA[I recently came across AppHarbor. It looks like another interesting startup to come out of  YCombinator. Its a Heroku like service that builds, runs unit tests and deploys your ASP.Net code for you. It works with Git so to upload the code all you need to do is git push. They provide shared and dedicated [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=124&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently came across <a href="http://www.appharbor.com" target="_blank">AppHarbor</a>. It looks like another interesting startup to come out of  <a href="http://www.ycombinator.com/" target="_blank">YCombinator</a>. Its a Heroku like service that builds, runs unit tests and deploys your ASP.Net code for you. It works with Git so to upload the code all you need to do is git push. They provide shared and dedicated databases with option of MS SQL server and MySQL.  Whats cool is that they provide a free application instance per applicaiton. So you pay only if your app grows to need another instance. Now if you need to test or host your next ASP.Net MVC app you know where to go.</p>
<p>Tonight I plan to play with it and see how it works for an ASP.Net MVC app I have been working on using Subsonic and SQLite. Details later.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=124&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2011/02/17/appharbor-heroku-like-service-for-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
		<item>
		<title>jQuery ListCollapse</title>
		<link>http://yatendra.wordpress.com/2011/01/09/jquery-listcollapse/</link>
		<comments>http://yatendra.wordpress.com/2011/01/09/jquery-listcollapse/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 18:04:16 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[Project]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=107</guid>
		<description><![CDATA[This plugin is meant to collapse/expand a list of items that grows beyond certain predefined number of items. It filters and collapses a list when data is bound, added or removed. If number of items are more than specified number n it displays first n items and displays an expand(customizable) link. When a user clicks [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=107&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This plugin is meant to collapse/expand a list of items that grows beyond certain predefined number of items. It filters and collapses a list when data is bound, added or removed. If number of items are more than specified number n it displays first n items and displays an expand(customizable) link. When a user clicks on this link it displays the entire list and changes this link to collapse(customizable).</p>
<p><a title="Download listcollapse" href="https://github.com/yatendra/ListCollapse" target="_blank">Download listcollapse</a></p>
<p>(Note: This plugin is based on Collapsorz 1.1 created by <a href="http://jquery.kuzemchak.net/collapsorz.php">Aaron Kuzemchak</a>. I have customized it to be able to be called whenever an item is added or removed and some minor modifications is think were required for dynamic list where items are added and removed on the fly)</p>
<p><span style="font-size:26px;">Usage</span></p>
<p>$(listelement).listcollapse();</p>
<p>$(listelement).listcollapse(options);</p>
<p><span style="font-size:26px;">Options</span></p>
<p>(All parameters are optional)</p>
<h3>toggle</h3>
<p>To select elements that you wish to collapse. By default it will collapse all direct children of the list selected.</p>
<h3>maximum</h3>
<p>Maximum number of elements to show. Collapses all items beyond this number. It defaults to 5.</p>
<h3>showText</h3>
<p>Text to be shown for the expand link. It defaults to Show.</p>
<h3>hideText</h3>
<p>Text to be shown for the collapse link. It defaults to Hide.</p>
<h3>linkLocation</h3>
<p>Whether to display expand/collapse link before or after the selected list. You can choose one of the following settings:</p>
<ul>
<li><strong>after</strong>—Places the link after the list. This is the default setting.</li>
<li><strong>before</strong>—Places the link before the list.</li>
</ul>
<h3>defaultState</h3>
<p>Whether the list should be displayed expanded or collapsed by default.</p>
<ul>
<li><strong>collapsed</strong>—List will be collapsed by default. This is the default setting.</li>
<li><strong>expanded</strong>—List will be expanded by default.</li>
</ul>
<h3>wrapLink</h3>
<p>HTML to wrap around the link.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/107/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/107/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/107/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=107&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2011/01/09/jquery-listcollapse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
		<item>
		<title>Load balancing</title>
		<link>http://yatendra.wordpress.com/2010/12/30/load-balancing/</link>
		<comments>http://yatendra.wordpress.com/2010/12/30/load-balancing/#comments</comments>
		<pubDate>Thu, 30 Dec 2010 23:02:23 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[IT Infrastructure]]></category>
		<category><![CDATA[load balancing]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=102</guid>
		<description><![CDATA[I read an interesting article today about load balancing. Its a must read for anyone looking to scale a website or anyone just simple interested in knowing how these high traffic websites scale on the web server side. This documents explains different ways of doing it like hardware based approach and software based approach. It [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=102&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I read an interesting article today about load balancing. Its a must read for anyone looking to scale a website or anyone just simple interested in knowing how these high traffic websites scale on the web server side. This documents explains different ways of doing it like hardware based approach and software based approach. It also explains various related factors like cookie persistence and using SSL certs in load balancing.</p>
<p><a href="http://www.exceliance.fr/en/ART-2006-making%20applications%20scalable%20with%20LB.pdf">http://www.exceliance.fr/en/ART-2006-making%20applications%20scalable%20with%20LB.pdf</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/102/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/102/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/102/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=102&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2010/12/30/load-balancing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
		<item>
		<title>Moving postgres data folder</title>
		<link>http://yatendra.wordpress.com/2010/12/22/moving-postgres-data-folder/</link>
		<comments>http://yatendra.wordpress.com/2010/12/22/moving-postgres-data-folder/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 19:08:37 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[IT Infrastructure]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=100</guid>
		<description><![CDATA[Our postgres server ran out of disk space on our EC2 server so we figured we should move the postgres data folder to a new bigger volume. We created an additional volume mounted to /disk2 and then moved the data folder as follows - 1. Login to shell as root. Stop the Postgres if running [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=100&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Our postgres server ran out of disk space on our EC2 server so we figured we should move the postgres data folder to a new bigger volume. We created an additional volume mounted to /disk2 and then moved the data folder as follows -</p>
<p>1. Login to shell as root. Stop the Postgres if running</p>
<p>$service postgresql-9.0 stop</p>
<p>2. Copy the data folder to new location</p>
<p>$cp -R /var/lib/pgsql/9.0/data  /disk2/pgdata/</p>
<p>3. Modify postgres startup script to point to new data directory</p>
<p>In  /etc/init.d/postgresql  file,  change the value of  PGDATA  variable to new location  which is /disk2/pgdata/data</p>
<p>4. Start the db server</p>
<p>$ service postgresql start</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=100&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2010/12/22/moving-postgres-data-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding a new volume to EC2 linux instance</title>
		<link>http://yatendra.wordpress.com/2010/12/22/adding-a-new-volume-to-ec2-linux-instance/</link>
		<comments>http://yatendra.wordpress.com/2010/12/22/adding-a-new-volume-to-ec2-linux-instance/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 19:02:27 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[IT Infrastructure]]></category>
		<category><![CDATA[EBS]]></category>
		<category><![CDATA[EC2]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=97</guid>
		<description><![CDATA[Our postgres EC2 linux instance ran out of disk space so I had to add another volume to the server. Following is what I did - Login to http://aws.amazon.com and go to EC2 tab. Go to volumes section and create a new volume. Enter the size of volume and select the availability zone. I generally [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=97&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Our postgres EC2 linux instance ran out of disk space so I had to add another volume to the server. Following is what I did -</p>
<ol>
<li>Login to http://aws.amazon.com and go to EC2 tab.</li>
<li>Go to volumes section and create a new volume.</li>
<li>Enter the size of volume and select the availability zone. I generally skip creating a snapshot unless there is explicit need.</li>
<li>Once the volume is created and its status is available, select it and click attach button. Select instance id of the instance to which it needs to be associated and map it to /dev/sda2</li>
<li>Login to the server as root and execute following commands -</li>
</ol>
<pre><code>       mkfs -t ext3 /dev/sda2   #dont do it if creating from an existing snapshot
       echo "/dev/sda2  /disk2  ext3     noatime  0 0" &gt;&gt; /etc/fstab
       mkdir /disk2
       mount /disk2
       df -h #you should now see /disk2 as a new volume</code></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=97&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2010/12/22/adding-a-new-volume-to-ec2-linux-instance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting up replication in Postgres 9.0</title>
		<link>http://yatendra.wordpress.com/2010/12/22/setting-up-replication-in-postgres-9-0/</link>
		<comments>http://yatendra.wordpress.com/2010/12/22/setting-up-replication-in-postgres-9-0/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 18:49:03 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[IT Infrastructure]]></category>
		<category><![CDATA[postgres]]></category>
		<category><![CDATA[replication]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=94</guid>
		<description><![CDATA[For picksie I had to set up streaming replication in Postgres 9.0. We have a master server which is used for read/write and a hot standby where we want the data to updated using streaming replication. Following is a summary of what I did 1. Install postgres on both master and standby 2. Allow standby [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=94&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For <a href="http://www.picksie.com">picksie</a> I had to set up streaming replication in Postgres 9.0. We have a master server which is used for read/write and a hot standby where we want the data to updated using streaming replication. Following is a summary of what I did</p>
<p>1. Install postgres on both master and standby</p>
<p>2. Allow standby server to connect to the master by editing pg_hba.conf</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">host  replication  postgres  192.168.0.20/22  trust</span></p>
<p>3. Setup streaming on master by updating postgresql.conf</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">wal_level = hot_standby</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">max_wal_senders = 5</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;"> </span><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">wal_keep_segments = 32</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">archive_mode    = on</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">archive_command = &#8216;cp %p /path_to/archive/%f&#8217;</span></p>
<p>4. Start postgres on master</p>
<p>5. Make base backup on master</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">$ psql -c &#8220;SELECT pg_start_backup(&#8216;label&#8217;, true)&#8221;</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">$ rsync -a ${PGDATA}/ standby:/srv/pgsql/standby/ &#8211;exclude postmaster.pid</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">$ psql -c &#8220;SELECT pg_stop_backup()&#8221;</span></p>
<p>6. Do authentication and streaming related configuration in postgresql.conf and pg_hba.conf in standby server so that when needed it can be promoted as master with less effort.</p>
<p>7. Set standby server as a hot standby by updating postgresql.conf</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">hot_standby = on</span></p>
<p>8. Create recovery.conf with following configuration on standby server in same folder as postgresql.conf</p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">standby_mode          = &#8216;on&#8217;</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">primary_conninfo      = &#8216;host=192.168.0.10 port=5432 user=postgres&#8217;</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">trigger_file = &#8216;/path_to/trigger&#8217;</span></p>
<p><span style="font-family:Consolas, Monaco, 'Courier New', Courier, monospace;line-height:13px;font-size:12px;white-space:pre;">restore_command = &#8216;cp /path_to/archive/%f &#8220;%p&#8221;&#8216;</span></p>
<p>Note: trigger file is the file, presence of which will make the standby server to stop replication and failover</p>
<p>9. Start postgres service on standby and it will start replication</p>
<p>&nbsp;</p>
<p>Reference: <a href="http://wiki.postgresql.org/wiki/Streaming_Replication">http://wiki.postgresql.org/wiki/Streaming_Replication</a></p>
<div id="_mcePaste" class="mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;"><span style="font-family:sans-serif;"></p>
<pre style="color:black;background-color:#f9f9f9;line-height:1.1em;border:1px dashed #2f6fab;padding:1em;">$ $EDITOR postgresql.conf

listen_addresses = '192.168.0.10'

$ $EDITOR pg_hba.conf

# The standby server must have superuser access privileges.
host  replication  postgres  192.168.0.20/22  trust</pre>
<p></span></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=94&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2010/12/22/setting-up-replication-in-postgres-9-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
		<item>
		<title>Interesting projects at work</title>
		<link>http://yatendra.wordpress.com/2010/09/21/interesting-projects-at-work/</link>
		<comments>http://yatendra.wordpress.com/2010/09/21/interesting-projects-at-work/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 04:20:05 +0000</pubDate>
		<dc:creator>Yatendra</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[iPad]]></category>
		<category><![CDATA[SAAS]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://yatendra.wordpress.com/?p=87</guid>
		<description><![CDATA[Cloud, iPad and SAAS are some of the most sought after buzz words of software industry right now.  Apart from looking after the IT infrastructure, my work involves projects bridge and picksie that together involve all of these. Bridge is a product targeting enterprise collaboration space, built on my stack of choice for web apps [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=87&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Cloud, iPad and SAAS are some of the most sought after buzz words of software industry right now.  Apart from looking after the IT infrastructure, my work involves projects bridge and picksie that together involve all of these.</p>
<p>Bridge is a product targeting enterprise collaboration space, built on my stack of choice for web apps these days ASP.Net/Subsonic/MySQL. We are looking into SAASifying this app and see if we can host it on the cloud using some knowledge that I have gained working on picksie.</p>
<p>Picksie is a web app for iPad, hosted on the cloud. My involvement is designing the infrastructure, making sure it is scalable and easily managable. Infrastructure of a consumer web app is really a completely different ballgame compared to enterprise IT infrastructure. So I am really getting to learn alot as picksie moves from demo to beta and from a simple 3 server setup to a more elaborate and load balanced and more elaborate setup.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/yatendra.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/yatendra.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/yatendra.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/yatendra.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/yatendra.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/yatendra.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/yatendra.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/yatendra.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/yatendra.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/yatendra.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/yatendra.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/yatendra.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/yatendra.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/yatendra.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=yatendra.wordpress.com&amp;blog=765519&amp;post=87&amp;subd=yatendra&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://yatendra.wordpress.com/2010/09/21/interesting-projects-at-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e895a4c437586dd468103f2c649db157?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Yatendra</media:title>
		</media:content>
	</item>
	</channel>
</rss>
