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

KARTEを支えるAutoScaling~SpotInstance編

tik-son
July 06, 2016

 KARTEを支えるAutoScaling~SpotInstance編

【トレタ×プレイド】TechBlog Deep Dive Meetup #1 〜インフラ編〜
http://plaidtech.connpass.com/event/33511/

で話したこと。
spotInstanceを頑張って使っている話とか、Autoscaling周りのお話とか

tik-son

July 06, 2016
Tweet

More Decks by tik-son

Other Decks in Technology

Transcript

  1. • onedmandͷ1/3 ʙ 1/5 ͙Β͍ͷՁ֨ͰΠϯελϯεΛར༻Ͱ͖Δ • ೖࡳՁ֨ ≧ ࢢ৔Ձ֨ →ɹSpotΠϯελϯεΛಈ͔ͤΔ

    • ೖࡳՁ֨ < ࢢ৔Ձ֨ → spotΠϯελϯεར༻Ͱ͖ͳ͍ɻՔಇதͷΠϯελϯεΛམͱ͞ ΕΔ • ىಈઃఆʹೖࡳՁ֨Λઃఆ͢Δ͚ͩͰAutoscalingܦ༝Ͱ؆୯ʹར༻Ͱ͖Δ Spot Instance ೖࡳՁ֨
  2. spot Group • ϝΠϯͰ࢖͏ • SpotInstance͕ىಈ • ೖࡳՁ֨͸ondemand ͷՁ֨ •

    αϒͰ࢖͏ • ondemandInstance ͕ىಈ ondemand Group ੾Γସ͑ static Group • ৗʹҰఆ୆਺͕ىಈ • ondemandInstance͕ ىಈ ༻ҙ͢Δͷ͸3छྨͷAutoscalingGroup
  3. ondemand Group spot Group • αϒͰ࢖͏ • ondemandInstance ͕ىಈ ීஈ

    ೖࡳՁ֨ ≧ ࢢ৔Ձ֨ͷ࣌ static Group • ৗʹҰఆ୆਺͕ىಈ • ondemandInstance͕ ىಈ • ϝΠϯͰ࢖͏ • SpotInstance͕ىಈ • ೖࡳՁ֨͸ondemand ͷՁ֨
  4. ondemand Group spot Group • αϒͰ࢖͏ • ondemandInstance ͕ىಈ ࢢ৔Ձ্֨ঢ࣌

    ೖࡳՁ֨ ≧ ࢢ৔Ձ֨ → ೖࡳՁ֨ < ࢢ৔Ձ֨ static Group • ৗʹҰఆ୆਺͕ىಈ • ondemandInstance͕ ىಈ ੾Γସ͑ • ϝΠϯͰ࢖͏ • SpotInstance͕ىಈ • ೖࡳՁ֨͸ondemand ͷՁ֨
  5. ondemand Group spot Group • αϒͰ࢖͏ • ondemandInstance ͕ىಈ ࢢ৔Ձ֨௿Լ࣌

    ೖࡳՁ֨ < ࢢ৔Ձ֨ → ೖࡳՁ֨ ≧ ࢢ৔Ձ֨ static Group • ৗʹҰఆ୆਺͕ىಈ • ondemandInstance͕ ىಈ ੾Γସ͑ • ϝΠϯͰ࢖͏ • SpotInstance͕ىಈ • ೖࡳՁ֨͸ondemand ͷՁ֨
  6. on demand Group spot Group • αϒͰ࢖͏ • ondemandInstance ͕ىಈ

    static Group • ৗʹҰఆ୆਺͕ىಈ • ondemandInstance͕ ىಈ 3छྨͷάϧʔϓΛ࢖͍෼͚ͯ·͢ ੾Γସ͑ • ϝΠϯͰ࢖͏ • SpotInstance͕ىಈ • ೖࡳՁ֨͸ondemand ͷՁ֨
  7. Termination Reason:Server.InternalError ͋Δ೔Πϯελϯε͕ىಈ͞Εͳ͘ͳͬͨ ͜ͷmessage͕ίϯιʔϧͷΞΫςΟϏςΟཤྺʹ Launching a new EC2 instance: i-xxxxxxx.

    Status Reason: Instance became unhealthy while waiting for instance to be in InService state. Termination Reason: Server.InternalError why!? αϙʔτʹฉ͍ͯΈͨɻ