# How to serve cached ruby apps from nginx rather than unicorn?

**URL:** <https://www.ruby-forum.com/t/how-to-serve-cached-ruby-apps-from-nginx-rather-than-unicorn/216274>\
**Category:** Deployment\
**Created:** [January 31, 2012, 2:35pm UTC](https://www.ruby-forum.com/t/how-to-serve-cached-ruby-apps-from-nginx-rather-than-unicorn/216274 "2012-01-31T14:35:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [January 31, 2012, 2:35pm UTC](https://www.ruby-forum.com/t/how-to-serve-cached-ruby-apps-from-nginx-rather-than-unicorn/216274/1 "2012-01-31T14:35:50Z")

</div>

I have a rails 3.0 app, and it has a good amount of traffic, the app  
it’s running through the combination of Nginx and Unicorn. The thing is  
that unicorn and it’s workers consume a lot of resources, and because of  
the nature of my app, a lot of records are pulled from the database,  
then it’s like serving almost static files generated with those database  
records

I was wondering if you can generate this kind of static files, cache  
them, serve them instead of the app through unicorn to use less  
resources and kind of reloading the cache after 1000 request

I’m beginning my research about that, I don’t know a lot of server  
configuration, so I you guys have any advise it would be great!

thanks!
