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

エキサイトブログ刷新に向けて

 エキサイトブログ刷新に向けて

JJUG CCC 2021 Fallの際の資料です

Naka Sho

June 29, 2023
Tweet

More Decks by Naka Sho

Other Decks in Technology

Transcript

  1. ໨࣍ 1. ໨࣍ 2. ࣗݾ঺հ 3. ୲౰͢Δ࢓ࣄ 4. લʹਐΉͨΊʹϦϏϧυ 5.

    ؅ཧը໘͕4ͭ͋Δ? 6. web໘͕4ͭ͋Δ? 7. api͕2ͭ͋Δ? 8. DBͷ਺चͭͳ͗ߏ੒?? 9. ετΞυϓϩγʔδϟʔ?? 10. ·ͱΊ 11. DBͷ઀ଓΛapiʹҰຊԽ
  2. ࣗݾ঺հ 2011/03 ෱Ԭେֶଔۀ 2011/04 தখSIer 2015/01 ্৔webܥ 2020/10 ΤΩαΠτೖࣾ ...ࠓʹࢸΔ

    தඌਖ਼߶(33ࡀ) όοΫΤϯυΤϯδχΞ ಛٕɿϩʔυόΠΫ झຯɿےτϨ - ϕϯνϓϨεɿ70kg - εΫϫοτɿ100kg - σουϦϑτɿ????
  3. ؅ཧը໘͕4ͭ͋Δ???? • چچ؅ཧը໘ ◦ ࠷ݹͷ؅ཧը໘ɻ༗ࣝऀ͕͓Βͣɺϝϯςφϯε͕Ͱ͖ͳ͍ɻ • چ؅ཧը໘ ◦ Ұ൪ػೳ͕ͨ͘͞Μ͋ΔɻphpͷಠࣗϑϨʔϜϫʔΫͰ࣮૷͞Ε͍ͯΔɻ •

    ৽؅ཧը໘ ◦ ϞμϯͳσβΠϯͰͰ͖͍ͯΔɻLaravelͰ࣮૷͞Ε͍ͯΔɻ • ύτϩʔϧ؅ཧը໘ ◦ ͪΐͬͱφΠʔϒͳ৘ใΛѻ͑ΔɻphpͷಠࣗϑϨʔϜϫʔΫͰ࣮૷͞Ε͍ͯΔɻ
  4. DB04 DB03 DB02 DB01 DBͷ਺चͭͳ͗ߏ੒ʁ MSSQ L P MSSQ L

    M MSSQ L P MSSQ L M MSSQ L P MSSQ L M MSSQ L P MSSQ L M ϒϩάͷهࣄ਺͸14,000ສΛݱ ࡏ௒͍͑ͯΔɻ 1ͭͷDBͰCRUDͷશͯΛࡹ͘ ͷʹݶք͕͋ΔͨΊDBΛ4෼ׂ ͍ͯ͠Δɻ DB01 → Ϛελʔσʔλ DB02 - 04 → هࣄσʔλ DBͷো֐͕ൃੜͨ͠ࡍΛߟ͑ ͯϓϦϯγόϧ/ϛϥʔϦϯάߏ
  5. ϑΣʔϧΦʔόʔ ࣮ࡍʹϑΣʔϧΦʔόʔ͢Δࡍͷಈ͖ Λઆ໌͠·͢ɻ DB04 DB03 DB02 DB01 MSSQ L P

    MSSQ L M MSSQ L P MSSQ L M MSSQ L P MSSQ L M MSSQ L P MSSQ L M ෛՙ্͕͕Δ
  6. ϑΣʔϧΦʔόʔ ࣮ࡍʹϑΣʔϧΦʔόʔ͢Δࡍͷಈ͖ Λઆ໌͠·͢ɻ DB04 DB03 DB02 DB01 MSSQ L P

    MSSQ L M MSSQ L M MSSQ L P MSSQ L P MSSQ L M MSSQ L P MSSQ L M ϓϦϯγόϧ/ ϛϥʔ͕ೖΕସΘΔ
  7. ϑΣʔϧΦʔόʔ ࣮ࡍʹϑΣʔϧΦʔόʔ͢Δࡍͷಈ͖ Λઆ໌͠·͢ɻ DB04 DB03 DB02 DB01 MSSQ L P

    MSSQ L M MSSQ L M MSSQ L P MSSQ L P MSSQ L M MSSQ L P MSSQ L M ෛՙ্͕͕Δ
  8. ϑΣʔϧΦʔόʔ ࣮ࡍʹϑΣʔϧΦʔόʔ͢Δࡍͷಈ͖ Λઆ໌͠·͢ɻ DB04 DB03 DB02 DB01 MSSQ L P

    MSSQ L M MSSQ L P MSSQ L M MSSQ L M MSSQ L P MSSQ L P MSSQ L M ϓϦϯγόϧ/ ϛϥʔ͕ೖΕସΘΔ ϓϦϯγόϧ/ ϛϥʔ͕ݩ௨Γ
  9. ࣮ࡍͷίʔυ ࣮ࡍͷίʔυ͸ӈʹهࡌ͍ͯ͠Δ DB03ͷcDBͷϓϦϯγόϧ͕DB04- MillerʹҠಈ͍ͯ͠Δͱ[DB04-Miller].c ͡Όͳ͍ͱΞΫηεͰ͖ͳ͍ɻ ͔͠͠ɺίʔυ্Ͱ[DB03].cͱهࡌ͞ Ε͓ͯΓΞΫηεͰ͖ͣɺAPI͸Τ ϥʔͱͳΔɻ DB04 DB03

    MSSQ L M MSSQ L M MSSQ L P MSSQ L P SELECT @id = CASE WHEN '1' THEN '[DB01].a.dbo.XXXXXXX' WHEN '2' THEN '[DB02].b.dbo.XXXXXXX WHEN '3' THEN '[DB03].c.dbo.XXXXXXX WHEN '4' THEN '[DB04].d.dbo.XXXXXXX END [DB04-Miller].c.dbo.XXXXXXX [DB03].c.dbo.XXXXXX
  10. ·ͱΊ • ϦϏϧυͷ໨త ◦ γεςϜͷߏ੒Λγϯϓϧʹɺࠓޙͷ௥Ճ։ൃΛ؆୯ʹʂ ▪ DBͷ઀ଓՕॴΛAPIʹશͯدͤΔ ▪ DBΛΦʔτεέʔϧ͢Δߏ੒ʹ͠ɺΑΓଟ͘ͷPVΛࡹ͘ʂ •

    ࠓͷϑΣʔϧΦʔόʔͷ࢓૊ΈͩͱɺΦʔτεέʔϧͤͣҰ࣌྇͗Ͱ͔͠ͳΒͳ͍ͷͰ ◦ ࠓͷߏ੒Λmaster/slaveߏ੒ʹ ▪ ؅ཧը໘Λ1ͭʹͯ͠ɺγϯϓϧʹɺӡ༻ίετΛݮΒ͢ʂ • چچɺچɺ৽؅ཧը໘ɺύτϩʔϧΛҰͭʹ