Skip to content
Ameen Abozaid
Planned lessonMID-036-L05

Demo: scaling inventory to three replicas

  • Lesson 5 of 5
  • Mid-level
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

scale out behind Compose DNS and watch a replica die. Prepares MID-036-LAB1.

Draft outline details

Step by step

  1. Start Shop with docker compose up --scale inventory=3; remove fixed host port mappings from inventory.
  2. Call inventory from orders repeatedly and log the replica's hostname; show requests spread across three.
  3. Run a load test; kill one replica mid-run.
  4. Planned mistake: hard-code one replica's IP in orders config. When that replica dies, every call fails. Fix: use the service name.
  5. Show errors limited to requests in flight on the killed replica; explain why (already sent, not yet rerouted) and how retries on idempotent calls plus graceful shutdown reduce it.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.