RousselTMLEARNING

TP · Cloud Computing: From Discovery to Expertise

Lab: Elasticity and high availability with Docker Compose

What you will learn in this TP
  • Vary the number of instances
  • See load distribution
  • Check fault tolerance

Horizontal scaling #

What you will learn in this section
  • Vary the number of instances
  • See load distribution
  • Check fault tolerance

Context. The site must withstand a traffic spike then return to an economical size afterwards. That is elasticity: you simulate it by adding then removing instances behind a load balancer, and by causing an outage.

Prerequisites: Docker Compose  ·  Estimated time: 35 min

An nginx spreads load across replicas.
  1. 1. Deploy the service and the load balancer

    Why? A load balancer in front of the service makes instances interchangeable: clients know a single address.

    A whoami service and an nginx using Docker DNS.
  2. 2. Go from 1 to 5 instances

    Why? Going from 1 to 5 instances with one command shows horizontal scaling: capacity adjusts to demand without touching code.

    Increase the number of instances without downtime and observe the distribution.
  3. 3. Simulate losing instances

    Why? Losing instances with no visible error demonstrates high availability: redundancy absorbs the failure.

    Stop two instances: does the service stay available?
  4. 4. Scale back in

    Why? Scaling back when load drops is half of elasticity: that is what really reduces the bill.

    Scale in to 2 instances: how does that relate to pay-per-use?

Difficulty level : ●●○○○ (2/5)

My progress

  • ⏱ Estimated time : ≈ 35 min

Sign in to track your progress and take notes. Sign in

✉️ Ask a question

Recommended Articles

Élasticité vs Scalabilité : Les clés de la performance

Comprenez comment le cloud s'adapte automatiquement à la charge de vos utilisateurs.

Bonnes pratiques Cloud : sécurité, résilience, coûts et exploitation

Bonnes pratiques du Cloud Computing : piliers d'une architecture bien conçue, IAM et moindre priv...

License consumption types

Understand the evolution of billing in Dynatrace: the difference between the old licensing model ...

Grafana Alloy: The importance of Self-Monitoring

Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...

Grafana Alloy: Understanding and exploiting the User Interface (UI)

Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...

Grafana Alloy: Introduction and Architecture

Discover the fundamental concepts of Grafana Alloy, the transition from the static Agent to Alloy...

Grafana Alloy: Syntax and Configuration (Alloy Language: River)

As part of a Grafana training or observability training, master the declarative syntax of Grafana...

Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)

Learn how to configure Grafana Alloy to collect, transform, and forward metrics using the Prometh...

Grafana Alloy: Log Management with Loki

Discover how to configure Grafana Alloy to read log files, journald, or network streams, process ...