Welcome! Log In Create A New Profile

Advanced

Re: performance issus, please help???

August 29, 2011 04:02AM
If your page can using cache, you can try proxy_cache.
And static file don't fallback to Apache, direct using nginx to process.

Example config:
proxy_cache_path /var/www/cdn_cache levels=1:2 keys_zone=cachedata:128m max_size=4096m;

upstream backend {
server 127.0.0.1:9000 weight=3 fail_timeout=2s;
}

location ~ \.(gif|jpg|png|css|js|txt|xml)$
{
root /path/to/web;
}

location ~ ^/view\.php$ {
proxy_cache cachedata;
proxy_cache_valid 200 304 60s;
proxy_cache_key $uri$gzip$is_args$args;
add_header X-Cache "$upstream_cache_status from $hostname";
expires 60s;
proxy_set_header X-REAL-IP $remote_addr;
proxy_set_header Host $host;
proxy_pass http://backend;
}

location / {
proxy_pass http://backend;
}
Subject Author Posted

performance issus, please help???

w3elf August 29, 2011 02:11AM

Re: performance issus, please help???

magicbear August 29, 2011 04:02AM

Re: performance issus, please help???

Andy August 29, 2011 11:50AM

Re: performance issus, please help???

w3elf August 29, 2011 12:48PM

Re: performance issus, please help???

w3elf August 29, 2011 12:52PM

Re: performance issus, please help???

Alexandr Gomoliako August 29, 2011 01:20PM

Re: performance issus, please help???

w3elf August 29, 2011 01:24PM

Re: performance issus, please help???

Alexandr Gomoliako August 29, 2011 01:40PM

Re: performance issus, please help???

w3elf August 29, 2011 01:43PM

Re: performance issus, please help???

w3elf August 29, 2011 02:17PM

Re: performance issus, please help???

JackB August 30, 2011 04:20AM

Re: performance issus, please help???

Alexandr Gomoliako August 29, 2011 01:48PM

Re: performance issus, please help???

highpointe August 30, 2011 04:48AM

Re: performance issus, please help???

JackB August 30, 2011 07:32AM

Re: performance issus, please help???

w3elf August 30, 2011 07:53PM

Re: performance issus, please help???

unclepieman August 30, 2011 08:56PM

Re: performance issus, please help???

highpointe August 30, 2011 05:00AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready