1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ALB for VPCでbackup poolを設定する

Last updated at Posted at 2025-03-06

はじめに

ALB for VPCでbackup poolの機能を使えるようになりました。

通常使用するpool内のサーバーが全て使えなくなった時にbackup poolに転送します。

下記の手順15に記載された内容となります。
https://cloud.ibm.com/docs/vpc?topic=vpc-load-balancers&interface=ui

Optionally, you can create a backup for any of your existing pools. This allows the backup pool to manage traffic in the case of a member failure. To do so, you will need to create a failsafe policy:

sorryサーバーへの振り分けに使えそうな機能なので、下記の構成で試しました。

image.png

設定方法は下記の通りです。

ALBにBack-end poolを2つ作成

通常利用するpoolと、sorryを配置するpoolを作成します。通常利用するpoolにはいつも通りfront-end listnerを作成します。
これもいつもと同様に、それぞれのpoolのメンバーとしてVSIを登録します。

image.png

pool1に登録したサーバー
image.png

pool-sorryに登録したサーバー
front-end listenerを設定していないので、ヘルスチェックも動いていません。
image.png

pool1のFailsafe policyを設定

ここからが、今回可能になった新しい設定箇所です。
通常利用するpoolに対し設定を行います。Pool detailsタブの一番下に、Failsafe policyがあります。右上のEditボタンを押して変更を行います。
image.png

デフォルトではAction=Failが選択されています。
image.png

Action=Forwardに変更し、Targetに、Sorry用に作成したpoolを選択し、Saveします。

image.png

sorry用に作ったpoolにBackup poolという属性が付与されます。また、このpoolについてもヘルスチェックが開始します。
image.png

設定は以上です。

動作確認

サーバーを全て起動した状態でALBにアクセスすると、pool1に登録したサーバー1, 2にround robinで割り振られます。
image.png

pool1のサーバーを1台止めると、pool1内の残ったサーバーに割り振られます。
image.png

pool1のサーバーを2台とも停止すると、pool-sorryのサーバーに割り振られます。
image.png

Failsafe policyを設定する前は、pool1のサーバーが全部止まると、503エラーになっていました。
image.png

pool1のサーバーを1台でも復旧させると、再びpool1のサーバーに割り振られます。
image.png

通常利用するpool内のサーバーが全て使えなくなった時だけ別poolに振り分け可能ということで、sorryページを設定したい時に使える機能と思いました。

以上

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?