forked from mtusi2026/mtusi2026lab5
ЛР 5 — БВТ2301 — Курлова — на 5
RabbitMQ + transactional outbox, отдельный worker (thumbnail/crop/WebP), lease и heartbeat, retry с backoff+jitter, DLQ и replay, admission control; тесты отказов, трек 1 и отчёт.
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
# Track 1 matrix: 3 sizes x 4 worker settings x REPEATS, then the overload/recovery scenario.
|
||||
# One worker replica with a 2-CPU limit; offered rates are fixed per size (open loop, 30 s each).
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
REPEATS="${REPEATS:-2}"
|
||||
for rep in $(seq 1 "$REPEATS"); do
|
||||
for spec in "small 10" "medium 5" "large 3"; do
|
||||
set -- $spec
|
||||
for cp in "1 1" "2 2" "4 4" "2 16"; do
|
||||
c=${cp% *}; p=${cp#* }
|
||||
python3 student-tests/queue_load.py run --size "$1" --rate "$2" --duration 30 \
|
||||
--concurrency "$c" --prefetch "$p" --label "c$c-p$p-r$rep" | tail -1
|
||||
done
|
||||
done
|
||||
done
|
||||
for rep in $(seq 1 "$REPEATS"); do
|
||||
python3 student-tests/queue_load.py overload --max-pending 30 --size large --rate 8 --duration 30 \
|
||||
--concurrency 2 --prefetch 2 --label "overload-r$rep" | tail -1
|
||||
done
|
||||
# back to the default topology
|
||||
WORKER_REPLICAS=2 docker compose --env-file .env up -d --no-deps --wait worker >/dev/null
|
||||
echo MATRIX_DONE
|
||||
Reference in New Issue
Block a user