Можете посоветовать как увеличить RPS
nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
worker_rlimit_nofile 4096;
events {
worker_connections 1024;
use epoll;
}
http {
proxy_cache_path /var/spool/nginx/proxy keys_zone=IMAGES:10m levels=1:2 inactive=3h;
fastcgi_cache_path /var/spool/nginx/fastcgi keys_zone=PHP:10m levels=1:2 inactive=3h;
client_body_timeout 1m;
client_header_timeout 1m;
send_timeout 1m;
proxy_read_timeout 60s;
client_max_body_size 5000m;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
gzip_comp_level 4;
gzip_buffers 65 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
virtualhost
server {
listen 80;
server_name nit.dev;
root /var/http/public/nit;
index index.php index.htm index.html;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.(gif|jpg|png)$ {
proxy_pass http://127.0.0.1:81;
include proxy_params;
proxy_cache IMAGES;
proxy_cache_valid any valid 1h;
add_header X-Cache $upstream_cache_status;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_cache PHP;
fastcgi_cache_valid any valid 1h;
}
}
weighttp -c 100 -n 100000 http://www.dev/
finished in 1950 sec, 334 millisec and 956 microsec, 51 req/s, 2230 kbyte/s
requests: 100000 total, 100000 started, 100000 done, 100000 succeeded, 0 failed, 0 errored
status codes: 100000 2xx, 0 3xx, 0 4xx, 0 5xx
traffic: 4455000150 bytes total, 48700000 bytes http, 4406300150 bytes data