원클릭으로
nginx-tuning
Tune nginx worker processes, connection handling, keepalive, and logging for ISUCON workloads
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Tune nginx worker processes, connection handling, keepalive, and logging for ISUCON workloads
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
MCP tool reference — exec, benchmark_start, benchmark_status, note_write, etc. Use when: executing commands on VMs, running benchmarks, or recording findings
ISUCON13 contest manual — server topology, service management, benchmark execution, and rules. Use when: checking environment setup, running benchmarks, or understanding contest constraints
ISUPipe application manual — features, terms, constraints, and API specs. Use when: understanding the app domain, checking API behavior or MUST/MAY requirements
General strategy for identifying and adding missing database indexes in ISUCON web applications
General techniques for optimizing user icon/avatar image serving in ISUCON web applications
General techniques for identifying and fixing N+1 query problems in ISUCON web applications
| name | nginx-tuning |
| description | Tune nginx worker processes, connection handling, keepalive, and logging for ISUCON workloads |
Optimize nginx reverse proxy for high-concurrency ISUCON benchmarks.
Edit /etc/nginx/nginx.conf:
worker_processes auto; # Match CPU cores (default: 1)
worker_rlimit_nofile 65535; # File descriptor limit per worker
events {
worker_connections 4096; # Connections per worker (default: 512)
multi_accept on; # Accept multiple connections at once
use epoll; # Linux-optimized event model
}
http {
# Keepalive to backend Go app
upstream app {
server 127.0.0.1:8080;
keepalive 64; # Persistent connections to upstream
}
# TCP optimizations
sendfile on;
tcp_nopush on;
tcp_nodelay on;
# Timeouts
keepalive_timeout 65;
keepalive_requests 10000;
# Buffer sizes
client_body_buffer_size 16k;
proxy_buffering on;
proxy_buffer_size 8k;
proxy_buffers 8 8k;
# Disable access log for performance (after profiling is done)
# access_log off;
}
In /etc/nginx/sites-enabled/isupipe.conf, update the proxy_pass to use upstream with keepalive:
location / {
proxy_pass http://app;
proxy_http_version 1.1; # Required for keepalive
proxy_set_header Connection ""; # Required for keepalive
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
exec host="vm1" command="sudo nginx -t && sudo systemctl reload nginx"
If using alp for profiling, configure LTSV log format (see alp-profiling skill). After profiling is complete, consider disabling access logging to reduce I/O:
access_log off;
If icons are moved to filesystem (see icon-caching skill), add:
location ~ ^/api/user/[^/]+/icon$ {
root /home/isucon/isucon13/webapp/public;
try_files /icons/$arg_user_id.jpg @app;
}
location @app {
proxy_pass http://app;
}