Skip to content

Commit

Permalink
keepalive via nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
sorah committed Oct 31, 2015
1 parent 382d8a7 commit 0d0f8c6
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions 5f/config/nginx.conf
Expand Up @@ -8,12 +8,16 @@ events {

http {
upstream isu12 {
server isu12a:8080;
server isu12b:8080;
server isu12c:8080;
server isu12a:8081;
server isu12b:8081;
server isu12c:8081;
keepalive 8;
}

upstream unicorn {
server unix:/tmp/unicorn.sock;
}

log_format ltsv "status:$status"
"\ttime:$time_iso8601"
"\treqtime:$request_time"
Expand Down Expand Up @@ -69,4 +73,18 @@ http {
proxy_pass http://isu12;
}
}

server {
listen 8081;

location ~ ^/(js|css|fonts)/ {
root /home/isucon/shirokanezoo/5f/webapp/static;
expires max;
}

location / {
proxy_set_header Host $host;
proxy_pass http://unicorn;
}
}
}

0 comments on commit 0d0f8c6

Please sign in to comment.