Closed tatsuru closed 7 years ago
ログは /tmp/isucon.perl.log に出てます
H/W spec
/var/lib/postgresql
これ 62MBテーブルこれ
psql -U isucon isucon5f
isucon5f=> \d endpoints;
Table "public.endpoints"
Column | Type | Modifiers
------------+-----------------------+-----------
service | character varying(32) | not null
meth | character varying(16) | not null
token_type | token_types |
token_key | character varying(64) |
uri | text |
Indexes:
"endpoints_pkey" PRIMARY KEY, btree (service)
isucon5f=> \d subscriptions;
Table "public.subscriptions"
Column | Type | Modifiers
---------+---------+-----------
user_id | integer | not null
arg | text |
Indexes:
"subscriptions_pkey" PRIMARY KEY, btree (user_id)
Foreign-key constraints:
"subscriptions_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id)
isucon5f=> \d users;
Table "public.users"
Column | Type | Modifiers
----------+------------------------+----------------------------------------------------
id | integer | not null default nextval('users_id_seq'::regclass)
email | character varying(256) | not null
salt | character varying(32) | not null
passhash | bytea | not null
grade | grades |
Indexes:
"users_pkey" PRIMARY KEY, btree (id)
Referenced by:
TABLE "subscriptions" CONSTRAINT "subscriptions_user_id_fkey" FOREIGN KEY (user_id) REFERENCES users(id)
isucon5f=> select * from endpoints;
service | meth | token_type | token_key | uri
---------------------+------+------------+--------------------------+------------------------------------------------------
ken | GET | | | http://api.five-final.isucon.net:8080/%s
ken2 | GET | | | http://api.five-final.isucon.net:8080/
surname | GET | | | http://api.five-final.isucon.net:8081/surname
givenname | GET | | | http://api.five-final.isucon.net:8081/givenname
tenki | GET | param | zipcode | http://api.five-final.isucon.net:8988/
perfectsec | GET | header | X-PERFECT-SECURITY-TOKEN | https://api.five-final.isucon.net:8443/tokens
perfectsec_attacked | GET | header | X-PERFECT-SECURITY-TOKEN | https://api.five-final.isucon.net:8443/attacked_list
psql 9.4.5
nginx/1.4.6
リクエスト先は hosts に書いてあるうける
isucon@isu09a:~$ cat /etc/hosts
127.0.0.1 localhost
203.104.208.171 isu01a.data-hotel.net isu01a
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
203.104.208.160 api.five-final.isucon.net
203.104.208.160 api.five-final.isucon.net
203.104.208.160 api.five-final.isucon.net
なるほど〜〜〜
my $client = Furl->new(ssl_opts => { SSL_verify_mode => SSL_VERIFY_NONE });
memcached を 203.104.208.197 に立てました。ひとまず 256MB くらい
isu09c 203.104.208.197 に MySQL 5.5 立てました root パスワード無しでどこからでも接続できます
PostgreSQL 全台よそからつなげるようにした psql は isu09c 203.104.208.197 使ってください
複数台の場合の構成ログなどの置き場 cheatsheet https://gist.github.com/tatsuru/5e4495edde7d78b171e9
初動
次
最後に