Forum: NGINX Question on Proxy_Cache_Path

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ef5effe1ff64e4ab2c0bb98137e99d3c?d=identicon&s=25 Resicow (Guest)
on 2009-04-22 02:20
(Received via mailing list)
Hello,

Have a quick question for you.

Is it possible for proxy_temp_path and proxy_cache_path to be on
separate volumes?

It seems like nginx accepts this, however when I tried nginx would make
the folders necessary in proxy_cache_path, but wouldn't ever copy files
from the temp_path to the cache_path. When I locate the temp_path and
the cache_path on the same volume, then everything works as expected.

This would be very helpful, is there anyway to accomplish this?

Thanks,

John
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-04-22 10:05
(Received via mailing list)
On Tue, Apr 21, 2009 at 07:10:41PM -0500, Resicow wrote:

> the cache_path on the same volume, then everything works as expected.
>
> This would be very helpful, is there anyway to accomplish this?

Currently, these path must be on the same volume, because nginx just
link() to new place without copying. However, I plan to fallback
to copy temp file to another temporarily file on proxy_cache_path
voulme and then link() it to permanent name. As current workaround
you may set special proxy_temp_path for some locaitons only:

http {

     proxy_cache_path   /vol1/cache ...
     proxy_temp_path    /vol2/temp;

     server {

         location / {
             proxy_cache  ...
             proxy_temp_path    /vol1/temp;
Ef5effe1ff64e4ab2c0bb98137e99d3c?d=identicon&s=25 Resicow (Guest)
on 2009-04-22 17:40
(Received via mailing list)
Thanks!

Will this be in the next version?

The issue is that in order to do proxy_cache obviously proxy_buffer
needs to be on. This is bad if you set the minimum number of hits for a
file to 10 lets say... so nginx will buffer and write the file out 10
times, and then just throw the file away since it is not considered for
inclusion into the cache.

This may be okay under normal circumstances... but if you have an SSD in
the computer, you'll burn up all of your write cycles very quickly.
Instead proxy_temp can be on a regular HDD, and then nginx can copy the
file to the proxy_cache location on the SSD if the file is being
included in the cache.

Thanks,

John
2974d09ac2541e892966b762aad84943?d=identicon&s=25 testbot (Guest)
on 2010-02-01 21:10
(Received via mailing list)
does temp and cache use the same amount of space?

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,1313,48485#msg-48485
This topic is locked and can not be replied to.