[TYPO3-performance] Running TYPO3 on Nginx, natively

georg kuehnberger georg at georg.org
Tue Aug 11 18:47:23 CEST 2009


Michiel,

> Hi Georg,
> There are some proxying examples here: 
> http://wiki.nginx.org/NginxConfiguration#Proxying_examples

Thanks for the pointers and example config.
My target is to benchmark nginx, squid and varnish in their function as 
reverse proxy in front of slower backendservers running Apache, nginx or 
lighthttpd.
Reasons for using a rev.proxy are: general acceleration, avoid 
slash-dot-effects, added security, separation of tiers and better 
hardware-utilization.

> But you must _measure_ if there is actually any performace gain in using 
> such a setup. I expect Nginx to do a fair bit of cacheing on a bare 
> server cofiguration so I don't expect any gain if you put Nginx in front 
> of itself. 

That is, what I was wondering about, too; does NGINX do cache anything 
in default config? actually I doubt it.

Having a look at http://wiki.nginx.org/NginxHttpCoreModule tells us:
syntax: open_file_cache max = N [inactive = time] | off
default: open_file_cache off
context: http, server, location

OK, so there seem to be some caching-option, though they are not enabled 
by default.

Whereas the usage as proxy see 
http://wiki.nginx.org/NginxHttpProxyModule#proxy_cache
offers a wide range of meaningful cache-configuration options.

One I like most (also avail in latest Squid-Versions) is 
"proxy_cache_use_stale" which basically allows you to 
shutdown/mantain/break the backendservers and still have the rev.proxy 
serve the Site to the public (from it's cache);

> The one Thing you will get is added TCP overhead from 
> proxying te requests to self.
Sure, however this overhead by far outweights the benefits gained.

> You may find gains in enabling and configuring fastcgi_cache: 
> http://wiki.nginx.org/NginxHttpFcgiModule#fastcgi_cache
Interesting option, will look into it later;

> You may find gains in enabling and configuring memcached:
> http://wiki.nginx.org/NginxHttpMemcachedModule

I'd prefer to use the nginx-build-in cache rather than having it outside.

I hope to be able to present some comparisons be next week.
looking forward, regards georg


More information about the TYPO3-performance mailing list