<?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>web technologist &#187; Backend Tech</title>
	<atom:link href="http://www.shinstudio.com/blog/category/backend-tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shinstudio.com/blog</link>
	<description>web 2.0, frontend, ajax, flash, css, dhtml, php</description>
	<lastBuildDate>Thu, 26 Jan 2012 09:50:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>reference links for guides to PHP and CouchDB</title>
		<link>http://www.shinstudio.com/blog/backend-tech/reference-links-for-guides-to-php-and-couchdb/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/reference-links-for-guides-to-php-and-couchdb/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 07:03:28 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=503</guid>
		<description><![CDATA[TweetStarted looking at CouchDB with PHP recently and I will update this post as I find more references. How to install CouchDB on ubuntu http://nosql.mypopescu.com/post/452052872/quick-guide-to-couchdb-and-php http://gonzalo123.wordpress.com/2010/03/15/php-and-couchdb/ Of course, NoSQL needs to be looked at too!]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton503" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Freference-links-for-guides-to-php-and-couchdb%2F&amp;text=reference%20links%20for%20guides%20to%20PHP%20and%20CouchDB&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Freference-links-for-guides-to-php-and-couchdb%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Started looking at CouchDB with PHP recently and I will update this post as I find more references.</p>
<ul>
<li><a href="http://wiki.apache.org/couchdb/Installing_on_Ubuntu">How to install CouchDB on ubuntu</a></li>
<li><a href="http://nosql.mypopescu.com/post/452052872/quick-guide-to-couchdb-and-php">http://nosql.mypopescu.com/post/452052872/quick-guide-to-couchdb-and-php</a></li>
<li><a href="http://gonzalo123.wordpress.com/2010/03/15/php-and-couchdb/">http://gonzalo123.wordpress.com/2010/03/15/php-and-couchdb/</a></li>
<li><a href="http://en.wikipedia.org/wiki/NoSQL">Of course, NoSQL needs to be looked at too!</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/reference-links-for-guides-to-php-and-couchdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>reference links for rails and git on ubuntu lucid</title>
		<link>http://www.shinstudio.com/blog/backend-tech/reference-links-for-rails-and-git-on-ubuntu-lucid/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/reference-links-for-rails-and-git-on-ubuntu-lucid/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 03:37:46 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=490</guid>
		<description><![CDATA[TweetFor ruby and rails: (I was getting this message &#8220;File not found: lib&#8221; and finally found the answer after googling..) git rails on ruby (although 10.10 is maverick, the instruction worked on 10.04 lucid) 10 git commands Phusion Passenger for rail configuration in apache sudo apt-get install ruby-full wget production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz tar -xvf rubygems-1.3.7.tgz cd rubygems-1.3.7/ [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton490" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Freference-links-for-rails-and-git-on-ubuntu-lucid%2F&amp;text=reference%20links%20for%20rails%20and%20git%20on%20ubuntu%20lucid&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Freference-links-for-rails-and-git-on-ubuntu-lucid%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>For ruby and rails:<br />
(I was getting this message &#8220;File not found: lib&#8221; and finally found the answer after googling..)</p>
<ul>
<li><a href="http://kibyegon.wordpress.com/2010/05/13/how-to-install-git-on-ubuntu-lucid-10-04">git</a></li>
<li><a href="http://excid3.com/blog/2010/10/ruby-on-rails-3-and-mysql-on-ubuntu-10-10/">rails on ruby (although 10.10 is maverick, the instruction worked on 10.04 lucid)</a></li>
<li><a href="http://blog.xkoder.com/2008/08/13/git-tutorial-starting-with-git-using-just-10-commands/">10 git commands</a></li>
<li><a href="http://www.modrails.com/install.html">Phusion Passenger for rail configuration in apache</a></li>
</ul>
<p><span id="more-490"></span></p>
<blockquote><p>sudo apt-get install ruby-full</p>
<p>wget production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz</p>
<p>tar -xvf rubygems-1.3.7.tgz</p>
<p>cd rubygems-1.3.7/</p>
<p>sudo ruby setup.rb</p>
<p>sudo ln -s /usr/bin/gem1.8 /usr/bin/gem</p>
<p>sudo gem install rdoc</p>
<p>sudo gem install rails</p></blockquote>
<blockquote><p>sudo aptitude build-dep git-core</p>
<p>wget http://kernel.org/pub/software/scm/git/git-1.7.1.tar.gz</p>
<p>tar xvzf git-1.7.1.tar.gz</p>
<p>cd git-1.7.1/</p>
<p>./configure</p>
<p>make</p>
<p>sudo make install</p>
<p>git &#8211;version</p></blockquote>
<p>For mysql5 after the installation:</p>
<ul>
<li>to start mysql: sudo service mysql start</li>
<li>to stop mysql: sudo service mysql stop</li>
<li>to restart mysql: sudo service mysql restart</li>
</ul>
<p>It&#8217;s <strong>NOT</strong> these:</p>
<blockquote><p>sudo /etc/init.d/mysql restart<br />
sudo /etc/init.d/mysql stop<br />
sudo /etc/init.d/mysql start</p></blockquote>
<p><em>UPDATE (nov 23, 2010): </em></p>
<p>According to ruby doc, 1.8.7 p248 and p249 have marshaling bugs and it recommends 1.9.2. And I found <a href="http://torqueo.net/installing-ruby-192-and-rails-3-stable-on-ubuntu/">this guide</a> to upgrade to 1.9.2.</p>
<p>Also <a href="http://www.christopherirish.com/2010/08/25/how-to-install-rvm-on-ubuntu-10-04/">installation RVM on ubuntu</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/reference-links-for-rails-and-git-on-ubuntu-lucid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_pagespeed</title>
		<link>http://www.shinstudio.com/blog/technology_news/mod_pagespeed/</link>
		<comments>http://www.shinstudio.com/blog/technology_news/mod_pagespeed/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 04:51:54 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[technology news]]></category>
		<category><![CDATA[mod_pagespeed]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=479</guid>
		<description><![CDATA[TweetI started it today by reading http://goo.gl/WQScB and http://goo.gl/Vobn6.]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton479" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Ftechnology_news%2Fmod_pagespeed%2F&amp;text=mod_pagespeed&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Ftechnology_news%2Fmod_pagespeed%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I started it today by reading http://goo.gl/WQScB and http://goo.gl/Vobn6.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/technology_news/mod_pagespeed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nginx on snow leopard</title>
		<link>http://www.shinstudio.com/blog/backend-tech/nginx-on-snow-leopard/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/nginx-on-snow-leopard/#comments</comments>
		<pubDate>Sun, 19 Sep 2010 06:40:18 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[snow leopard]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=477</guid>
		<description><![CDATA[TweetI always used my dev host at slicehost to test/experiment/host my website running off nginx. SSH and SFTP served my purpose without much troubles. However, today I felt that I wanted to replicate my dev env for my macbook and found this very useful link. How to install Nginx on Mac OSX 10.5 using MacPorts [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton477" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fnginx-on-snow-leopard%2F&amp;text=nginx%20on%20snow%20leopard&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fnginx-on-snow-leopard%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I always used my dev host at slicehost to test/experiment/host my website running off nginx. SSH and SFTP served my purpose without much troubles. However, today I felt that I wanted to replicate my dev env for my macbook and found this very useful link.</p>
<p><a href="http://mjijackson.com/2009/07/install-nginx-on-osx">How to install Nginx on Mac OSX 10.5 using MacPorts</a></p>
<p>p.s. I also got to know about MacPorts today. <img src='http://www.shinstudio.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/nginx-on-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Scalability/Performance</title>
		<link>http://www.shinstudio.com/blog/backend-tech/site-scalabilityperformance/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/site-scalabilityperformance/#comments</comments>
		<pubDate>Thu, 20 May 2010 20:24:59 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[Frontend Tech]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=440</guid>
		<description><![CDATA[TweetThis is old blog post by Peter Van Dijck, which he posted presentation materials regarding site performance and scalability, but it is still very good resource. Check it out.]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton440" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fsite-scalabilityperformance%2F&amp;text=Site%20Scalability%2FPerformance&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fsite-scalabilityperformance%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>This is old blog post by Peter Van Dijck, which he posted presentation materials regarding site performance and scalability, but it is still very good resource.</p>
<p><a href="http://poorbuthappy.com/ease/archives/2007/04/29/3616/the-top-10-presentation-on-scaling-websites-twitter-flickr-bloglines-vox-and-more">Check it out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/site-scalabilityperformance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>memcached with java</title>
		<link>http://www.shinstudio.com/blog/backend-tech/memcached-with-java/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/memcached-with-java/#comments</comments>
		<pubDate>Wed, 05 May 2010 18:26:48 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[java memcached]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/uncategorized/memcached-with-java/</guid>
		<description><![CDATA[TweetI found a great post regarding the subject. It&#8217;s a very good read.]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton415" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fmemcached-with-java%2F&amp;text=memcached%20with%20java&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fmemcached-with-java%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I found a <a href="http://sacharya.com/using-memcached-with-java/">great post</a> regarding the subject. It&#8217;s a very good read.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/memcached-with-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Node.js in nginx</title>
		<link>http://www.shinstudio.com/blog/backend-tech/setting-up-node-js-in-nginx/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/setting-up-node-js-in-nginx/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 02:42:02 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[nginx node.js]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=406</guid>
		<description><![CDATA[TweetToday I decided to test out Node.js (the trend in web tech) on nginx. Of course I googled it and found this link. I already have nginx running on my server, so I did not have to install nginx again. Only pkgs that I needed were git-core and monit. In the step 2: Packages at [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton406" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fsetting-up-node-js-in-nginx%2F&amp;text=Setting%20up%20Node.js%20in%20nginx&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fsetting-up-node-js-in-nginx%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Today I decided to test out Node.js (the trend in web tech) on nginx. Of course I googled it and found <a href="http://dailyjs.com/2010/03/15/hosting-nodejs-apps/">this link</a>.</p>
<p>I already have nginx running on my server, so I did not have to install nginx again. Only pkgs that I needed were git-core and monit.</p>
<p><span id="more-406"></span><br />
In the step 2: Packages at the site, it states:</p>
<blockquote><p>
apt-get install sudo vim-nox nginx ~~~
</p></blockquote>
<p>However, it needs to be this instead:</p>
<blockquote><p>
sudo apt-get install vim-nox nginx ~~~
</p></blockquote>
<p>In Step 3. once you get node.gif, from the current directory you need to cd to *node* directory.</p>
<p>*make* command took about 10 m.</p>
<p>*make install* threw out an error:</p>
<blockquote><p>
Cannot create folder &#8216;/usr/local/include/node/&#8217; (original error: [Errno 13] Permission denied: &#8216;/usr/local/include/node/&#8217;)<br />
make: *** [install] Error 1
</p></blockquote>
<p>So I had to *sudo make install* instead.</p>
<p>In the Step 4: Configure the Web Server. Since I am using port 80 as my own site, not proxy. So I changed the nginx conf file in a different way although all settings are very similar. I created another server setting that listens to port 8001 instead of 80 just for access to Node.js application from outside. By the way I have a file name as shinstudio.com for my own site nginx conf file. Additional conf settings that I added to shinstudio.com was:</p>
<blockquote><p>
upstream app_cluster_1 {<br />
    server 127.0.0.1:8000;<br />
}<br />
server {<br />
            listen 8001;<br />
            server_name www.shinstudio.com;<br />
            access_log /{my_site_directory}/log/node_access.log;<br />
            location / {<br />
                proxy_set_header X-Real-IP $remote_addr;<br />
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br />
                proxy_set_header Host $http_host;<br />
                proxy_set_header X-NginX-Proxy true;<br />
                proxy_pass http://app_cluster_1/;<br />
                proxy_redirect off;<br />
            }<br />
}
</p></blockquote>
<p>Obviously I had to open port 8001 for my host.</p>
<p>When I run a node sample application, request from a browser to the app responds. So first step is success.</p>
<p>I will write about how I made the node app as daemon like service soon.</p>
<p>To be continued&#8230;</p>
<p>more references:</p>
<ul>
<li><a href="http://howtonode.org/deploying-node-upstart-monit">http://howtonode.org/deploying-node-upstart-monit</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/setting-up-node-js-in-nginx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Codeigniter set up on the nginx http server</title>
		<link>http://www.shinstudio.com/blog/backend-tech/codeigniter-set-up-on-the-nginx-http-server/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/codeigniter-set-up-on-the-nginx-http-server/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 05:16:20 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[rewriterule]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=346</guid>
		<description><![CDATA[TweetSetting up nginx http server was not so bad I thought. Setting up Codeigniter on my server was easy (Just follow the instruction in their documentation). However, codeigniter redirect was not working except the one that is set up in $route['default_controller'] = &#8220;blahblah&#8221;;&#8230; If you encounter the same problem as I struggled from, find the [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton346" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fcodeigniter-set-up-on-the-nginx-http-server%2F&amp;text=Codeigniter%20set%20up%20on%20the%20nginx%20http%20server&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fcodeigniter-set-up-on-the-nginx-http-server%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>Setting up nginx http server was not so bad I thought. Setting up Codeigniter on my server was easy (Just follow the instruction in their documentation).</p>
<p>However, codeigniter redirect was not working except the one that is set up in $route['default_controller'] = &#8220;blahblah&#8221;;&#8230;</p>
<p>If you encounter the same problem as I struggled from, find the config.php from /application/config/ directory and search for &#8220;$config['uri_protocol'] = &#8220;blahblah&#8221;;</p>
<p>When you look at its documentation carefully, it says :</p>
<blockquote><p>If your links do not seem to work, try one of the other delicious flavors:</p></blockquote>
<p>So I changed it to &#8220;REQUEST_URI&#8221; and my Codeigniter&#8217;s rewrite rule started working!</p>
<p>If you wonder what my conf file looks like, here it is:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">server {
    listen   80;
    server_name  domain.com;
    location ~ /\. {
        deny all;
    }
    rewrite ^/(.*) http://www.domain.com/$1 permanent;
}
server {
    listen   80;
    server_name  www.domain.com;
    access_log /path/to/your/app/log/access.log;
    error_log /path/to/your/app/log/error.log;
&nbsp;
    location ~ /\. {
        deny all;
    }
&nbsp;
    location / {
        index index.php;
        root /path/to/your/app/public;
        if (!-e $request_filename) { 
             rewrite ^/(.*)$ /index.php/$1 last;
        }
    }
&nbsp;
    location ~ /index.php/ {
        fastcgi_pass    127.0.0.1:9000;
        fastcgi_index   index.php;
        include         /usr/local/nginx/conf/fastcgi_params;
        fastcgi_param   SCRIPT_FILENAME     /path/to/your/app/public/$fastcgi_script_name;
    }
}</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/codeigniter-set-up-on-the-nginx-http-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use cache technologies to improve performance of your site.</title>
		<link>http://www.shinstudio.com/blog/backend-tech/use-cache-technologies-to-improve-performance-of-your-site/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/use-cache-technologies-to-improve-performance-of-your-site/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 08:53:14 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>
		<category><![CDATA[Frontend Tech]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[module level cache]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[squid-cache]]></category>
		<category><![CDATA[view level cache]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/blog/?p=309</guid>
		<description><![CDATA[As the number of users grow, is it necessary to increase the number of servers? Well. The answer to the question really depends. Some might say to buy more hardware to support increasing visits. Some might say before buying more hardware, tune up your software by optimizing the code and squeeze any power out of the box. But in this post, I'm not going to discuss software tune ups.]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton309" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fuse-cache-technologies-to-improve-performance-of-your-site%2F&amp;text=Use%20cache%20technologies%20to%20improve%20performance%20of%20your%20site.&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fuse-cache-technologies-to-improve-performance-of-your-site%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>As the number of users grow, is it necessary to increase the number of servers? Well. The answer to the question really depends. Some might say to buy more hardware to support increasing visits. Some might say before buying more hardware, tune up your software by optimizing the code and squeeze any power out of the box. But in this post, I&#8217;m not going to discuss software tune ups.</p>
<p>I&#8217;m going to talk about cache technologies.</p>
<p><strong>cache layer</strong><br />
I&#8217;d like to start with the concept of proxy layer. What proxy layer provides is a memory storage between frontend(FE) layer and API layer. So that the actual requests made from users do not overload API server; thus, the site performs much better. Proxy server would store returned XML data from API and when the same API request was made from FE, proxy would return the same data stored in the memory to FE removing extra calls to API. Frontend layer is a typical HTTP server while API layer is a data layer. Usually this technique is used in multi tier architecture. This is usual 3 tier architecture.</p>
<pre>
DB -> API -> FE
</pre>
<p>When we introduce proxy layer to it, 3 tier architecture becomes this:</p>
<pre>
DB -> API -> Proxy -> FE
</pre>
<p>As you can see, the major advantages of Proxy layer are:</p>
<ol>
<li>It is very fast since it accesses memory instead of hard disc</li>
<li>It reduces overhead to one layer dramatically</li>
<li>It delivers content really quickly</li>
<li>It improves response time(better roundtrip numbers)</li>
<li>It provides better usability to users as content is delivered a lot faster</li>
<li>It can hold old data for specified time in case database blows</li>
</ol>
<p>It just has all good things. <img src='http://www.shinstudio.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Commonly used cache technology for the cache layer is <a href="http://www.squid-cache.org/">squid cache</a>. If your organization&#8217;s web site is getting popular and needs performance tune up, it may be a good idea to invest some time and money to implement cache layer.</p>
<p>As I covered cache layer, let&#8217;s move to view level cache.</p>
<p><strong>View Level Cache</strong><br />
View Level Cache is a cache technique to store your HTML markup output into memory or harddisc. This could be a whole markup for the page, markup for a partial page, or markup for several parts of the page. As the term implies the view level cache occurs on the frontend layer. Also there is another term, <strong>Module Level Cache</strong> referring to View Level Cache. For example, in my blog there are several sections in the page. Those are links, archives, and so on. Each section is a module and the final markup of those modules can be cached for 5 mins to how many minutes you like.</p>
<p><strong>What&#8217;s so good about View Level Cache(Module Level Cache)</strong><br />
As I explained in the previous paragraph, it stores the final markup of a module. Which means you can reduce cpu load, which would have used to generate that module for the time you specified. That means also it does not have to make several requests to database like MySQL. So when your site got hit by dig users or reditt users, View Level Cache would&#8217;ve helped to ease heavy traffic much.</p>
<p><strong>View Level Cache technologies</strong><br />
If you are using php, the common technology for the view level cache is <a href="http://us3.php.net/apc">APC</a>. The usage of APC is relatively easy. In php, another technique you can use is a file cache. And heavy traffic&#8217;ed sites also use <a href="http://www.danga.com/memcached/">memcached</a>, which is a distributed memory object caching system. I am not going to show how to use each technology in this post as each topic deserves its own post. <img src='http://www.shinstudio.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p><strong>Do not cache all by accident</strong><br />
When you apply cache layer to your Frontend, be warned that caching all content is bad usually, specially if your site is dynamic. You do not want to cache user A&#8217;s name and display it when user B, C, and D visits your site. Also if one of your pages needs user specific data in a form tag with hidden input field and somewhat you caches it, the next visitor to your site will use the same data from the previous visitor, which is bad. See where I am going with this? So it will be nice if you can communicate with visual designer so that she can visually distinguish what can be cached and what not.</p>
<p><strong>Results out of cache</strong><br />
The site that has implemented cache technique well could support 200 to 300 hits per second. That translates to 12000 to 18000 hits per second. I know this from my experience. You do not need a lot of servers to support 200 hits/sec site. All you need is one FE box if your site has 200 hits/sec.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/use-cache-technologies-to-improve-performance-of-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Apache with PHP5 on FreeBSD</title>
		<link>http://www.shinstudio.com/blog/backend-tech/setting-up-apache-with-php5-on-freebsd/</link>
		<comments>http://www.shinstudio.com/blog/backend-tech/setting-up-apache-with-php5-on-freebsd/#comments</comments>
		<pubDate>Tue, 24 Apr 2007 02:35:25 +0000</pubDate>
		<dc:creator>sh.kim</dc:creator>
				<category><![CDATA[Backend Tech]]></category>

		<guid isPermaLink="false">http://www.shinstudio.com/sh.kim/?p=240</guid>
		<description><![CDATA[TweetI installed FreeBSD on my T41 Laptop recently. Everything went very smoothly until I got to wireless network setting. Finally I gave up setting up wireless network on my T41 and just used LAN cable&#8230; =( And I needed to install PHP5 that runs on Apache22 and found this link. This link provides step-by-step instruction. [...]]]></description>
			<content:encoded><![CDATA[<div id="tweetbutton240" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fsetting-up-apache-with-php5-on-freebsd%2F&amp;text=Setting%20up%20Apache%20with%20PHP5%20on%20FreeBSD&amp;related=&amp;lang=en&amp;count=vertical&amp;counturl=http%3A%2F%2Fwww.shinstudio.com%2Fblog%2Fbackend-tech%2Fsetting-up-apache-with-php5-on-freebsd%2F" class="twitter-share-button"  style="width:55px;height:22px;background:transparent url('http://www.shinstudio.com/blog/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat  0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div><p>I installed FreeBSD on my T41 Laptop recently. Everything went very smoothly until I got to wireless network setting. Finally I gave up setting up wireless network on my T41 and just used LAN cable&#8230; =(</p>
<p>And I needed to install PHP5 that runs on Apache22 and found <a href="http://www.freebsdmadeeasy.com/tutorials/web-server/install-php-5-for-web-hosting.php">this link</a>.</p>
<p>This link provides step-by-step instruction. Previously I missed few steps and apache could not understand .php extension. I did not add &#8220;<strong>AddType application/x-httpd-php .php</strong>&#8220;!</p>
<p>Anyways, now it works fine and is all good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.shinstudio.com/blog/backend-tech/setting-up-apache-with-php5-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

