worker_processes auto;
worker_rlimit_nofile 65535;
error_log /tmp/nginx-bench-error.log;
pid       /tmp/nginx-bench.pid;
daemon    off;

events {
    worker_connections  4096;
    multi_accept        on;
    use                 kqueue;
}

http {
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    keepalive_timeout   90;
    keepalive_requests  100000;

    access_log          off;
    server_tokens       off;

    open_file_cache          max=1000 inactive=60s;
    open_file_cache_valid    60s;
    open_file_cache_min_uses 1;
    open_file_cache_errors   on;

    types {
        application/octet-stream bin;
    }
    default_type application/octet-stream;

    server {
        listen       9997 reuseport backlog=4096;
        server_name  localhost;
        root         /tmp;

        location / {
            # serve test.bin and any other /tmp file directly
        }

        location /health {
            return 200 "ok";
        }
    }
}
