0Pricing
AWS for Backend Developers (EC2, S3, RDS, Lambda) · Lektion

Auto Scaling und Load-Balancing

Machen Sie Ihr EC2-basiertes Backend durch die Kombination von Auto Scaling Groups und einem Application Load Balancer resilient und elastisch, damit es wechselnden Datenverkehr bewältigt.

Auto Scaling und Load-Balancing ist eine kostenlose AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der AWS for Backend Developers (EC2, S3, RDS, Lambda)-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

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.

Häufig gestellte Fragen

Ist die Lektion „Auto Scaling und Load-Balancing“ kostenlos?

Ja — der vollständige Text von „Auto Scaling und Load-Balancing“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des AWS for Backend Developers (EC2, S3, RDS, Lambda)-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der AWS for Backend Developers (EC2, S3, RDS, Lambda)-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Auto Scaling und Load-Balancing“?

Machen Sie Ihr EC2-basiertes Backend durch die Kombination von Auto Scaling Groups und einem Application Load Balancer resilient und elastisch, damit es wechselnden Datenverkehr bewältigt. Du übst AWS for Backend Developers (EC2, S3, RDS, Lambda) mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um AWS for Backend Developers (EC2, S3, RDS, Lambda) zu starten?

Keine Vorkenntnisse erforderlich. AWS for Backend Developers (EC2, S3, RDS, Lambda) auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.

Wie lange dauert die Lektion „Auto Scaling und Load-Balancing“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lektion Code schreiben und ausführen?

Ja. Jede AWS for Backend Developers (EC2, S3, RDS, Lambda)-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Einführung in AWS für Backend-Entwicklung
  2. Ihre erste EC2-Instanz starten
  3. Verbindung und grundlegende EC2-Verwaltung
  4. Auto Scaling und Load-Balancing
← Zurück zu AWS for Backend Developers (EC2, S3, RDS, Lambda)