June 15, 2011 11:03AM
Good morning,
can give me someone an example or optimize my example configuration for a high traffic page?
I'm running Nginx on a Intel(R) Xeon(R) CPU X3440 @ 2.53GHz, 8 cores with 16 GB RAM DDR3.
With Nginx I run FastCGI-PHP5:
location ~ \.php$ {
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/htdocs$fastcgi_script_name;
include fastcgi_params;
fastcgi_intercept_errors on;

The site is a small search engine for some products, so the visitor can make just a request for some keyword. (So no big POST Uploads for files or so...).
But for Administrators exists an administration area, where they can upload images etc. so there should be the post limit not limited.

1. What is the optimal configuration for the timeouts and the buffers?

2. Should I move to PHP-fpm?

My nginx.conf:
user www-data;
worker_processes 4;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 1024;

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

access_log off;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
#keepalive_timeout 65;
tcp_nodelay on;

gzip on;
gzip_buffers 16 8k;
gzip_comp_level 9;
gzip_http_version 1.1;
gzip_min_length 10;
gzip_types text/plain text/css image/png image/gif image/jpeg application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon;
gzip_vary on;
gzip_proxied any;
gzip_disable "MSIE [1-6]\.";

## SIZES - What is the optimal configuration?
#client_body_buffer_size 8k;
#client_header_buffer_size 1k;
#client_max_body_size 1M;
#large_client_header_buffers 2 1k;

## Timeouts - What is here the optimal configuration?
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

Thank you very much!
Subject Author Posted

Configuration for a high traffic page?

heuri June 15, 2011 11:03AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 307
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready