# Deploying with capistrano - web site responds much faster

**URL:** <https://www.ruby-forum.com/t/deploying-with-capistrano-web-site-responds-much-faster/117823>\
**Category:** Rails\
**Created:** [October 20, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/deploying-with-capistrano-web-site-responds-much-faster/117823 "2007-10-20T22:05:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 20, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/deploying-with-capistrano-web-site-responds-much-faster/117823/1 "2007-10-20T22:05:48Z")

</div>

Hi,

just out of curiosity: I have a RoR website, and till now I used to  
deploy it by hand. Now I’ve deployed it automatically, and after this  
the web site response is much faster. I don’t know if capistrano did  
something else too, though the speed of how the site runs has  
increased a lot.  
there is another thing though: I’m using a shared account on  
textdrive, and there it’s set up with lighttpd. bottom line, you have  
to setup a proxy in order to see the site at domain.tld instead of  
domain.tld:portnumber.  
When the site was running really slow, I didn’t have this proxy setup  
and probably it took a lot to find out the app or something. what’s  
the right explanation?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 20, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/deploying-with-capistrano-web-site-responds-much-faster/117823/2 "2007-10-20T22:50:48Z")

</div>

I also use Textdrive for one of my clients ([LookLocally.com](http://LookLocally.com)). The only  
things I can think of as to why its faster would be auto setup of  
memcache.  
The default install of the software seems to include it AND have it  
turned  
on by default. Going through Proxy seems to make use of it.

On 10/20/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> textdrive, and there it’s set up with lighttpd. bottom line, you have  
> to setup a proxy in order to see the site at domain.tld instead of  
> domain.tld:portnumber.  
> When the site was running really slow, I didn’t have this proxy setup  
> and probably it took a lot to find out the app or something. what’s  
> the right explanation?
> 
> >

–  
Richard J Hancock  
Developer/System A.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 21, 2007, 4:02am UTC](https://www.ruby-forum.com/t/deploying-with-capistrano-web-site-responds-much-faster/117823/3 "2007-10-21T04:02:58Z")

</div>

Do you store your sessions in the file system? When you setup  
Capistrano you probably deleted all the old sessions which could speed  
things up a bit.

On Oct 20, 1:05 pm, “removed\_email\_address@domain.invalid” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 21, 2007, 6:01am UTC](https://www.ruby-forum.com/t/deploying-with-capistrano-web-site-responds-much-faster/117823/4 "2007-10-21T06:01:05Z")

</div>

I store sessions into the database.  
Richard, can you please detail a little bit about the memcache being  
turned on? Do you mean memcache into Rails?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [October 21, 2007, 9:10am UTC](https://www.ruby-forum.com/t/deploying-with-capistrano-web-site-responds-much-faster/117823/5 "2007-10-21T09:10:24Z")

</div>

No. It seems to be related to apache in this case. Automatic caching  
is  
what it looks like. Although it does seem to know if I changed a  
file…in  
most cases. Not much I can detail about it since all I did change was  
just  
setting up Mongrel to run. Everything else was just stripping out  
unneeded  
modules to speed it up.

That being said, most of the speed improvements of late have been due to  
code reduction and refactoring. The code base I started using was  
inherited  
from another group of seriously under experienced developers. I’m no  
expert  
myself but this is ridiculous.

If someone can explain the logic in the following statements, please do  
so  
(the code was riddled with similar style of code)

arobject.each do |a|  
count = 1  
if count == 1  
do something  
count = 0  
else  
count = 1  
end  
end

As far as session for this site goes, its all file system. It also  
probably  
helps that the site gets restarted each night for log cleanup.

On 10/20/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I store sessions into the database.  
> Richard, can you please detail a little bit about the memcache being  
> turned on? Do you mean memcache into Rails?
> 
> >

–  
Richard J Hancock  
Developer/System A.
