47/53
Sign inSign up free

832. Scaling a Worker Fails

easy 10 XP ~7 minHands-on lab

Labs have no container engine, so nothing is started: your files are checked with docker-compose config.

The queue of notifier is backing up, but scaling the worker fails:

$ docker compose up -d --scale worker=3
Error response from daemon: Conflict. The container name "/notifier-worker" is already in use
Bind for 0.0.0.0:9100 failed: port is already allocated

Task

In /home/student/projects/notifier/compose.yaml, make worker scalable and run 3 copies on a plain docker compose up:

  • no fixed container name and no published host port for worker,
  • Prometheus scrapes the workers over the Compose network, so declare the metrics port 9100 with expose,
  • queue keeps its container name; the worker's image and environment stay the same.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.