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

コンテナ母艦サーバが 突然停止しても障害にならない、 そうマネクラならね

ry023
May 23, 2018

コンテナ母艦サーバが 突然停止しても障害にならない、 そうマネクラならね

yymtg#2で登壇発表した資料です

ry023

May 23, 2018
Tweet

More Decks by ry023

Other Decks in Technology

Transcript

  1. 'BTU$POUBJOFSͷߏ੒ DPNQVUF $.%# $PSF"1* 4UPSBHF OGT OGT DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ

    3FWFSTF 1SPYZ ࣮ࡍίϯςφ͕ىಈ͢Δ฼؋αʔό ίϯςφͷ৘ใΛ؅ཧˠ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF OHJOY OHJOY OHJOY $MJFOU
  2. 'BTU$POUBJOFSͷߏ੒ DPNQVUF $.%# $PSF"1* 4UPSBHF OGT OGT DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ

    Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF 3FWFSTF 1SPYZ 4UPSBHF OGT OGT Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ $MJFOU ίϯςφىಈ͢Δ αʔό͕Ͳ͔͜ࢀর
  3. 'BTU$POUBJOFSͷߏ੒ DPNQVUF $.%# $PSF"1* 4UPSBHF OGT OGT DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ

    Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF 3FWFSTF 1SPYZ 4UPSBHF OGT OGT Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ $MJFOU ίϯςφىಈ͢Δ αʔό͕Ͳ͔͜ࢀর DPNQVUFͰىಈ
  4. 'BTU$POUBJOFSͷߏ੒ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT DPOUBJOFS IPTUDPNQVUF

    ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ϦΫΤετΛड͚ͯىಈ͢Δ 3FWFSTF 1SPYZ 4UPSBHF OGT OGT Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ $MJFOU
  5. 'BTU$POUBJOFSͷߏ੒ DPNQVUF $.%# $PSF"1* $MJFOU DPOUBJOFS DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ DPNQVUF

    3FWFSTF 1SPYZ 4UPSBHF OGT OGT Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ ผͷαʔόͰىಈ͢ΔΑ͏ ॻ͖׵͑ͯΈΔͱ
  6. 'BTU$POUBJOFSͷߏ੒ DPNQVUF $.%# $PSF"1* $MJFOU DPOUBJOFS DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ DPNQVUF

    DPOUBJOFS 3FWFSTF 1SPYZ 4UPSBHF OGT OGT Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ ผͷαʔόͰىಈ͢ΔΑ͏ ॻ͖׵͑ͯΈΔͱ
  7. ΋͠ఀࢭͨ͠Βʁ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT DPOUBJOFS IPTUDPNQVUF

    ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF 3FWFSTF 1SPYZ $MJFOU
  8. ΋͠ఀࢭͨ͠Βʁ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT DPOUBJOFS IPTUDPNQVUF

    ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ʊਓਓਓਓਓਓʊ ʼɹಥવͷࢮɹʻ ʉ:?:?:?:?:ʉ 3FWFSTF 1SPYZ $MJFOU
  9. ΋͠ఀࢭͨ͠Βʁ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT DPOUBJOFS IPTUDPNQVUF

    ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ʊਓਓਓਓਓਓਓਓਓਓʊ ʼɹ#BE(BUFXBZʻ ʉ:?:?:?:?:?:?:?:ʉ ʊਓਓਓਓਓਓʊ ʼɹಥવͷࢮɹʻ ʉ:?:?:?:?:ʉ 3FWFSTF 1SPYZ $MJFOU
  10. ϨίʔυΛॻ͖׵͑Ε͹෮چ͸Մೳ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT DPOUBJOFS IPTUDPNQVUF

    ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ؅ཧऀʹΑΔ ෮چΦϖ ଞͷαʔόͰىಈ͢ΔΑ͏ ॻ͖׵͑Δ 3FWFSTF 1SPYZ $MJFOU
  11. ϨίʔυΛॻ͖׵͑Ε͹෮چ͸Մೳ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT DPOUBJOFS IPTUDPNQVUF

    ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ؅ཧऀʹΑΔ ෮چΦϖ ଞͷαʔόͰىಈ͢ΔΑ͏ ॻ͖׵͑Δ DPOUBJOFS 3FWFSTF 1SPYZ $MJFOU
  12. 3FWFSTF 1SPYZ ࣗಈ࠶഑ஔ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT

    DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ϓϩΩγલʹ 5$1ϙʔτνΣοΫ DIFDL $MJFOU
  13. 3FWFSTF 1SPYZ ࣗಈ࠶഑ஔ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT

    DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ϓϩΩγલʹ 5$1ϙʔτνΣοΫ ଞͷαʔόͰىಈ͢ΔΑ͏ ॻ͖׵͑Δ DIFDL ࢮΜͰͨΒ Ϩίʔυॻ׵ $MJFOU
  14. 3FWFSTF 1SPYZ ࣗಈ࠶഑ஔ DPNQVUF $.%# $PSF"1* 4UPSBHF DPOUBJOFS OGT OGT

    DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF ଞͷαʔόͰىಈ͢ΔΑ͏ ॻ͖׵͑Δ DPOUBJOFS $MJFOU
  15. BDDFTT@IPPL r = Nginx::Request.new backend = r.var.backend port = r.var.server_port

    # ϓϩΩγઌͷTCPϙʔτνΣοΫ unless FastRemoteCheck.new('127.0.0.1', 0, backend, port.to_i, 1).connectable? Jardin.relocation_container(r.var.cid) # CoreAPI΁ίϯςφͷϨίʔυॻ׵໋͑ྩ Nginx.redirect "#{r.var.scheme}://#{r.var.http_host}#{r.var.request_uri}", Nginx::HTTP_MOVED_TEMPORARILY end NSVCZ@BDDFTT@IBOEMFSʹUDQνΣοΫΛ௥Ճͨ͠
  16. NSVCZGBTUSFNPUFDIFDL wߴ଎ʹ5$1ϙʔτνΣοΫͰ͖ΔNSCHFN CZ!NBUTVNPUPSZ  wϢʔβϥϯυͰ5$1ελοΫΛ࣮૷͠ύέοτͰߴ଎ʹϙʔτ νΣοΫՄೳ ϙʔτνΣοΫճ਺ 'BTU3FNPUF$IFDL DPOOFDU TZTDBMM

     TFD TFD  TFD NTFD  TFD ஗ͯ͘ܭଌෆՄ Ҿ༻IUUQICNBUTVNPUPSKQFOUSZ
  17. 3FWFSTF 1SPYZ ࠶ىಈͯ͠Δؒ͸ผͷαʔό΁ DPNQVUF 4UPSBHF DPOUBJOFS OGT OGT Ϣʔβͷ ίϯςϯπ

    WBSXXX഑Լ DPNQVUF MAINTENANCE DPOUBJOFS wϝϯςର৅ͷOHJOYΛHSBDFGVMMZʹఀࢭ͢Δ w͋ͱ͸উखʹଞͷՔಇ͍ͯ͠Δαʔόʹίϯςφ͕ىಈ͢Δ $MJFOU
  18. 3FWFSTF 1SPYZ ࠶ىಈͯ͠Δؒ͸ผͷαʔό΁ 4UPSBHF OGT OGT Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ DPNQVUF

    DPOUBJOFS wϝϯςର৅ͷOHJOYΛHSBDFGVMMZʹఀࢭ͢Δ w͋ͱ͸উखʹଞͷՔಇ͍ͯ͠Δαʔόʹίϯςφ͕ىಈ͢Δ DPNQVUF $MJFOU
  19. 3FWFSTF 1SPYZ DPNQVUF 4UPSBHF DPOUBJOFS OGT OGT Ϣʔβͷ ίϯςϯπ WBSXXX഑Լ

    DPNQVUF wϝϯςର৅ͷOHJOYΛHSBDFGVMMZʹఀࢭ͢Δ w͋ͱ͸উखʹଞͷՔಇ͍ͯ͠Δαʔόʹίϯςφ͕ىಈ͢Δ ࠶ىಈͯ͠Δؒ͸ผͷαʔό΁ DPOUBJOFS MAINTENANCE $MJFOU
  20. 3FWFSTF 1SPYZ ಈతʹෛՙ෼ࢄ DPNQVUF $.%# $PSF"1* DPOUBJOFS IPTUDPNQVUF ίϯςφͷ৘ใ DPNQVUF

    DPNQVUFʹߦͬͨํ͕ ྑͦ͞͏ʂ࠶഑ஔʂ ߴෛՙ ͍͍ײ͡ʹ ෛՙΛܭଌ͠࠶഑ஔ DPOUBJOFS ܭଌ QSPNFUIFVT $MJFOU