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

Make Prott Faster

Make Prott Faster

Sadaaki Hirai

October 15, 2015
Tweet

More Decks by Sadaaki Hirai

Other Decks in Technology

Transcript

  1. ػؿؓ٦وٝأثُ٦صؚٝך䭷ꆙ 鎘庠 ⟎铡 何㊣ ˖ 䱿庠ׅ׷זծ鎘庠ׇ״ ˖ 儗劍㼿傍ז剑黝⻉כ长䝤ך呎彁׌ ˖ 䏝ח⥜姻ׅ׷ךכ皘䨽ך׫

    6/*9ㆸ㷕8JLJQFEJBIUUQTKBXJLJQFEJBPSHXJLJ6/*9ㆸ㷕 سشٕس٥ؙض٦أ8JLJQFEJBIUUQTKBXJLJQFEJBPSHXJLJسشٕس٥ؙض٦أ 剑黝⻉ 䞔㜠䊨㷕 8JLJQFEJBIUUQTKBXJLJQFEJBPSHXJLJ剑黝⻉@ 䞔㜠䊨㷕
  2. user LB sv Amazon S3 CloudFront AP sv AP sv

    DB svs Cache sv Private Network ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF ءأذي圓䧭
  3. ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF /HJOY41%:TQEZDBU TQEZDBUIUUQTQSPUUBQQDPNWO <>/1/TFMFDUOFYUQSPUPDPMUIFSFNPUFTFSWFSPGGFST  TQEZ  IUUQ /1/TFMFDUFEUIFQSPUPDPMTQEZ <>)BOETIBLFDPNQMFUF

    <>SFDW4&55*/(4GSBNFWFSTJPO GMBHT MFOHUI  OJW  <  > <  > <>SFDW8*/%08@61%"5&GSBNFWFSTJPO GMBHT MFOHUI  TUSFBN@JE EFMUB@XJOEPX@TJ[F  <>TFOE4:/@453&".GSBNFWFSTJPO GMBHT MFOHUI  TUSFBN@JE BTTPD@TUSFBN@JE QSJ  IPTUQSPUUBQQDPN NFUIPE(&5 QBUI TDIFNFIUUQT WFSTJPO)551 BDDFQU   BDDFQUFODPEJOHH[JQ EFGMBUF VTFSBHFOUTQEZMBZ
  4. ػؿ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JOFE  UPUBM%PDT&YBNJOFE  ^^
  7. ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF NPOHP%#FYQMBJO ECYYYYGJOE \EFMFUFE@BUOVMM TDSFFO@JE 0CKFDU*E 999999999999 ^ TPSU \@JE

    ^ FYQMBJO FYFDVUJPO4UBUT  \RVFSZ1MBOOFS\ XJOOJOH1MBO\ TUBHF'&5$)  ^ ^  FYFDVUJPO4UBUT\ FYFDVUJPO5JNF.JMMJT  UPUBM,FZT&YBNJOFE  UPUBM%PDT&YBNJOFE  ^^ XJOOJOH1MBOךⰻ㺁׾然钠ׅ׷הծTUBHFָ'&5$)ח ז׏גכְ׷ֽוծTPSUָ⸬ְג׷׌ֽ׏שְկ 嗚稊׃׋JOEFYך侧ה嗚稊׃׋EPDVNFOUך侧ָず♧ חז׏ג׃ת׏גְ׷ךדծJOEFYכ⸬ְגזְկ
  8. ˖ ؎ٝرحؙأ鷄⸇ד何㊣ ECYYYYGJOE \EFMFUFE@BUOVMM TDSFFO@JE 0CKFDU*E 999999999999 ^ TPSU \@JE^

    FYQMBJO FYFDVUJPO4UBUT  \RVFSZ1MBOOFS\ XJOOJOH1MBO\ TUBHF'&5$)  ^ ^  FYFDVUJPO4UBUT\ FYFDVUJPO5JNF.JMMJT  UPUBM,FZT&YBNJOFE  UPUBM%PDT&YBNJOFE  ^^ ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF NPOHP%#FYQMBJO
  9. ˖ JOEFYך鷄⸇ ˖ NPEFMחJOEFYך㹀纏׾鷄⸇ ˖ $BQJTUSBOPדEFQMPZׁ׸׷הず儗ח
 JOEFYָ䓸׷Ⳣ椚ָ㹋遤ׁ׸׷״ֲח׃גְ׷կ ˖ JOEFYך⵴ꤐ ˖

    NPEFMךJOEFYך㹀纏׾嶊ׅ ˖ $BQJTUSBOPדEFQMPZׁ׸׷הず儗ח
 JOEFYָ⵴ꤐׁ׸׷״ֲח׃גְ׷կ ػؿؓ٦وٝأ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QSPG

    SFRVJSF'JMFFYQBOE@QBUI DPOGJHFOWJSPONFOU @@'*-&@@  VTF4UBDL1SPG.JEEMFXBSF FOBCMFEUSVF  NPEFDQV  SBXUSVF  JOUFSWBM  TBWF@FWFSZ SVO3BJMTBQQMJDBUJPO
  13. ˖ TUBDLQSPGד鍑匿ׅ׷ ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 3VCZPO3BJMT鎘庠TUBDLQSPG TUBDLQSPGUNQTUBDLQSPGDQV EVNQUFYUMJNJU  .PEFDQV  

    4BNQMFT NJTTSBUF  ($    505"- QDU 4".1-&4 QDU '3".&     1TZDI4DBMBS4DBOOFSUPLFOJ[F
  14. ˖ CVMMFU ˖ O ׾嗚⳿׃גֻ׸׷ ˖ NPOHPJEח׮㼎䘔׃גְ׷ ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 3VCZPO3BJMT鎘庠CVMMFU <*/'0>/

    2VFSZ1"5)@*/'0QPTUT NPEFM1PTUBTTPDJBUJPOT<DPNNFOUT> "EEUPZPVSGJOEFSJODMVEF<DPNNFOUT>
  15. ˖ ًٌ⻉ ˖ ⡦䏝׮《䖤׃גְ׷ؔـآؙؑز׾ًٌ⻉ ˖ / ㉏겗ך鍑嶊 ˖ JODMVEFך鋅湫׃ ˖

    ♶銲זر٦ة׾《䖤׃זְ״ֲח ˖ 醱侧㔐涪遤ׁ׸גְ׋ؙٔؒأز׾אח ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 3VCZPO3BJMT何㊣
  16. ˖ 鎘庠 ˖ +40/ך欰䧭 KCVJMEFS ָ鹼ְ ˖ ⟎铡 ˖ +40/ךٓ؎ـָٓٔ鹼ְךדכזְַ

    ˖ 何㊣ ˖ +40/ٓ؎ـٓٔ׾ְ׹ְ׹㢌ִג׫׷ ˖ ד׮㣐׃ג㢌⻉ָזְ ˖ ⾱㔓 ˖ 7JFXַ׵%#פָؙؒٔ涪遤ׁ׸גְ׋ ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 3VCZPO3BJMT何㊣ד㣟侁׃׋ֿה
  17. ˖ $BDIF ˖ 鹼ְךכ+40/ 7JFX ַ׵ָؙؒٔ涪遤ׁ׸גְ׷׋׭׌׏׋˘կ ˖ NPOHPJE׾⢪׏גְ׷ֿה׮֮׶ծ7JFXַ׵ךؙؒٔ׾乎徦דֹז ַ׏׋ ˖

    3VTTJBO%PMM$BDIJOH׾⢪׏׋ ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 3VCZPO3BJMT何㊣ :PVNBZXBOUUPOFTUDBDIFEGSBHNFOUTJOTJEFPUIFSDBDIFE GSBHNFOUT5IJTJTDBMMFE3VTTJBOEPMMDBDIJOH
 5IFBEWBOUBHFPG3VTTJBOEPMMDBDIJOHJTUIBUJGBTJOHMF QSPEVDUJTVQEBUFE BMMUIFPUIFSJOOFSGSBHNFOUTDBOCF SFVTFEXIFOSFHFOFSBUJOHUIFPVUFSGSBHNFOU
  18. ˖ 3VTTJBO%PMM$BDIJOH ˖ ꟼ鸬ׅ׷ٌرٕחUPVDIUSVF׾鷄⸇ ˖ ꟼ鸬ׅ׷ٌرָٕ刿倜ׁ׸׷ה荈⹛涸חٍؗحءָُ灶唱ׁ׸׷ ˖ KTPODBDIFדٍؗحءُׅ׷ ˖ וֲ׃״ֲ׮זְהֿ׹כ䩛⹛ד⵴ꤐ

    ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 3VCZPO3BJMT鎘庠3VTTJBO%PMM$BDIJOH NPEFM CFMPOHT@UPQSPKFDU UPVDIUSVF KTPODBDIF<W !QFSTPO> FYQJSFT@JONJOVUFTEP KTPOFYUSBDU!QFSTPO OBNF BHF FOE 3BJMTDBDIFEFMFUF@NBUDIFEKCVJMEFS\YYYY^ 
  19. ˖ 暴חꅾַ׏׋ךכ1$װJ1BEךفٗآؙؑز ˖ أؙٗ٦ָָٕ׋אֻ ˖ 歗⫷ך-BZPVU1BJOUָꅾַ׏׋ ˖ $ISPNF%FW5PPMTךUJNFMJOF׾⢪׏ג鎘庠 ˖ 歗⫷׾簭㼭׃ג邌爙׃גְ׷鿇ⴓָꅾַ׏׋

    ˖ أؙٔ٦ٝ♧鋮ך+4כꅾֻזַ׏׋ ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 'SPOUFOE鎘庠 8IBUTOFXJO$ISPNF%FW5PPMT 4QFBLFS%FDLIUUQTTQFBLFSEFDLDPNBEEZPTNBOJXIBUTOFXJODISPNFEFWUPPMT 1SPMF]8FC5PPMT(PPHMF%FWFMPQFSTIUUQTEFWFMPQFSTHPPHMFDPNXFCUPPMTDISPNFEFWUPPMTQSPMF
  20. ˖ 鑐׃חUSBOTGPSN⢪׏ג(16⢪׏ג׫׋ ˖ ׍׳׏ה鑐׃ג׫׋ַ׏׋ ˖ 鸞ֻז׏׋ֽו呎劤涸ז鍑寸ׄׯזְ˘ ˖ /HJOYד簭㼭׃׋؟؎ؤך歗⫷׾欰䧭ׅ׷ֿהח ˖ OHY@TNBMM@MJHIU

    ˖ 歗⫷פךⴱ㔐ؙٔؒأز儗ח䭷㹀ׁ׸׋؟؎ؤך 歗⫷׾欰䧭׃ٍؗحءُׅ׷ ػؿؓ٦وٝأثُ٦صؚٝ*OGSBTUSVDUVSF 'SPOUFOE何㊣
  21. ˖ ؎ٝؿٓ׾ؕٔؕٔחثُ٦صؚٝ ˖ )551 ˖ J04"OESPJEך何㊣ ˖ 婍׏גְ׷نزٕطحؙך剑黝⻉ ˖ /

    乎徦崞⹛ ˖ 3BJMTךٖ؎َד㼎䘔דֹ׷֮׸ֿ׸ ˖ TJUFTQFFEJPהַ
 תה׭ ➙䖓《׶穈׫׋ְֿה 4JUFTQFFEJP"OBMZ[FZPVSXFCTJUFTQFFEBOEQFSGPSNBODFIUUQTXXXTJUFTQFFEJP HSBQIJUF HSBGBOB TJUFTQFFEJP EJBNPOEד竰竲8FCػؿؓ٦وٝأٌصةؚٔٝ2JJUBIUUQRJJUBDPN+YDL@JUFNTBCGBGEEDDCGE