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

HerokuでRailsアプリ運用のパフォーマンス、SEO対策

kon_yu
December 04, 2014
2.8k

 HerokuでRailsアプリ運用のパフォーマンス、SEO対策

Salesforce World Tour Tokyo 2014 DevZone で発表した資料

kon_yu

December 04, 2014
Tweet

Transcript

  1. )FSPLVͰ3BJMTΞϓϦӡ༻ͷ
    ύϑΥʔϚϯεɺ4&0ରࡦ
    גࣜձࣾϕετςΟʔνϟʔ
    ࠓɹ༎հ!LPO@ZV

    4BMFTGPSDF8PSME5PVS5PLZP%FW;POF

    View full-size slide

  2. ͸͡Ίʹ
    w 3BJMTͰͷαʔϏεӡ༻ʹ͓͍ͯ
    w ύϑΥʔϚϯεͷվળ
    w 4&0ରࡦ
    w )FSPLVͱී௨ͷ-JOVYαʔόͷ؀ڥͱൺֱ
    w )FSPLVͳΒͰ͸ͷରࡦ
    w ͦͷଞͷ࠷͓ۙؾʹೖΓͷ(FNʹ͍ͭͯ

    View full-size slide

  3. ຊ୊ʹೖΔલʹ

    View full-size slide

  4. ͪΐͬͱΞϯέʔτ
    w ࣗ෼ʹ౰ͯ͸·Δ΋ͷʹखΛ্͛ͯɺ

    গ͠ମΛಈ͔͠·͠ΐ͏
    w 4BMFTGPSDFࣾαʔϏεͷར༻ܦݧΛฉ͖·͢

    View full-size slide

  5. 4BMFTGPSDFͰ࢓ࣄΛ͍ͯ͠Δ

    View full-size slide

  6. GPSDFDPNͰ࢓ࣄΛ͍ͯ͠Δ

    View full-size slide

  7. )FSPLVͰ࢓ࣄΛ͍ͯ͠Δ
    DSFEJUIJSPEVTL

    View full-size slide

  8. "NB[PO8FC4FSWJDF
    Λ࢖ͬͯΔ͚Ͳ༷ࢠΛݟʹདྷͨ
    DSFEJUGVHVUBCFUBJ@TIZBTIJO

    View full-size slide

  9. 8IPBN*
    w ࠓɹ༎հ ίϯɹϢ΢εέ

    w 5XJUUFS!LPO@ZV
    w #FTU5FBDIFS JODɹ$50
    w ΦϯϥΠϯӳޠֶशαʔϏε

    View full-size slide

  10. IUUQTTQFBLFSEFDLDPNLPOZV
    IFSPLVEFXCTQBPXPEBUJGBOTJUBIVB

    View full-size slide

  11. #FTU5FBDIFSͱ͸
    ଞਓӳޠ ࣗ෼ӳޠ
    ڭࡐͰֶΜͰ΋ɺࣗ෼͕࢖Θͳ͍ӳޠΛֶ
    ͹͞ΕΔ
    ࣗ෼͕࿩͢ӳޠΛͦͷ··ӳޠʹ͠
    ͍ͯ͘ͷͰɺ࢖͑Δӳޠֶ͕΂Δ
    طଘͷӳձ࿩αʔϏε #FTU5FBDIFS

    View full-size slide

  12. #FTU5FBDIFSͷϨοεϯϑϩʔ
    2. ߨࢣ͕ఴ࡟ͱԻ੠࿥Ի!
    ͨ͠ʰձ࿩จʱΛ෮श
    1. WritingϨοεϯͰ!
    ࣗ෼ͷʰձ࿩จʱΛ࡞Δ
    3. SkypeϨοεϯͰ!
    ʰϚϯπʔϚϯӳձ࿩ʱ
    Λ࣮ફ
    ͜ͷԫۚͷ
    ճస͕ӳޠ
    ྗΛ্͛Δ

    View full-size slide

  13. ΋͏Ұ౓໨࣍
    w 3BJMTͰͷαʔϏεӡ༻ʹ͓͍ͯ
    w ύϑΥʔϚϯεͷվળ
    w 4&0ରࡦ
    w )FSPLVͱී௨ͷ-JOVYαʔόͷ؀ڥͱൺֱ
    w )FSPLVͳΒͰ͸ͷରࡦ
    w ͦͷଞͷ࠷͓ۙؾʹೖΓͷ(FNʹ͍ͭͯ

    View full-size slide

  14. 6OJDPSOύϑΥʔϚϯεվળ
    w 6OJDPSOͷϓϩηεΛϝϞϦ͕͍ͬͺ͍ͳͬͨ
    Β࠶ىಈ
    w (FNVOJDPSOXPSLFSLJMMFS
    w ͜ΕΛ࢖͏ͱ͜Ζ͸-JOVYɺ)FSPLVڞ௨
    ࢀߟIUUQTHJUIVCDPNL[LVOJDPSOXPSLFSLJMMFS

    View full-size slide

  15. ී௨ͷ-JOVYͷ৔߹
    w (FNpMFʹҎԼΛ௥Ճ
    HFNbVOJDPSOXPSLFSLJMMFS

    View full-size slide

  16. ઃఆϑΝΠϧDPOpHSV
    6OJDPSOTFMGQSPDFTTLJMMFS
    SFRVJSFVOJDPSOXPSLFS@LJMMFS
    !
    .BYSFRVFTUTQFSXPSLFS
    ϦΫΤετ਺Λ্ݶ஋
    VTF6OJDPSO8PSLFS,JMMFS.BY3FRVFTUT
    !
    .BYNFNPSZTJ[F 344
    QFSXPSLFS
    ϝϞϦ࢖༻ྔΛ্ݶ஋
    VTF6OJDPSO8PSLFS,JMMFS0PN




    View full-size slide

  17. )FSPLVͷ৔߹
    w (FNpMFʹҎԼΛ௥Ճ
    HFNbVOJDPSOXPSLFSLJMMFS`
    ˞OHJOYͱಉ͡

    View full-size slide

  18. ઃఆϑΝΠϧDPOpHSV
    SFRVJSFVOJDPSOXPSLFS@LJMMFS
    NBY@SFRVFTU@NJO&/7<6/*$03/@."9@3&26&45@.*/>UP@Jcc
    NBY@SFRVFTU@NBY&/7<6/*$03/@."9@3&26&45@."9>UP@Jcc
    !
    .BYSFRVFTUTQFSXPSLFS
    VTF6OJDPSO8PSLFS,JMMFS.BY3FRVFTUT NBY@SFRVFTU@NJO NBY@SFRVFTU@NBY
    ϝϞϦ࢖༻ྔΛ؀ڥม਺Ͱఆٛ
    PPN@NJO &/7<6/*$30/@00.@.*/>UP@Jcc



    PPN@NBY &/7<6/*$30/@00.@."9>UP@Jcc



    .BYNFNPSZTJ[F 344
    QFSXPSLFS
    VTF6OJDPSO8PSLFS,JMMFS0PN PPN@NJO PPN@NBY

    View full-size slide

  19. )FSPLVͷ৔߹
    w ؀ڥม਺Λ޻෉ͯ͠ɺదਖ਼஋Λݟ͚ͭΔ
    w ͜ΕΛ΍Βͳ͍ͱɺύϥϝλௐ੔ͷͨΊʹ

    ͍͍ͪͪσϓϩΠ͠ͳ͍ͱ͍͚ͳ͍
    w ࢀߟIUUQRJJUBDPN0BLCPXJUFNT
    FGEGDCF

    View full-size slide

  20. 6OJDPSOͷύϑΥʔϚϯε
    w 3VCZ͕ܥҎԼͷ৔߹͸SVCZܥΛ࢖͍·͠ΐ͏
    w 6OJDPSOͷϫʔΧʔ͸ϝϞϦΛϝϞϦ࢖༻ྔͰ࠶ىಈ
    w ($ͷར༻ͰϫʔΧʔ͕௕ੜ͖͢Δ෼ύϑΥʔϚϯε޲্
    w ࢀߟ
    w IUUQTXXXEJHJUBMPDFBODPNDPNNVOJUZUVUPSJBMTIPXUPPQUJNJ[F
    VOJDPSOXPSLFSTJOBSVCZPOSBJMTBQQ
    w IUUQXXXTBXBOPCPMZOFUDPOUSJCVUJPOSVCZPVUPG
    CBOEHD

    View full-size slide

  21. ී௨ͷ-JOVYαʔόͷ৔߹
    w SCFOWͷΠϯετʔϧ
    w SVCZͷΠϯετʔϧ
    w SCFOWJOTUBM

    w SVCZWFSTJPOʹҎԼΛهड़

    View full-size slide

  22. )FSPLVͷ৔߹
    w (FNpMFʹҎԼΛهड़
    SVCZb
    ͱॻ͔͍ͯ)FSPLVʹHJUQVTIͰσϓϩΠ

    ͜Ε͚ͩͰ3VCZͰಈ࡞

    View full-size slide

  23. 3VCZ0VUPG#BOE($
    w σΧΠ($͕૸ΔͱύϑΥʔϚϯεʹӨڹ
    w ϦΫΤετͱϦΫΤετͷؒʹ($Λ૸ΒͤΔɺ
    0VUPG#BOE($Λར༻͢Δ
    w SFGTIUUQXXXTBXBOPCPMZOFU
    DPOUSJCVUJPOSVCZPVUPG
    CBOEHD

    View full-size slide

  24. ઃఆϑΝΠϧ
    w (FNpMF
    SFRVJSFbHDUPPMTPPCHD
    w DPOpHSV
    SFRVJSFHDUPPMTPPCHD
    JGEFpOFE 6OJDPSO)UUQ3FRVFTU

    VTF($00#6OJDPSO.JEEMFXBSF
    FOE

    View full-size slide

  25. 'BTUMZ $%/αʔϏε
    ͷར༻
    w +4 $44 ը૾ͳͲ੩తϑΝΠϧΛ

    ֎෦$%/αʔϏε͔ΒΞΫηε
    w ߴ଎ʹ੩తϑΝΠϧΛΫϥΠΞϯτ΁
    w ΞϓϦέʔγϣϯαʔό΁ͷΞΫηεΛ௿ݮ
    w ݁ՌɺΞϓϦαʔόͷύϑΥʔϚϯεΞοϓ

    View full-size slide

  26. ී௨ͷ-JOVYαʔόͷ৔߹
    w 'BTUMZ$%/ͷར༻͢Δ৔߹ΞΧ΢ϯτΛ࡞ͬͯ
    ΫϨδοτΧʔυΛొ࿥ͯ͠ɺઃఆͯ͠ɾɾɾ
    w ݄ʑͷܾࡁ΋ଞͱผ
    w ൥ࡶɾ໘౗͍͘͞

    View full-size slide

  27. )FSPLVͷ৔߹
    w 'BTUMZΛ)FSPLVͷը໘͔ΒϘλϯҰൃͰ௥Ճ͢
    Δ͚ͩ

    View full-size slide

  28. $034ʹ஫ҙ
    w $SPTT0SJHJO3FTPVSDF4IBSJOH
    w 8FC'POU΍"KBYΛ͠Α͏ͱ͢ΔͱɺηΩϡϦςΟΤϥʔͰϒ
    ϥ΢βʹౖΒΕΔ
    w ϨεϙϯεϔομʔʹҎԼΛ෇Ճͯ͠ճආ
    w "DDFTT$POUSPM"MMPX0SJHJOIUUQXXXCFTUUFBDIFS
    JODDPN
    w *& ҎԼͩͱ"KBY௨৴ͷࡍʹ᠘͕͋ΔͷͰYISKTͳͲͰݕࡧ
    w IUUQRJJUBDPNFEP@NJUFNTEGCBCEBD

    View full-size slide

  29. ϗοτσϓϩΠ
    w ಛʹҰ೔Կ౓΋σϓϩΠ͢Δ৔߹ɺ

    αʔϏεఀࢭɺϨεϙϯε஗Ԇ͸ɺϢʔβʹͱͬ
    ͯ͸৺஍Α͘ͳ͍
    w αʔϏεΛࢭΊΔ͜ͱͳ͘ɺ

    σϓϩΠͨ͠΋ͷ্ཱ͕͕ͪͬͨΒݹ͍αʔϏ
    εͱ੾ΓସΘΔΑ͏ʹ͢Δ

    View full-size slide

  30. ී௨ͷ-JOVYαʔόͷ৔߹
    w (FNDBQJTUSBOPVOJDPSO
    w SFGIUUQLSBZKQCMPHUSPVCMFTIPPUJOH
    SBJMTVOJDPSO
    !
    w ଞʹ΋৭ʑํ๏͕͋Γ·͢

    View full-size slide

  31. )FSPLVͷ৔߹
    w 1SFMPBEͰμ΢ϯλΠϜͳ͠
    w ઃఆํ๏
    IFSPLVGFBUVSFTFOBCMFBNZBQQQSFCPPU
    w ίϚϯυҰൃ௒؆୯

    View full-size slide

  32. H[JQѹॖͯ͠഑৴͢Δ
    w )5.-ɺ$44ɺ+4ςΩετσʔλΛ

    ѹॖͯ͠ૹ৴

    ϨεϙϯελΠϜΛ࡟ݮ
    w $%/αʔϏε΍$MPVE'SPOU࢖༻͍ͯ͠Δ৔߹

    σʔλసૹྔ͕গͳ͍΄͏͕ࡒ෍ʹ΍͍͞͠

    View full-size slide

  33. ී௨ͷ-JOVYͷ৔߹
    w OHJOYͰઃఆ͢Δͱ$POGϑΝΠϧʹ
    H[JQPO
    H[JQ@IUUQ@WFSTJPO
    H[JQ@UZQFTUFYUQMBJO
    UFYUYNM
    UFYUDTT
    BQQMJDBUJPOYNM
    BQQMJDBUJPOYIUNMYNM
    BQQMJDBUJPOSTTYNM
    BQQMJDBUJPOKBWBTDSJQU
    BQQMJDBUJPOYKBWBTDSJQU
    H[JQ@CV⒎FSTL
    H[JQ@NJO@MFOHUI
    H[JQ@DPNQ@MFWFM
    H[JQ@QSPYJFEP⒎
    H[[email protected]*&<>a.P[JMMB
    H[JQ@WBSZP⒎

    View full-size slide

  34. )FSPLVͷ৔߹
    w HFNIFSPLVEFqBUFS
    w H[ѹॖͨ͠)5.-Λฦ͢Α͏ʹ͢Δ
    w (FNpMFʹ௥Ճͯ͋͛͠Δ͚ͩͰ0,
    !
    !
    w ࢀߟIUUQRJJUBDPN0BLCPXJUFNT
    FDDBDDG

    View full-size slide

  35. 4&0ରࡦ
    w -JOVYͩͱ8FCαʔόͷઃఆ͢Δͱ͜Ζ͕ͩɺ

    )FSPLV͸ͦΕ͕ग़དྷͳ͍ͷͰ޻෉͕ඞཁ
    w DBOPOJDBMλάΛ࢖͏৔߹΋͋Δ͕

    ࠓճ͸Ͱ3FEJSFDUͰઆ໌͠·͢

    View full-size slide

  36. SBDLSFXSJUF
    w 3BJMT͸63-ͷ࠷ޙඌʹ͕͋Δ৔߹ɺ3BJMT͸ͷ
    ༗Γແ͠Λٵऩͯ͘͠ΕΔ͕ɺ

    4&0తʹ͖ͭΛ*OEFYJOH͞Εͨ͘ͳ͍৔߹Ϧϥ
    Πτ
    w "QBDIFͱ͔/HJOYΛઃఆͰ͖Ε͹ͦͬͪͷઃఆ
    ϑΝΠϧʹॻ͚Δͱ͜Ζ

    View full-size slide

  37. ઃఆϑΝΠϧDPOpHSV
    SFRVJSFSBDLSFXSJUF
    VTF3BDL3FXSJUFEP
    SS\?
    ^
    FOE

    View full-size slide

  38. YYYIFSPLVBQQDPNΛ

    ϦμΠϨΫτ
    w )FSPLVͷΞϓϦέʔγϣϯ͸ඞͣ
    YYYIFSPLVBQQDPNͱ͍͏63-Λ෇༩
    w ςετͰ࢖͏෼ʹ͸େมศར
    w υϝΠϯΛऔಘͯ͠ຊ൪Ͱ࢖͏ʹ͸ɺ(PPHMF͕
    ొ࿥͞Εͯ͠·͏଀͍΍ͭ

    View full-size slide

  39. BQQMJDBUJPO@DPOUSPMMFSSCʹ

    ௥ه
    ཁ͢ΔʹCFGPSF@pMUFSͰYYYIFSPLVBQQDPN΁ΞΫηε͕དྷͨΒਖ਼͠
    ͍63-΁ϦμΠϨΫτ
    CFGPSF@pMUFSFOTVSF@EPNBJO
    SFEJSFDUGSPNIFSPLVBQQGPS4&0
    EFGFOTVSF@EPNBJO

    SFUVSOVOMFTTaIFSPLVBQQDPNdSFRVFTUIPTU

    QPSU\SFRVFTUQPSU^VOMFTT< >JODMVEF SFRVFTUQPSU

    SFEJSFDU@UP\SFRVFTUQSPUPDPM^\'2%/^\QPSU^
    \SFRVFTUGVMMQBUI^ TUBUVTNPWFE@QFSNBOFOUMZ

    FOE

    View full-size slide

  40. IUUQͱIUUQT͕͋Δ৔߹͸IUUQ
    ʹ౷Ұͯ͠ϦμΠϨΫτ
    CFGPSF@pMUFSEFBDUJWBUF@TTM

    ඞཁͳϝιουʹద༻ͤ͞Δ
    EFGEFBDUJWBUF@TTM

    JG 3BJMTFOWQSPEVDUJPO
    SFRVFTUTTM

    SFEJSFDU@UPQSPUPDPMIUUQ TUBUVT
    NPWFE@QFSNBOFOUMZ

    FOE

    FOE

    View full-size slide

  41. ࠷͓ۙؾʹೖΓͷ(FNͷ঺հ
    w ։ൃɺӡ༻͍ͯ͠Δ্ͰศརͰؾʹೖ͍ͬͯΔ
    (FNΛগ͠঺հ

    View full-size slide

  42. ຊ൪؀ڥͰͷ͏͔ͬΓΛ๷͙
    w HFNSBDLEFWNBSL
    w ݕূ؀ڥͩͱࢥͬͯૢ࡞ͨ͠Β࣮͸ຊ൪؀ڥ

    Ϣʔβ৘ใΛޡͬͯมߋͦ͠͏ʹͳͬͯώϠϦ

    ͜ΜͳώϠϦϋοτΛ๷͙
    !

    View full-size slide

  43. ઃఆ
    w (FNpMFʹ௥هHFNbSBDLEFWNBSL
    w EFWFMPQNFOUSCʹ௥ه

    DPOpHSBDL@EFW@NBSLFOBCMFUSVF

    DPOpHSBDL@EFW@NBSLUIFNF<UJUMF
    3BDL%FW.BSL5IFNF(JUIVC'PSL3JCCPOOFX QPTJUJ
    POSJHIU pYFEUSVF DPMPSbSFE
    >
    w ࢀߟIUUQLPOZVIBUFOBCMPHDPNFOUSZ

    View full-size slide

  44. ϝʔϧ಺༰ΛΩϟϓνϟ
    w (FNMFUUFS@PQFOFS@XFC
    w ։ൃ؀ڥͰૹ৴ϝʔϧΛҰཡͰ಺༰֬ೝ

    View full-size slide

  45. ઃఆ
    w (FNpMFʹ௥هHFNbMFUUFS@PQFOFS@XFC`
    w SPVUFTSCʹ௥ه
    JG3BJMTFOWEFWFMPQNFOU 

    ɹNPVOU-FUUFS0QFOFS8FC&OHJOF BUMFUUFS@PQFOFS

    FOE
    w ࢀߟIUUQRJJUBDPNLTIPHPJUFNTEBFBCC

    View full-size slide

  46. Ұ൪େࣄͳ͓஌Βͤ
    w ϕετςΟʔνϟʔͰ͸ϛυϧ͔ΒγχΞϨϕ
    ϧͷΤϯδχΞΛืू͍ͯ͠·͢
    w )FSPLVΛຊ൪؀ڥͰ࢖͍ͬͯ·͢
    w 8BOUFEMZͰʮϕετςΟʔνϟʔʯͰݕࡧ

    View full-size slide

  47. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠
    ΂ωνΞɾαϯλϧνΞӺલͷΰϛശͰ
    .0σΟεΫΛ୳͢ΪΞονϣͷਅࣅΛ͢Δචऀ

    View full-size slide