Author |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Tue 27 May '14 14:08 Post subject: |
|
|
C0nw0nk wrote: | Is there a max keep alive requests or are all the limits on your versions the same as in the nginx.org wiki ? |
The code is consistent with original nginx mainline code including any limits, bugs, shortfalls. Specific exceptions only for Windows are no longer valid with our build. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 27 May '14 14:17 Post subject: |
|
|
Thanks i will post back here next when i put it on my production servers and let everyone know how the latest nginx 1.7.1.3 RedKnight builds plays out on one of my sites in the worlds top 30,000 sites. It is a video streaming site too. So it should be a decent stress test for it, with a mapped network. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 27 May '14 19:49 Post subject: |
|
|
Works well i dont realy notice any difference in speed or performance between this and previous nginx.
This is the main part of my config :
Code: | #user nobody;
worker_processes auto;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
error_log logs/error.log crit;
#pid logs/nginx.pid;
events {
worker_connections 16384;
multi_accept on;
}
worker_rlimit_nofile 20000000; |
This is your config :
Code: | #user nobody;
# multiple workers works !
worker_processes 2;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 8192;
# max value 16384, nginx recycling connections+registry optimization =
# this.value * 20 = max concurrent connections currently tested with one worker
# C1000K should be possible depending there is enough ram/cpu power
multi_accept on;
} |
Do i need worker_rlimit_nofile and if so what is the best setting for it ?
http://stackoverflow.com/a/8217856/1160851 |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Tue 27 May '14 20:18 Post subject: |
|
|
Whichever config you use makes no difference for our build. There are mayor differences with the original nginx version, for instance worker_processes don't do anything because it doesn't work, worker_connections is severely limited. You need to test with a good load such as ab or openload and push it beyond the original nginx limits where the original will stop and ours won't stop. I've never used worker_rlimit_nofile since multiple workers divide the work equally to sustain performance. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Tue 27 May '14 20:36 Post subject: |
|
|
Thanks ng4win yours build does work amazingly i have no issues with it and like you said with the "auto" parameter on "worker_processes" it divides my load between my cpu.
Looking forward to the new features also if you was curious why i requested the pagespeed module, It was only for the on the fly Image optimization: stripping meta-data, dynamic resizing, recompression of images feature it provides. Since I deal with high traffic media sites a feature like that from my understanding over writes the exsisting images on my server when they are requested/pulled by a client.
Saves me having to push images through extra software that hogs cpu and takes a while to finish compressing when users upload images to the server. |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Tue 27 May '14 21:02 Post subject: |
|
|
C0nw0nk wrote: | curious why i requested the pagespeed module, It was only for the on the fly Image optimization |
We've already ported pagespeed to windows as a concept port but psol is a real pita, see also https://github.com/pagespeed/ngx_pagespeed/issues/584
Either someone fully ports psol or someone writes pagespeed in Lua
On a serious note, we would consider financially sponsoring anyone who would consider doing this in Lua, we might be able to get other firms to join in if it's fully done in Lua. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Wed 28 May '14 12:24 Post subject: |
|
|
After changing the registry with the .reg file optimization should i have to restart the server ? |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Wed 28 May '14 13:33 Post subject: |
|
|
C0nw0nk wrote: | After changing the registry with the .reg file optimization should i have to restart the server ? |
Yes. |
|
Back to top |
|
gijs
Joined: 27 Apr 2012 Posts: 189 Location: The Netherlands
|
Posted: Wed 28 May '14 14:53 Post subject: |
|
|
You mean the .reg to add it as a service? |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Wed 28 May '14 15:43 Post subject: |
|
|
gijs wrote: | You mean the .reg to add it as a service? |
No the .reg is just to tweak your registry settings to open ports and change port connection limits etc.
I don't know why they named it a service file because it does not add the nginx process as a windows service.
If anything that file should be named "Tweak/Optimize system registry for Nginx connections"
But yeah after running the .reg file i restarted my servers so the settings take effect on the system. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Thu 29 May '14 16:30 Post subject: |
|
|
C0nw0nk wrote: | Also ng4win.
http://wiki.nginx.org/ReverseProxyCachingExample
With the reverse proxy does your nginx version allow caching and with it what is the recommended reverse proxy config you would recommend for a dynamic php based site ? |
It depends what you would call caching, apc or xcache are both available for Windows and both work extremely well, here we prefer xcache.
Any caching example will work, we use original mainline nginx code, just make sure the path is adjusted for Windows. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Thu 29 May '14 16:47 Post subject: |
|
|
I already have Wincache in place on my php install what realy helps and i use expires max; on all static content. Aswell as because i mostly use Joomla 2.5 sites they all use joomla's built in cache. But i want to use Nginx proxy caching too. |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Thu 29 May '14 17:36 Post subject: |
|
|
C0nw0nk wrote: | But i want to use Nginx proxy caching too. |
Try the example you linked to, even microcaching works. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Thu 29 May '14 18:33 Post subject: |
|
|
ng4win wrote: | C0nw0nk wrote: | But i want to use Nginx proxy caching too. |
Try the example you linked to, even microcaching works. |
I just did but i dont see any files showing up in the directory cache or proxy_temp inside the nginx folder.
Code: | proxy_cache_path cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;
proxy_temp_path temp/proxy_temp; |
Also what is microcaching ? And shouldn't proxy_cache be caching the html output of my pages ? Maybe i have a miss understanding of how it works ? |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Thu 29 May '14 19:17 Post subject: |
|
|
My old stuff I used to experiment with;
http {
# Configure cache and temp paths
fastcgi_cache_path /caching/fastcgi_cache levels=1:2 keys_zone=cone:5m inactive=1d max_size=500m;
fastcgi_temp_path /caching/fastcgi_temp;
...
location {
#Caching parameters
proxy_ignore_headers Set-Cookie;
proxy_hide_header Set-Cookie;
fastcgi_cache_key $scheme$host$request_method$request_uri;
fastcgi_cache_valid 200 302 304 30m;
fastcgi_cache_valid 301 1h;
fastcgi_cache_valid any 5m;
fastcgi_cache_use_stale error timeout invalid_header updating http_500;
fastcgi_pass_header Set-Cookie;
...
This ain't proxy caching but it should be near enough the same mechanism, look it up in the nginx manual.
"Also what is microcaching ? "
See http://tghw.com/blog/microcaching-for-a-faster-site |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Thu 29 May '14 19:30 Post subject: |
|
|
Thanks i wounder if anything bad come from me using "proxy_cache_use_stale updating;".
Such as if i was to stop the apache service (back end that Nginx is proxying to.) I wounder if that would cause problems. |
|
Back to top |
|
ng4win
Joined: 25 May 2014 Posts: 78
|
Posted: Thu 29 May '14 19:34 Post subject: |
|
|
C0nw0nk wrote: | Thanks i wounder if anything bad come from me using "proxy_cache_use_stale updating;".
Such as if i was to stop the apache service (back end that Nginx is proxying to.) I wounder if that would cause problems. |
No idea, here it was just an experiment to see how things work and it works but nginx internal cache(memory) is faster then disk, see also http://www.yourhowto.net/reverse-proxy-and-cache-server-using-nginx/2/ for a more complete example. |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Thu 29 May '14 19:40 Post subject: |
|
|
Well it seems to create a faster first byte time, Also because you mentioned it caches it to memory instead of disk is that why the "cache" and "proxy_temp" folder i specified remain empty ? |
|
Back to top |
|
C0nw0nk
Joined: 07 Oct 2013 Posts: 241 Location: United Kingdom, London
|
Posted: Thu 29 May '14 20:09 Post subject: |
|
|
I figured out my problem i set "proxy_buffering off;" In my config when i should of set it to on. |
|
Back to top |
|