upload_memory.py recreates the replicas and the balancer for every run of 10, 20 and 40 concurrent uploads of 1 and 10 MiB with 64 slots (effectively no limit) and with 3, drives them through lab4_seed.py from the prepared tooling, and keeps per-run JSON plus a summary with the cgroup memory.peak of each replica and of the balancer and the oom_kill counters. The seed script now also records memory.current before the load and reads X-Instance-Id regardless of case. The first run showed that slots alone only move a waiting body out of the worker: with 3 slots and 40 uploads of 10 MiB the kernel grew the socket buffers of HAProxy to about 110 MB and the 128 MiB balancer was killed. HAProxy now caps its client and server socket buffers at 64 KiB and the API replicas cap tcp_rmem and tcp_wmem at 256 KiB, which keeps the balancer at 30 MiB. glibc raised its mmap threshold after the first large free and kept freed 10 MiB bodies in the heap, so the API fixes MALLOC_MMAP_THRESHOLD_ at 128 KiB. With these settings 40 concurrent uploads of 10 MiB peak at 323 MiB of 512 per replica and all 80 succeed, while without the slot limit the same load reaches 512 MiB, a worker is killed and only 31 of 80 succeed. UPLOAD_CONCURRENCY stays at 3. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27
Инфраструктура студента
Здесь разместите конфигурации выбранных сервисов; основную топологию — в корневом compose.yaml/stack.yaml. compose.example.yaml — только worksheet ролей и намеренно не запускается. contracts/infrastructure.json задаёт минимальные роли, не готовые образы/пароли.
В REPORT.md сопоставьте роль → service name → версия/digest → health/readiness → volume → сеть/порт → способ передачи credentials. Приведите bootstrap (schema, bucket, broker topology, а с lab6 provisioning) и безопасное повторение этих команд.
Приложение строится из исходников. Не используйте заранее существующий образ преподавательского сервера вместо своей реализации. Restart hook перезапускает все соответствующие stores с volumes; failover hook останавливает только заданную API-реплику.