ApplicationGatewayのサイズ変更
とあるお客様からのお問い合わせを受けて、USの開発チームにも確認しました。
変更方法としては、①Azure ポータルから変更する、②PowerShellを使って変更する、の大きく2パターンのいずれかになります。
まずは、①Azure ポータルから変更する方法から。
ApplicationGatewayの[構成]の”SKUサイズ”を変更します。
続いて、②PowerShellを使って変更する方法、以下、ARM利用を前提で記載しています。
※ARM利用の場合
$gw = Get-AzureRmApplicationGateway -Name [ApplicationGatewayName] -ResourceGroupName [ResourceGroupName] Set-AzureRmApplicationGatewaySku -Name [SKU Name] -Tier Standard -Capacity [Instance Count] -ApplicationGateway $gw
※[SKU Name]は、Standard_Small / Standard_Medium / Standard_Largeのいずれかを指定。
Set-AzureRmApplicationGateway -ApplicationGateway $gw
なお、ApplicationGatewayのサイズ変更については、完全に再デプロイされるイメージになる為、全てのトラフィックにおいて約15分程度のサービス断が発生します。
また、ApplicationGatewayのサイズは変更せずにインスタンス(仮想マシン)の数だけを変更する場合は、サービス断は発生しません。
ダウンタイムを短くするなどサービス影響をより少なくするための施策としては、ApplicationGatewayの上段に、Azure Load Balancer(L4レベルでの負荷分散)やTraffic Manager(DNSレベルでの負荷分散)を組み合わせて、ApplicationGatewayとWebサーバーのセットを多重化・冗長化しておくということが考えられます。
他にも、Azure CLIでもサイズ変更が可能です。
C:\Windows\system32>azure help network application-gateway set
…
help: Usage: network application-gateway set [options] <resource-group> <name>
help:
help: Options:
…
help: -a, --sku-name <sku-name> the name of the sku, valid values are [Standard_Medium,Standard_Small,Standard_Large]
help: -u, --sku-tier <sku-tier> the sku tier, valid values are [Standard]
以下のApplicationGatewayの公式ドキュメントも合わせてご参照ください。