nginx + caching of static files

Igor Sysoev is at rambler-co.ru
Fri Apr 10 10:40:35 MSD 2009


On Thu, Apr 09, 2009 at 02:27:15PM -0500, Resicow wrote:

> Hi Igor (and everyone else),
> 
> I had a few quick questions about the new proxy_cache feature, and I 
> apologize if they have already been answered.
> 
> 1) What about query_strings? Does proxy_cache ignore or include 
> query_strings? Is there a way to have it ignore query_strings in the URL?

By default qeury strings are included. You may ignore them using something
like this:

    proxy_cache_key   $host/$uri";

The default proxy_cache_key approximates

    proxy_cache_key  $scheme$proxy_host$uri$is_args$args;

> 2) How scalable is this system? Could it handle 50 million different 
> URIs for instance?

Each key takes 128 bytes in shared memory zone. Therefore you need 6.1G zone:

   key_zone=NAME:6200m;

> 3) Any plans for purge capabilities somehow, in the event you need the 
> content flushed right away?

Yes, there are such plans.

> Keep up the great work, thanks for making the world's best server!
> 
> Thanks,
> 
> John
> 
> 
> 
> 
> 
> Igor Sysoev wrote:
> >On Wed, Apr 08, 2009 at 11:16:30AM +0000, Glen Lumanau wrote:
> >
> >  
> >>How about jpg, css, js or any other files?
> >>    
> >
> >No problems with these files. Actually, there are no problems with flv
> >itself. The issue is when you want to get /some.flv?start=5000.
> >However, it seems flv handler can be converted easy enough to filter.
> >
> >  
> >>------Original Message------
> >>From: Igor Sysoev
> >>Sender: owner-nginx at sysoev.ru
> >>To: nginx at sysoev.ru
> >>ReplyTo: nginx at sysoev.ru
> >>Subject: Re: Re: nginx + caching of static files
> >>Sent: Apr 8, 2009 6:04 PM
> >>
> >>On Wed, Apr 08, 2009 at 10:51:59AM +0800, ???? wrote:
> >>
> >>    
> >>>Dear Igor,
> >>> 				
> >>>Then, how to use proxy_cache WITH flv streaming?
> >>>I tried proxy_cache feature, but it seems that the flv streaming 
> >>>function does not work with proxy_cache.
> >>>      
> >>No, flv is not filter, but handler, thefore it's not possible.
> >>    
> >
> >
> >  
> 

-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list