Skip to content

Commit

Permalink
Use puma
Browse files Browse the repository at this point in the history
  • Loading branch information
sorah committed Oct 31, 2015
1 parent 7b6a4c1 commit 900ed86
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
27 changes: 24 additions & 3 deletions 5f/config/nginx.conf
Expand Up @@ -8,16 +8,22 @@ events {


http { http {
upstream isu12 { upstream isu12 {
server isu12a:8081; server isu12a:8082;
server isu12b:8081; server isu12b:8082;
server isu12c:8081; server isu12c:8082;
keepalive 36; keepalive 36;
} }


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


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



log_format ltsv "status:$status" log_format ltsv "status:$status"
"\ttime:$time_iso8601" "\ttime:$time_iso8601"
"\treqtime:$request_time" "\treqtime:$request_time"
Expand Down Expand Up @@ -87,4 +93,19 @@ http {
proxy_pass http://unicorn; proxy_pass http://unicorn;
} }
} }

server {
listen 8082;

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

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

} }
2 changes: 2 additions & 0 deletions 5f/webapp/ruby/reload.sh
Expand Up @@ -6,4 +6,6 @@ bundle install --jobs 30
ruby extconf.rb ruby extconf.rb
make make
) )
set +e
kill -USR2 $(cat /home/isucon/webapp/ruby/unicorn.pid) kill -USR2 $(cat /home/isucon/webapp/ruby/unicorn.pid)
kill -USR2 $(cat /home/isucon/webapp/ruby/puma.pid)

0 comments on commit 900ed86

Please sign in to comment.