Help us understand the problem. What is going on with this article?

Serfで実装するHigh Availability NAT (EIP付け替えパターン)

More than 3 years have passed since last update.

Serfによる冗長化

前に実装したSerf冗長化ですが、EIPを付け替える要望がありましたので、
スクリプトを実装しました。

Serfで実装するHigh Availability NAT

構成図

ha-nat-eip.png

実装

実装方法は前と替りませんが、スクリプトが変更になります。

https://github.com/SatoHiroyuki/ha-nat-script/blob/master/ha-nat-eip

実行方法

ha-nat-eip -R [変更するRouteTableのTagName] -E [Allocation-id] -N 0.0.0.0/0 -r ap-northeast-1

Serf.confもハンドラーのスクリプトを変更する

{
  "node_name": "nat1",
  "enable_syslog": true,
  "tags": {
    "role": "nat"
  },
  "reconnect_interval": "4s",←疎通間隔は4秒
  "reconnect_timeout": "12s",←タイムアウト検知12秒
  "tombstone_timeout": "12s",←タイムアウト検知12秒
  "event_handlers": [
    "member-join=ha-nat-eip -R [変更するRouteTableのTagName] -E [Allocation-id] -N 0.0.0.0/0 -r ap-northeast-1 >> /var/log/ha-nat.log 2>&1"
  ]
}

障害試験

Active側に障害が発生した場合は、約12秒で切り替わりが行われます。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away