Upgrade to Pro — share decks privately, control downloads, hide ads and more …

isucon5 予選をどう惨敗したか / isucon5 qualifier

isucon5 予選をどう惨敗したか / isucon5 qualifier

2015/10/06(火) 19:00
ISUCON5予選報告会 in GCPUG Tokyo
http://eventdots.jp/event/569858

Yuichi Takada

October 06, 2015
Tweet

More Decks by Yuichi Takada

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ • ߴా༞Ұ • Sansan גࣜձࣾ (2015/05~) • αʔόαΠυΤϯδχΞ (ruby)

    • twitter: takady7 • github: takady https://flic.kr/p/5mHpwt
  2. ࠷ॳͷϕϯνϚʔΫΛճͯ͠ • ॳظείΞ: ໿200఺ • slow query ݟͯ index Λషͬͨ

    • nginx - unicorn ͷ unix ιέοτ઀ଓ • nginx Ͱͷ੩తίϯςϯπͷ഑৴ • unicorn ͷ worker਺ 1 -> 8 ʹ૿΍ͨ͠ https://flic.kr/p/kwpHnK
  3. mysql ͔Β redis ΁ • footprints (଍͋ͱ) ςʔϒϧͷσʔλ • key

    = “#{ΧϨϯτϢʔβ}:#{๚໰Ϣʔβ}” • value = ๚໰࣌ؒ https://flic.kr/p/edctkJ
  4. ࡉ͔͍मਖ਼Ͱ఺ΛՔ͙ • app - mysql ͷ unix ιέοτ઀ଓ • session

    store Λ Redis ʹม͑Δ https://flic.kr/p/7Guxgu
  5. ࢒Γ1࣌ؒ • 10ҐҎ಺ʹೖͬͯͳ͔ͬͨ • εΩʔϚมߋʹ͸खΛग़ͯ͠ͳ͔ͬͨ • join Λͳͨ͘͢Ίͷඇਖ਼نԽ • comments

    ςʔϒϧʹ entry_user_id Λ௥Ճ • ࢒Γ30෼ҐͰ࣮૷׬ྃͯ͠ϕϯνϚʔΫΛ·Θͨ͠ https://flic.kr/p/bhXKeg
  6. ·ͱΊ • ָ͔ͬͨ͠ʂ • ΧʔωϧɺωοτϫʔΫɺDB౳ ษڧʹͳͬͨ • GCE ॳΊ͚ͯͩͬͨͲɺ࢖͍΍͔ͬͨ͢ •

    ෳ਺ਓ͕ಉ͡αʔόͰίʔυमਖ਼͢Δͷμϝ • དྷ೥͋Ε͹ ·ͨνϟϨϯδ͍ͨ͠ https://flic.kr/p/5mHpwt