ALB/NLB ユースケースおよびアーキパターン
ALB/NLB ユースケースおよびアーキテクチャパターン
Section titled “ALB/NLB ユースケースおよびアーキテクチャパターン”1. Webアプリ(ALB)
Section titled “1. Webアプリ(ALB)”構成: Internet → ALB → Auto Scaling Group(EC2)
設定: - HTTPS(ACM証明書) - ヘルスチェック: /health - Sticky Session: 有効
メリット: - 負荷分散 - SSL終端 - マルチAZ高可用性2. マイクロサービス(ALB)
Section titled “2. マイクロサービス(ALB)”構成: ALB → パスベースルーティング → /api/users → Users Service → /api/orders → Orders Service → /api/products → Products Service
メリット: - 単一エンドポイント - サービス独立デプロイ3. Blue/Greenデプロイ(ALB)
Section titled “3. Blue/Greenデプロイ(ALB)”構成: ALB → Blue(90%) → Green(10%)
手順: 1. Greenデプロイ 2. トラフィック10%(検証) 3. トラフィック100%(完全移行) 4. Blue削除4. 高パフォーマンスTCP(NLB)
Section titled “4. 高パフォーマンスTCP(NLB)”構成: Internet → NLB → EC2(ゲームサーバー)
用途: - オンラインゲーム - 金融取引システム - IoTデータ収集
メリット: - 超低レイテンシー - 静的IP - 数百万接続対応5. NLB + ALB組み合わせ
Section titled “5. NLB + ALB組み合わせ”構成: Internet → NLB(静的IP) → ALB → EC2
用途: - ホワイトリスト必要(静的IP) - ALBの機能も必要(パスルーティング)6. Lambda統合(ALB)
Section titled “6. Lambda統合(ALB)”構成: ALB → Lambda関数
用途: - サーバーレスHTTPエンドポイント - API Gateway代替
メリット: - VPC内配置 - ALBの機能活用