Skip to content

Instantly share code, notes, and snippets.

View smly's full-sized avatar
👁️‍🗨️

smly smly

👁️‍🗨️
View GitHub Profile
@iwiwi
iwiwi / jlog.py
Created June 5, 2016 02:25
Python implementation of JLOG (cpp-json-logger)
# Copyright 2016, Takuya Akiba
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above

http://ameblo.jp/principia-ca/entry-11573342807.html

  1. 復帰した旧masterが新masterになるわけじゃないんで「フェイルバック」 ではない感。
  2. sentinel 1台だと誤検知してもFOしちゃうので怖い。別ラックとかで複数sentinel配置すべきじゃないかなぁ。
  3. alias_ip_change.shは非常にまずい気がして、引数全く見てないのでFOが発動したときと完了したときの2回IP Alias切り替えちゃう。つまり元に戻るので落ちたmasterにVIPが付いちゃうんじゃないかなぁ?
  4. あとip addr del/addしたときって他サーバー/スイッチのarpテーブル/FDB更新されるんだっけ? Gratuitous ARP送ったほうがいいような気がするけどどうだろう?
  5. 注意点1はそんなことはなくて、ちゃんと引数をみてroleがleaderでstateがendのときだけVIPの移動処理すればOK 引数の説明はsentinel.confに書いてある