0Pricing
AWS for Backend Developers (EC2, S3, RDS, Lambda) · レッスン

オートスケーリングとロードバランシング

Auto Scaling GroupsとApplication Load Balancerを組み合わせ、変化するトラフィックに対応できる、EC2ベースの堅牢で伸縮自在なバックエンドを構築します。

「オートスケーリングとロードバランシング」はCoddyKit上の無料AWS for Backend Developers (EC2, S3, RDS, Lambda)レッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはAWS for Backend Developers (EC2, S3, RDS, Lambda)学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 AWS for Backend Developers (EC2, S3, RDS, Lambda)コースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

From One Server to Many

One EC2 instance is a single point of failure. Backends run an Auto Scaling Group of instances behind a load balancer that spreads requests across them.

The Launch Template

An ASG needs a recipe for the instances it spins up. A launch template defines the AMI, instance type, and startup configuration.

Anatomy of an Auto Scaling Group

An Auto Scaling Group holds a minimum, desired, and maximum count. It keeps the desired number running and replaces unhealthy instances on its own.

Health Checks

The ASG runs health checks: when an instance fails, it terminates that one and launches a replacement, holding the fleet at the desired size.

Why a Load Balancer?

A load balancer gives clients one stable endpoint while spreading requests across healthy instances. The ALB works at HTTP and routes by path or host.

Listeners and Target Groups

Two ALB pieces: a listener watches a port (like 80) for connections, and a target group is the pool of instances it forwards to.

Connecting the ASG to the ALB

The ASG auto-registers its instances with the target group, so new instances start getting traffic and terminated ones are removed — no manual wiring.

Scaling Policies

A scaling policy adjusts the desired count by metric. Target tracking is simplest: hold average CPU near, say, 50% and AWS adds or removes instances to keep it.

A Python Scaling Simulation

This snippet models target tracking — comparing current CPU to the target to compute the new instance count.

current_cpu = 80
target_cpu = 50
current_count = 4

desired = round(current_count * current_cpu / target_cpu)
print('Scale to', desired, 'instances')

Multi-AZ for High Availability

Spread the ASG across multiple Availability Zones. If one AZ goes down, instances in the others keep serving and the ALB stops routing to the failed zone.

Cost and Cooldowns

Scaling out costs money, and rapid up-down thrashing wastes it. A cooldown pauses further scaling so the fleet stabilizes before reacting again.

Quick Check

A traffic spike hits your fleet — what does target tracking do, and how does the ALB keep responses flowing?

Recap: Elastic, Resilient Backends

Recap: launch templates define instances, Auto Scaling Groups self-heal around min/desired/max, and an ALB with target-tracking and multi-AZ adds elasticity and resilience.

よくある質問

「オートスケーリングとロードバランシング」レッスンは無料ですか?

はい。「オートスケーリングとロードバランシング」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、AWS for Backend Developers (EC2, S3, RDS, Lambda)コースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 AWS for Backend Developers (EC2, S3, RDS, Lambda)コースには全4レッスンが含まれています。

「オートスケーリングとロードバランシング」で何を学びますか?

Auto Scaling GroupsとApplication Load Balancerを組み合わせ、変化するトラフィックに対応できる、EC2ベースの堅牢で伸縮自在なバックエンドを構築します。 ブラウザで直接実行するハンズオンコードでAWS for Backend Developers (EC2, S3, RDS, Lambda)を演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

AWS for Backend Developers (EC2, S3, RDS, Lambda)を始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのAWS for Backend Developers (EC2, S3, RDS, Lambda)は初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。

「オートスケーリングとロードバランシング」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このAWS for Backend Developers (EC2, S3, RDS, Lambda)レッスンでコードを書いて実行できますか?

はい。すべてのAWS for Backend Developers (EC2, S3, RDS, Lambda)レッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. バックエンド開発のための AWS 入門
  2. 初めての EC2 インスタンスを起動する
  3. 接続と EC2 の基本管理
  4. オートスケーリングとロードバランシング
← AWS for Backend Developers (EC2, S3, RDS, Lambda)に戻る