designetwork

ネットワークを軸としたIT技術メモ

BIG-IP Pool, Node状態とiRule LB::statusの対応 (up/down/session_enabled/session_disabled)

F5 BIG-IP iRuleで LB::status によりSorryページへの振り分け等を実装する際の、Pool, Node状態と LB::status の対応メモ。

検証バージョン

BIG-IP 800
11.5.3

機種、バージョン、各種設定により挙動が異なる可能性があるため、導入の際には十分に検証ください。

Pool, Node状態と LB::status の対応

LB::status pool <pool name> member <address> <port> の結果

Status iRule LB::status
up up
node down down
node disabled session_disabled
node forced_offline down
pool member disabled session_disabled
pool member forced_offline down
connection limit up

コネクションリミットに到達した場合は後述の通り unavailable となるものの LB::status としては up のままになる。

session_enabled は割愛

When would LB::status return session_enabled?
https://devcentral.f5.com/s/question/0D51T00006i7fYr/when-would-lbstatus-return-sessionenabled

こちらにも上がっているが、session_enabledはパーシステンス使用時のみ?私の環境では動作確認できなかったため割愛。

show ltm pool <pool> の結果

tmsh showコマンドに各Pool, Nodeの状態は確認できる。GUIだと緑・赤・黄・灰・黒、〇・△・◇で表現される内容。

user@(host)(cfg-sync Standalone)(Active)(/Common)(tmos)# show ltm pool <pool> detail

---------------------------------------------------------------------
Ltm::Pool: <Pool>          
---------------------------------------------------------------------
Status                                 
  Availability : available             
  State        : enabled               
  Reason       : The pool is available 
  Monitor      : <Monitor>
  Minimum Active Members : 0           
  Current Active Members : 3           
          Total Requests : 11          
        Current Sessions : 34          
                                       
Traffic                                  ServerSide
  ...
                                       
Connection Queue                               Pool  Pool and members
  ...

  --------------------------------------------------------------
  | Ltm::Pool Member: <pool>:<port>
  --------------------------------------------------------------
  | Status                                 
  |   Availability   : available           
  |   State          : enabled             
  |   Reason         : Pool member is available
  |   Monitor        : <monitor> (pool monitor)
  |   Monitor Status : up                  
  |   Session Status : enabled             
  |   Pool Name      : <pool>              
  |   IP Address     : <ip>                
  |                                        
  | Traffic                                  ServerSide  General
  |   ...
  |                                        
  | Connection Queue                       
  |   ...

     ---------------------------------------------------
     | Ltm::Node: <node> (<ip>)
     ---------------------------------------------------
     | Status               
     |   Availability   : available
     |   State          : enabled
     |   Reason         : Node address is available
     |   Monitor        : <monitor>
     |   Monitor Status : up
     |   Session Status : enabled
     |                      
     | Traffic                ServerSide  General
     |   ...

        | Monitors
        |   <monitor>  <ip>:<port>  enabled  up

出力結果の違いは以下の通り。(共通項目は割愛)

up node down node disabled node forced_offline pool member disabled pool member forced_offline connection limit all member down
iRule LB::status up down session_disabled down session_disabled down up -
LTM::Pool: Status
Availability available available available available available available unavailable offline
State enabled enabled enabled enabled enabled enabled enabled enabled
Reason The pool is available The pool is available The pool is available The pool is available The pool is available The pool is available The pool member's connection limit has been reached The children pool member(s) are down
Active Members up members up members up members up members up members up members 0 0
Ltm::Pool Member
Availability available offline available offline available offline unavailable -
State enabled enabled disabled-by-parent disabled-by-parent disabled disabled enabled -
Reason Pool member is available monitor: Read failed; Pool member is available Parent down Pool member is available, user disabled Forced down The pool member's connection limit has been reached -
Monitor Status up down up address-down up user-down up -
Session Status enabled enabled addr-disabled addr-disabled user-disabled user-disabled enabled -
Ltm::Node
Availability available offline available offline available available available -
State enabled enabled disabled disabled enabled enabled enabled -
Reason Node address is available monitor: Read failed; Node address is available, user disabled Forced down Node address is available Node address is available Node address is available -
Monitor Status up down up user-down up up up -
Session Status enabled enabled user-disabled user-disabled enabled enabled enabled -

参考

LB::statusの公式情報

BIG-IP iRule等の設定解説

仕様から実用パターンまで解説いただいており、非常に分かりやすく参考にさせていただきました。ありがとうございます。