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

サーキットブレーカー 〜 有料契約店舗数 国内 No.1 ECサービスに神を宿す 〜 / pepabo_ec_tech_mtg01

サーキットブレーカー 〜 有料契約店舗数 国内 No.1 ECサービスに神を宿す 〜 / pepabo_ec_tech_mtg01

2017/03/09 第1回 EC事業部 Tech MTG

Akihito Nakano

March 09, 2017
Tweet

More Decks by Akihito Nakano

Other Decks in Programming

Transcript

  1. த໺ڿਓ(.01&1"#0JOD
    ୈճ&$ࣄۀ෦5FDI.5(
    αʔΩοτϒϨʔΧʔ
    ʙ༗ྉܖ໿ళฮ਺ࠃ಺/P&$αʔϏεʹਆΛ॓͢ʙ

    View full-size slide

  2. 8ΞϓϦέʔγϣϯΤϯδχΞ
    &$ࣄۀ෦Χϥʔϛʔγϣοϓάϧʔϓ
    த໺ڿਓ ͖͋ͬʔ
    !/","/0@"LJIJUP
    ಛ߈ୂνʔϜ
    IUUQTBDLJOUPTIHJUIVCJP

    View full-size slide

  3. ಛ߈ୂ
    νʔϜ

    View full-size slide

  4. ܅΋ಛ߈ୂνʔϜͰಇ͔ͳ͍͔ʁ
    ࠷৽৘ใΛνΣοΫˠ DPMPSNF@TVJDJEFTRVBE

    View full-size slide

  5. Χϥʔϛʔγϣοϓ"1*Λத৺ʹͨ͠ܗଶʹ
    γϑτ͍ͯ͘͠
    ΧϥʔϛʔγϣοϓAPIʹڧ͘ґଘ͢Δ
    ˣ

    View full-size slide

  6. "1*Λத৺ʹ༷ͨ͠ࢠ

    View full-size slide

  7. "1*ͷෛՙ͕ߴ·Δ

    View full-size slide

  8. "1*ʹґଘ͢ΔαϒγεςϜͷෛՙ΋ߴ·Δ

    View full-size slide

  9. Χεέʔυো֐
    IUUQEFWFMPQFSTMJOFDPSQDPNCMPHKB Q
    ෼ࢄαʔϏε؀ڥ΁ͷ$JSDVJU#SFBLFSͷద༻-*/&&OHJOFFST`#MPH
    IUUQTFOXJLJQFEJBPSHXJLJ$BTDBEJOH@GBJMVSF
    $BTDBEJOHGBJMVSF8JLJQFEJB

    View full-size slide

  10. αʔΩοτϒϨʔΧʔͰো֐ͷ࿈࠯Λ๷͙

    View full-size slide

  11. ͜ͷൃදͷΰʔϧ
    wαʔΩοτϒϨʔΧʔͷඞཁੑΛڞ༗Ͱ͖ͯΔ͜ͱ
    wαʔΩοτϒϨʔΧʔͷ࢓૊ΈΛڞ༗Ͱ͖ͯΔ͜ͱ
    w(anesha Λ࠾༻͢Δ΂͖ཧ༝Λڞ༗Ͱ͖ͯΔ͜ͱ

    View full-size slide

  12. αʔΩοτϒϨʔΧʔͱ͸
    IUUQTKBXJLJQFEJBPSHXJLJαʔΩοτϒϨʔΧʔ੍౓
    גࣜࢢ৔΍ઌ෺औҾʹ͓͍ͯՁ͕֨ҰఆҎ্ͷมಈΛىͨ͜͠৔߹ʹɺ
    ڧ੍తʹऔҾΛࢭΊΔͳͲͷાஔΛͱΔ੍౓Ͱ͋Δɻ
    ిྲྀ͕ྲྀΕա͗ͨ࣌ʹɺൃ೤ͳͲΛ৯͍ࢭΊΔిݯΛམͱ͢ిؾճ࿏ͷःஅثʢαʔΩοτ
    ϒϨʔΧʔʣͱࣅ͍ͯΔ੍౓Ͱ͋ΔͨΊɺ͜ͷΑ͏ʹݺ͹ΕΔ
    IUUQTKBXJLJQFEJBPSHXJLJःஅث
    ःஅثʢ͠ΌͩΜ͖ɺӳදهɿ$JSDVJU#SFBLFSʣ͸ɺిྗճ࿏ɾిྗػثͷਖ਼ৗಈ࡞࣌ͷෛՙిྲྀΛ
    ։ด͢Δͱͱ΋ʹɺอޢܧిثͱ࿈ܞͯ͠ࣄނిྲྀʢಛʹ୹བྷࣄނిྲྀʣͳͲΛःஅ͢Δ͜ͱʹΑΓ
    ෛՙଆͷઃඋΛอޢ͠ɺ্ྲྀଆ΁ͷࣄނ೾ٴΛ๷ࢭ͢Δ։ดثͰ͋Δɻ
    IUUQTXXXQIPUPBDDPNNBJOEFUBJM

    View full-size slide

  13. αʔΩοτϒϨʔΧʔͱ͸

    View full-size slide

  14. αʔΩοτϒϨʔΧʔͱ͸
    ϑΣΠϧϑΝετ

    View full-size slide

  15. αʔΩοτϒϨʔΧʔͱ͸
    $JSDVJU#SFBLFS
    IUUQTNBSUJOGPXMFSDPNCMJLJ$JSDVJU#SFBLFSIUNM
    .BLJOHUIF/FUqJY"1*.PSF3FTJMJFOU
    IUUQUFDICMPHOFUqJYDPNNBLJOHOFUqJYBQJNPSFSFTJMJFOUIUNM
    ϒϩά

    View full-size slide

  16. αʔΩοτϒϨʔΧʔͱ͸
    IUUQTNBSUJOGPXMFSDPNCMJLJ$JSDVJU#SFBLFSIUNM
    w αʔΩοτϒϨʔΧʔ͕ϦϞʔτίʔϧΛ؂ࢹ͢Δ
    w ࣦഊ਺͕ᮢ஋ʹୡͨ͠Β࡞ಈ͢Δ
    w Ҏ߱͸αʔΩοτϒϨʔΧʔ͕ΤϥʔΛฦ͢

    View full-size slide

  17. αʔΩοτϒϨʔΧʔͱ͸
    IUUQTNBSUJOGPXMFSDPNCMJLJ$JSDVJU#SFBLFSIUNM
    w ͭͷঢ়ଶ
    w $MPTFE
    w 0QFO
    w )BMG0QFO

    View full-size slide

  18. αʔΩοτϒϨʔΧʔͷ࣮૷
    wIUUQTHJUIVCDPN/FUqJY)ZTUSJY
    wIUUQTHJUIVCDPNMJOFBSNFSJB
    wIUUQTHJUIVCDPNDPPLQBEFYQFEJUPS
    wIUUQTHJUIVCDPNFKTNPOUBSUVSQIQDJSDVJUCSFBLFS

    View full-size slide

  19. αʔΩοτϒϨʔΧʔͷ؊
    w ੒ޭʗࣦഊΛΧ΢ϯτ
    w Τϥʔ཰
    w Τϥʔ਺
    w ͭͷঢ়ଶ
    w $MPTFE 0QFO )BMG0QFO
    w ো֐ͷݕग़ʗ෮چͷ൑அΛγϯϓϧʹݡ͘
    w αʔΩοτϒϨʔΧʔ͕ϘτϧωοΫʹͳͬͯ͠·ͬͨΒຊ຤స౗

    View full-size slide

  20. (BOFTIB
    IUUQTHJUIVCDPNBDLJOUPTIHBOFTIB
    w (BOFTIB Ψωʔγϟ

    w ώϯυΡʔڭͷਆ༷
    w 1)1
    w Τϥʔ཰

    View full-size slide

  21. (BOFTIB
    $ganesha = Ackintosh\Ganesha\Builder::build([
    ‘failureRate’ => 50,
    ‘minumumRequests’ => 100,
    ]);
    if ($ganesha->isAvailable(‘serviceName’)) {
    try {
    Api::request();
    $ganesha->success(‘serviceName’);
    } catch (Api\ServiceUnavailableException $e) {
    $ganesha->failure(‘serviceName’);
    }
    }

    View full-size slide

  22. σϞ
    IUUQTHJUIVCDPNBDLJOUPTIHBOFTIBUSFFNBTUFSFYBNQMFT
    σϞͰ࢖ͬͨεΫϦϓτ

    View full-size slide

  23. (BOFTIB
    w͍ͭ࡞ಈͨ͠ͷ͔ ऩଋͨ͠ͷ͔
    ೺Ѳ͍ͨ͠
    w೚ҙͷॲཧΛϑοΫͰ͖ΔͷͰϩάʹు͘͜ͱ΋Ͱ͖Δ
    w(BOFTIB͕ར༻͢ΔετϨʔδͰো֐͕ى͖ͨΒʁ
    wԿ΋͠ͳ͍ɻϦΫΤετΛڐՄ͚ͭͮ͠Δɻ ϑΣΠϧαΠϨϯτ

    w೚ҙͷॲཧΛετϨʔδো֐ʹϑοΫͰ͖ΔͷͰϩάʹు͘͜ͱ΋Ͱ͖Δ
    wͦͷଞͷΞϐʔϧϙΠϯτ
    wϓϥΨϒϧͳΞμϓλʔ
    w૾ͷΩϟϥΫλʔ͕1)1ʹ߹ͬͯΔ
    w໊લ͕ྑ͍
    wਆ༷

    View full-size slide

  24. ༗ྉܖ໿ళฮ਺ࠃ಺/P&$αʔϏε
    ʹ
    ਆΛ॓͢

    View full-size slide

  25. ͜ͷൃදͷΰʔϧ
    wαʔΩοτϒϨʔΧʔͷඞཁੑΛڞ༗Ͱ͖ͯΔ͜ͱ
    wαʔΩοτϒϨʔΧʔͷ࢓૊ΈΛڞ༗Ͱ͖ͯΔ͜ͱ
    w(anesha Λ࠾༻͢Δ΂͖ཧ༝Λڞ༗Ͱ͖ͯΔ͜ͱ

    View full-size slide