ЛР3: балансировка HAProxy, 2 реплики API, идемпотентность, отказоустойчивость (на 4)

- X-Instance-Id в каждом ответе; обязательный Idempotency-Key, таблица idempotency_keys
  (миграция 0002, одна транзакция, конкурентные повторы через уникальный индекс)
- graceful shutdown: SIGTERM -> ready=503 -> drain 3 с -> закрытие порта
- compose: lb (HAProxy) + api x2 без портов + разовый migrate + postgres, лимиты CPU/RAM
- хуки stop-one/restart/restore-replicas, scripts/experiments.py (failover, idempotency, rolling)
- свои тесты: 44 (13 новых); evidence: smoke, pytest, persistence, failover, эксперименты
This commit is contained in:
2026-10-29 10:58:17 +03:00
parent 0ab3a341aa
commit cde3374d8a
74 changed files with 6231 additions and 25 deletions
+12
View File
@@ -0,0 +1,12 @@
# 2026-10-29T10:53:54 docker compose config (resolved) + docker compose ps
$ docker compose --env-file .env config --quiet
exit=0
api: image=mtusi-messenger:lab3 replicas=2 published_ports=[] container_name=None limits={'cpus': 1, 'memory': '536870912', 'pids': 200} secrets=['postgres_password', 'jwt_secret'] stop_grace_period=15s
lb: image=haproxy:3.0.29-alpine@sha256:56b887da77428b7a6621e59e480cdbd330cc805c22d3cedb66ceea76ffdea2c6 replicas=None published_ports=['8080'] container_name=None limits={'cpus': 0.5, 'memory': '134217728'} secrets=[] stop_grace_period=None
migrate: image=mtusi-messenger:lab3 replicas=None published_ports=[] container_name=None limits={'cpus': 0.5, 'memory': '268435456'} secrets=['postgres_password'] stop_grace_period=None
postgres: image=postgres:17.10-alpine@sha256:979c4379dd698aba0b890599a6104e082035f98ef31d9b9291ec22f2b13059ca replicas=None published_ports=['5432'] container_name=None limits={'cpus': 1, 'memory': '536870912'} secrets=['postgres_password'] stop_grace_period=None
$ docker compose ps
mtusi-lab3-api-5 | Up 52 seconds (healthy) | 8080/tcp
mtusi-lab3-api-6 | Up About a minute (healthy) | 8080/tcp
mtusi-lab3-lb-1 | Up 13 minutes (healthy) | 127.0.0.1:8080->8080/tcp
mtusi-lab3-postgres-1 | Up 25 minutes (healthy) | 127.0.0.1:5432->5432/tcp
+33
View File
@@ -0,0 +1,33 @@
# 2026-10-29T10:51:49 public failover test (final config), repeated until every replica was stopped once; restore between runs
replicas: 3de2fdb570eb, 945116f913cc
## run 1 — containers BEFORE
945116f913cc mtusi-lab3-api-5 Up 36 seconds (healthy)
3de2fdb570eb mtusi-lab3-api-6 Up About a minute (healthy)
$ python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 91, "failed_attempts": 0, "first_recovery_seconds": 5.459}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## run 1 — containers AFTER
945116f913cc mtusi-lab3-api-5 Up 57 seconds (healthy)
3de2fdb570eb mtusi-lab3-api-6 Exited (0) 10 seconds ago
stopped by hook: 3de2fdb570eb
$ scripts\restore-replicas.cmd
exit=0
## run 2 — containers BEFORE
945116f913cc mtusi-lab3-api-5 Up About a minute (healthy)
3de2fdb570eb mtusi-lab3-api-6 Up 11 seconds (healthy)
$ python tests/resilience.py --mode failover --action-script scripts/stop-one.cmd
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 90, "failed_attempts": 0, "first_recovery_seconds": 4.847}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0
## run 2 — containers AFTER
945116f913cc mtusi-lab3-api-5 Exited (0) 11 seconds ago
3de2fdb570eb mtusi-lab3-api-6 Up 32 seconds (healthy)
stopped by hook: 945116f913cc
$ scripts\restore-replicas.cmd
exit=0
replicas stopped at least once: 945116f913cc, 3de2fdb570eb of 2
@@ -0,0 +1,700 @@
{
"method": "closed loop 8 workers: POST message (retry same Idempotency-Key on error) + GET page; client timeout 2s; each replica stopped with docker stop -t 8, restored, then the next",
"replicas": [
"bb53391a07f1",
"e51c99b5436b"
],
"warmup_seconds": 5,
"seconds_down": 15,
"runs": [
{
"stopped_replica": "bb53391a07f1",
"baseline_before_stop": {
"seconds": 7.62,
"successful_requests": 366,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 48.0,
"latency_ms": {
"p50": 131.3,
"p95": 390.6,
"p99": 501.0
}
},
"stop_to_restore": {
"seconds": 19.67,
"successful_requests": 526,
"failed_requests": 6,
"error_reasons": {
"read: connection/TLS failure (RemoteDisconnected)": 1,
"write: connection/TLS failure (RemoteDisconnected)": 5
},
"error_ratio": 0.0113,
"successful_rps": 26.7,
"latency_ms": {
"p50": 276.3,
"p95": 573.1,
"p99": 693.5
}
},
"after_restore": {
"seconds": 27.91,
"successful_requests": 913,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 32.7,
"latency_ms": {
"p50": 239.9,
"p95": 516.6,
"p99": 684.7
}
},
"docker_stop_seconds": 4.67,
"last_error_seconds_after_stop": 1.55,
"first_success_on_other_replica_seconds": 0.0,
"requests_served_by_stopped_replica_after_stop_returned": 0,
"seconds_until_replica_back_in_rotation": 19.5,
"instances_seen": [
"bb53391a07f1",
"e51c99b5436b"
],
"resource_snapshot_under_load": [
"mtusi-lab3-api-1: cpu 39.24%, mem 80.89MiB / 512MiB",
"mtusi-lab3-api-2: cpu 102.77%, mem 83.61MiB / 512MiB",
"mtusi-lab3-lb-1: cpu 9.63%, mem 14.8MiB / 128MiB",
"mtusi-lab3-postgres-1: cpu 36.60%, mem 55.37MiB / 512MiB"
],
"timeline_per_second": [
{
"t": 0,
"ok": 37,
"errors": 0
},
{
"t": 1,
"ok": 57,
"errors": 0
},
{
"t": 2,
"ok": 57,
"errors": 0
},
{
"t": 3,
"ok": 54,
"errors": 0
},
{
"t": 4,
"ok": 38,
"errors": 0
},
{
"t": 5,
"ok": 31,
"errors": 0
},
{
"t": 6,
"ok": 51,
"errors": 0
},
{
"t": 7,
"ok": 63,
"errors": 0
},
{
"t": 8,
"ok": 60,
"errors": 0
},
{
"t": 9,
"ok": 30,
"errors": 6
},
{
"t": 10,
"ok": 25,
"errors": 0
},
{
"t": 11,
"ok": 15,
"errors": 0
},
{
"t": 12,
"ok": 22,
"errors": 0
},
{
"t": 13,
"ok": 32,
"errors": 0
},
{
"t": 14,
"ok": 26,
"errors": 0
},
{
"t": 15,
"ok": 31,
"errors": 0
},
{
"t": 16,
"ok": 29,
"errors": 0
},
{
"t": 17,
"ok": 22,
"errors": 0
},
{
"t": 18,
"ok": 16,
"errors": 0
},
{
"t": 19,
"ok": 15,
"errors": 0
},
{
"t": 20,
"ok": 30,
"errors": 0
},
{
"t": 21,
"ok": 30,
"errors": 0
},
{
"t": 22,
"ok": 29,
"errors": 0
},
{
"t": 23,
"ok": 28,
"errors": 0
},
{
"t": 24,
"ok": 26,
"errors": 0
},
{
"t": 25,
"ok": 17,
"errors": 0
},
{
"t": 26,
"ok": 16,
"errors": 0
},
{
"t": 27,
"ok": 23,
"errors": 0
},
{
"t": 28,
"ok": 26,
"errors": 0
},
{
"t": 29,
"ok": 29,
"errors": 0
},
{
"t": 30,
"ok": 27,
"errors": 0
},
{
"t": 31,
"ok": 28,
"errors": 0
},
{
"t": 32,
"ok": 20,
"errors": 0
},
{
"t": 33,
"ok": 15,
"errors": 0
},
{
"t": 34,
"ok": 23,
"errors": 0
},
{
"t": 35,
"ok": 21,
"errors": 0
},
{
"t": 36,
"ok": 31,
"errors": 0
},
{
"t": 37,
"ok": 21,
"errors": 0
},
{
"t": 38,
"ok": 29,
"errors": 0
},
{
"t": 39,
"ok": 18,
"errors": 0
},
{
"t": 40,
"ok": 17,
"errors": 0
},
{
"t": 41,
"ok": 20,
"errors": 0
},
{
"t": 42,
"ok": 27,
"errors": 0
},
{
"t": 43,
"ok": 26,
"errors": 0
},
{
"t": 44,
"ok": 54,
"errors": 0
},
{
"t": 45,
"ok": 47,
"errors": 0
},
{
"t": 46,
"ok": 53,
"errors": 0
},
{
"t": 47,
"ok": 33,
"errors": 0
},
{
"t": 48,
"ok": 37,
"errors": 0
},
{
"t": 49,
"ok": 43,
"errors": 0
},
{
"t": 50,
"ok": 32,
"errors": 0
},
{
"t": 51,
"ok": 58,
"errors": 0
},
{
"t": 52,
"ok": 60,
"errors": 0
},
{
"t": 53,
"ok": 62,
"errors": 0
},
{
"t": 54,
"ok": 29,
"errors": 0
},
{
"t": 55,
"ok": 9,
"errors": 0
}
],
"acked_messages": 903,
"messages_in_history": 903,
"lost_acked_messages": 0,
"duplicate_messages": 0
},
{
"stopped_replica": "e51c99b5436b",
"baseline_before_stop": {
"seconds": 7.7,
"successful_requests": 320,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 41.6,
"latency_ms": {
"p50": 140.9,
"p95": 485.4,
"p99": 605.6
}
},
"stop_to_restore": {
"seconds": 19.39,
"successful_requests": 510,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 26.3,
"latency_ms": {
"p50": 289.3,
"p95": 540.3,
"p99": 666.9
}
},
"after_restore": {
"seconds": 27.92,
"successful_requests": 976,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 35.0,
"latency_ms": {
"p50": 228.7,
"p95": 493.7,
"p99": 661.6
}
},
"docker_stop_seconds": 4.39,
"last_error_seconds_after_stop": 0.0,
"first_success_on_other_replica_seconds": 0.09,
"requests_served_by_stopped_replica_after_stop_returned": 0,
"seconds_until_replica_back_in_rotation": 19.75,
"instances_seen": [
"bb53391a07f1",
"e51c99b5436b"
],
"resource_snapshot_under_load": [
"mtusi-lab3-api-1: cpu 71.15%, mem 83.38MiB / 512MiB",
"mtusi-lab3-api-2: cpu 35.64%, mem 81.46MiB / 512MiB",
"mtusi-lab3-lb-1: cpu 9.00%, mem 15.11MiB / 128MiB",
"mtusi-lab3-postgres-1: cpu 46.72%, mem 56.47MiB / 512MiB"
],
"timeline_per_second": [
{
"t": 0,
"ok": 18,
"errors": 0
},
{
"t": 1,
"ok": 43,
"errors": 0
},
{
"t": 2,
"ok": 60,
"errors": 0
},
{
"t": 3,
"ok": 59,
"errors": 0
},
{
"t": 4,
"ok": 47,
"errors": 0
},
{
"t": 5,
"ok": 30,
"errors": 0
},
{
"t": 6,
"ok": 38,
"errors": 0
},
{
"t": 7,
"ok": 35,
"errors": 0
},
{
"t": 8,
"ok": 29,
"errors": 0
},
{
"t": 9,
"ok": 29,
"errors": 0
},
{
"t": 10,
"ok": 30,
"errors": 0
},
{
"t": 11,
"ok": 29,
"errors": 0
},
{
"t": 12,
"ok": 29,
"errors": 0
},
{
"t": 13,
"ok": 23,
"errors": 0
},
{
"t": 14,
"ok": 16,
"errors": 0
},
{
"t": 15,
"ok": 13,
"errors": 0
},
{
"t": 16,
"ok": 30,
"errors": 0
},
{
"t": 17,
"ok": 31,
"errors": 0
},
{
"t": 18,
"ok": 30,
"errors": 0
},
{
"t": 19,
"ok": 26,
"errors": 0
},
{
"t": 20,
"ok": 28,
"errors": 0
},
{
"t": 21,
"ok": 18,
"errors": 0
},
{
"t": 22,
"ok": 17,
"errors": 0
},
{
"t": 23,
"ok": 29,
"errors": 0
},
{
"t": 24,
"ok": 31,
"errors": 0
},
{
"t": 25,
"ok": 30,
"errors": 0
},
{
"t": 26,
"ok": 28,
"errors": 0
},
{
"t": 27,
"ok": 25,
"errors": 0
},
{
"t": 28,
"ok": 16,
"errors": 0
},
{
"t": 29,
"ok": 16,
"errors": 0
},
{
"t": 30,
"ok": 27,
"errors": 0
},
{
"t": 31,
"ok": 29,
"errors": 0
},
{
"t": 32,
"ok": 32,
"errors": 0
},
{
"t": 33,
"ok": 27,
"errors": 0
},
{
"t": 34,
"ok": 27,
"errors": 0
},
{
"t": 35,
"ok": 22,
"errors": 0
},
{
"t": 36,
"ok": 14,
"errors": 0
},
{
"t": 37,
"ok": 25,
"errors": 0
},
{
"t": 38,
"ok": 27,
"errors": 0
},
{
"t": 39,
"ok": 29,
"errors": 0
},
{
"t": 40,
"ok": 31,
"errors": 0
},
{
"t": 41,
"ok": 27,
"errors": 0
},
{
"t": 42,
"ok": 21,
"errors": 0
},
{
"t": 43,
"ok": 29,
"errors": 0
},
{
"t": 44,
"ok": 40,
"errors": 0
},
{
"t": 45,
"ok": 53,
"errors": 0
},
{
"t": 46,
"ok": 57,
"errors": 0
},
{
"t": 47,
"ok": 58,
"errors": 0
},
{
"t": 48,
"ok": 51,
"errors": 0
},
{
"t": 49,
"ok": 29,
"errors": 0
},
{
"t": 50,
"ok": 38,
"errors": 0
},
{
"t": 51,
"ok": 57,
"errors": 0
},
{
"t": 52,
"ok": 54,
"errors": 0
},
{
"t": 53,
"ok": 58,
"errors": 0
},
{
"t": 54,
"ok": 60,
"errors": 0
},
{
"t": 55,
"ok": 1,
"errors": 0
}
],
"acked_messages": 903,
"messages_in_history": 1806,
"lost_acked_messages": 0,
"duplicate_messages": 0
}
]
}
+702
View File
@@ -0,0 +1,702 @@
{
"method": "closed loop 8 workers: POST message (retry same Idempotency-Key on error) + GET page; client timeout 2s; each replica stopped with docker stop -t 8, restored, then the next",
"replicas": [
"3de2fdb570eb",
"945116f913cc"
],
"warmup_seconds": 5,
"seconds_down": 15,
"runs": [
{
"stopped_replica": "3de2fdb570eb",
"baseline_before_stop": {
"seconds": 7.72,
"successful_requests": 359,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 46.5,
"latency_ms": {
"p50": 136.4,
"p95": 433.5,
"p99": 628.8
}
},
"stop_to_restore": {
"seconds": 19.38,
"successful_requests": 538,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 27.8,
"latency_ms": {
"p50": 281.4,
"p95": 515.9,
"p99": 694.2
}
},
"after_restore": {
"seconds": 28.26,
"successful_requests": 925,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 32.7,
"latency_ms": {
"p50": 244.6,
"p95": 537.0,
"p99": 698.6
}
},
"docker_stop_seconds": 4.38,
"last_error_seconds_after_stop": 0.0,
"first_success_on_other_replica_seconds": 0.03,
"requests_served_by_stopped_replica_after_stop_returned": 0,
"seconds_until_replica_back_in_rotation": 20.11,
"instances_seen": [
"3de2fdb570eb",
"945116f913cc"
],
"resource_snapshot_under_load": [
"mtusi-lab3-api-5: cpu 99.82%, mem 80.75MiB / 512MiB",
"mtusi-lab3-api-6: cpu 46.77%, mem 81.65MiB / 512MiB",
"mtusi-lab3-lb-1: cpu 7.09%, mem 17.03MiB / 128MiB",
"mtusi-lab3-postgres-1: cpu 25.45%, mem 64.93MiB / 512MiB"
],
"timeline_per_second": [
{
"t": 0,
"ok": 30,
"errors": 0
},
{
"t": 1,
"ok": 58,
"errors": 0
},
{
"t": 2,
"ok": 60,
"errors": 0
},
{
"t": 3,
"ok": 59,
"errors": 0
},
{
"t": 4,
"ok": 60,
"errors": 0
},
{
"t": 5,
"ok": 35,
"errors": 0
},
{
"t": 6,
"ok": 33,
"errors": 0
},
{
"t": 7,
"ok": 41,
"errors": 0
},
{
"t": 8,
"ok": 56,
"errors": 0
},
{
"t": 9,
"ok": 38,
"errors": 0
},
{
"t": 10,
"ok": 29,
"errors": 0
},
{
"t": 11,
"ok": 29,
"errors": 0
},
{
"t": 12,
"ok": 23,
"errors": 0
},
{
"t": 13,
"ok": 17,
"errors": 0
},
{
"t": 14,
"ok": 15,
"errors": 0
},
{
"t": 15,
"ok": 29,
"errors": 0
},
{
"t": 16,
"ok": 29,
"errors": 0
},
{
"t": 17,
"ok": 31,
"errors": 0
},
{
"t": 18,
"ok": 26,
"errors": 0
},
{
"t": 19,
"ok": 28,
"errors": 0
},
{
"t": 20,
"ok": 17,
"errors": 0
},
{
"t": 21,
"ok": 18,
"errors": 0
},
{
"t": 22,
"ok": 25,
"errors": 0
},
{
"t": 23,
"ok": 26,
"errors": 0
},
{
"t": 24,
"ok": 28,
"errors": 0
},
{
"t": 25,
"ok": 28,
"errors": 0
},
{
"t": 26,
"ok": 27,
"errors": 0
},
{
"t": 27,
"ok": 17,
"errors": 0
},
{
"t": 28,
"ok": 17,
"errors": 0
},
{
"t": 29,
"ok": 15,
"errors": 0
},
{
"t": 30,
"ok": 27,
"errors": 0
},
{
"t": 31,
"ok": 28,
"errors": 0
},
{
"t": 32,
"ok": 30,
"errors": 0
},
{
"t": 33,
"ok": 29,
"errors": 0
},
{
"t": 34,
"ok": 29,
"errors": 0
},
{
"t": 35,
"ok": 15,
"errors": 0
},
{
"t": 36,
"ok": 14,
"errors": 0
},
{
"t": 37,
"ok": 25,
"errors": 0
},
{
"t": 38,
"ok": 27,
"errors": 0
},
{
"t": 39,
"ok": 25,
"errors": 0
},
{
"t": 40,
"ok": 30,
"errors": 0
},
{
"t": 41,
"ok": 29,
"errors": 0
},
{
"t": 42,
"ok": 19,
"errors": 0
},
{
"t": 43,
"ok": 16,
"errors": 0
},
{
"t": 44,
"ok": 33,
"errors": 0
},
{
"t": 45,
"ok": 50,
"errors": 0
},
{
"t": 46,
"ok": 48,
"errors": 0
},
{
"t": 47,
"ok": 49,
"errors": 0
},
{
"t": 48,
"ok": 54,
"errors": 0
},
{
"t": 49,
"ok": 48,
"errors": 0
},
{
"t": 50,
"ok": 29,
"errors": 0
},
{
"t": 51,
"ok": 36,
"errors": 0
},
{
"t": 52,
"ok": 53,
"errors": 0
},
{
"t": 53,
"ok": 59,
"errors": 0
},
{
"t": 54,
"ok": 56,
"errors": 0
},
{
"t": 55,
"ok": 20,
"errors": 0
}
],
"acked_messages": 911,
"messages_in_history": 911,
"lost_acked_messages": 0,
"duplicate_messages": 0
},
{
"stopped_replica": "945116f913cc",
"baseline_before_stop": {
"seconds": 7.66,
"successful_requests": 319,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 41.6,
"latency_ms": {
"p50": 139.5,
"p95": 516.2,
"p99": 694.5
}
},
"stop_to_restore": {
"seconds": 19.29,
"successful_requests": 507,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 26.3,
"latency_ms": {
"p50": 289.9,
"p95": 578.7,
"p99": 688.3
}
},
"after_restore": {
"seconds": 29.42,
"successful_requests": 962,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 32.7,
"latency_ms": {
"p50": 239.1,
"p95": 560.3,
"p99": 699.2
}
},
"docker_stop_seconds": 4.29,
"last_error_seconds_after_stop": 0.0,
"first_success_on_other_replica_seconds": 0.06,
"requests_served_by_stopped_replica_after_stop_returned": 0,
"seconds_until_replica_back_in_rotation": 21.19,
"instances_seen": [
"3de2fdb570eb",
"945116f913cc"
],
"resource_snapshot_under_load": [
"mtusi-lab3-api-5: cpu 101.75%, mem 94.56MiB / 512MiB",
"mtusi-lab3-api-6: cpu 68.81%, mem 81.32MiB / 512MiB",
"mtusi-lab3-lb-1: cpu 15.13%, mem 17.34MiB / 128MiB",
"mtusi-lab3-postgres-1: cpu 34.54%, mem 63.73MiB / 512MiB"
],
"timeline_per_second": [
{
"t": 0,
"ok": 35,
"errors": 0
},
{
"t": 1,
"ok": 33,
"errors": 0
},
{
"t": 2,
"ok": 29,
"errors": 0
},
{
"t": 3,
"ok": 26,
"errors": 0
},
{
"t": 4,
"ok": 50,
"errors": 0
},
{
"t": 5,
"ok": 48,
"errors": 0
},
{
"t": 6,
"ok": 59,
"errors": 0
},
{
"t": 7,
"ok": 59,
"errors": 0
},
{
"t": 8,
"ok": 43,
"errors": 0
},
{
"t": 9,
"ok": 16,
"errors": 0
},
{
"t": 10,
"ok": 26,
"errors": 0
},
{
"t": 11,
"ok": 28,
"errors": 0
},
{
"t": 12,
"ok": 27,
"errors": 0
},
{
"t": 13,
"ok": 28,
"errors": 0
},
{
"t": 14,
"ok": 30,
"errors": 0
},
{
"t": 15,
"ok": 23,
"errors": 0
},
{
"t": 16,
"ok": 16,
"errors": 0
},
{
"t": 17,
"ok": 20,
"errors": 0
},
{
"t": 18,
"ok": 30,
"errors": 0
},
{
"t": 19,
"ok": 29,
"errors": 0
},
{
"t": 20,
"ok": 30,
"errors": 0
},
{
"t": 21,
"ok": 28,
"errors": 0
},
{
"t": 22,
"ok": 27,
"errors": 0
},
{
"t": 23,
"ok": 15,
"errors": 0
},
{
"t": 24,
"ok": 16,
"errors": 0
},
{
"t": 25,
"ok": 26,
"errors": 0
},
{
"t": 26,
"ok": 29,
"errors": 0
},
{
"t": 27,
"ok": 27,
"errors": 0
},
{
"t": 28,
"ok": 27,
"errors": 0
},
{
"t": 29,
"ok": 29,
"errors": 0
},
{
"t": 30,
"ok": 16,
"errors": 0
},
{
"t": 31,
"ok": 16,
"errors": 0
},
{
"t": 32,
"ok": 26,
"errors": 0
},
{
"t": 33,
"ok": 27,
"errors": 0
},
{
"t": 34,
"ok": 28,
"errors": 0
},
{
"t": 35,
"ok": 31,
"errors": 0
},
{
"t": 36,
"ok": 29,
"errors": 0
},
{
"t": 37,
"ok": 21,
"errors": 0
},
{
"t": 38,
"ok": 18,
"errors": 0
},
{
"t": 39,
"ok": 19,
"errors": 0
},
{
"t": 40,
"ok": 29,
"errors": 0
},
{
"t": 41,
"ok": 30,
"errors": 0
},
{
"t": 42,
"ok": 27,
"errors": 0
},
{
"t": 43,
"ok": 27,
"errors": 0
},
{
"t": 44,
"ok": 40,
"errors": 0
},
{
"t": 45,
"ok": 26,
"errors": 0
},
{
"t": 46,
"ok": 30,
"errors": 0
},
{
"t": 47,
"ok": 53,
"errors": 0
},
{
"t": 48,
"ok": 55,
"errors": 0
},
{
"t": 49,
"ok": 56,
"errors": 0
},
{
"t": 50,
"ok": 29,
"errors": 0
},
{
"t": 51,
"ok": 41,
"errors": 0
},
{
"t": 52,
"ok": 38,
"errors": 0
},
{
"t": 53,
"ok": 35,
"errors": 0
},
{
"t": 54,
"ok": 49,
"errors": 0
},
{
"t": 55,
"ok": 63,
"errors": 0
},
{
"t": 56,
"ok": 20,
"errors": 0
}
],
"acked_messages": 894,
"messages_in_history": 1805,
"lost_acked_messages": 0,
"duplicate_messages": 0
}
]
}
+712
View File
@@ -0,0 +1,712 @@
{
"method": "closed loop 8 workers: POST message (retry same Idempotency-Key on error) + GET page; client timeout 2s; each replica stopped with docker stop -t 8, restored, then the next",
"replicas": [
"bb53391a07f1",
"e51c99b5436b"
],
"warmup_seconds": 5,
"seconds_down": 15,
"runs": [
{
"stopped_replica": "bb53391a07f1",
"baseline_before_stop": {
"seconds": 7.73,
"successful_requests": 339,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 43.8,
"latency_ms": {
"p50": 147.3,
"p95": 398.0,
"p99": 597.8
}
},
"stop_to_restore": {
"seconds": 19.62,
"successful_requests": 467,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 23.8,
"latency_ms": {
"p50": 314.1,
"p95": 602.1,
"p99": 699.8
}
},
"after_restore": {
"seconds": 29.0,
"successful_requests": 894,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 30.8,
"latency_ms": {
"p50": 253.7,
"p95": 590.4,
"p99": 704.4
}
},
"docker_stop_seconds": 4.62,
"last_error_seconds_after_stop": 0.0,
"first_success_on_other_replica_seconds": 0.02,
"requests_served_by_stopped_replica_after_stop_returned": 0,
"seconds_until_replica_back_in_rotation": 20.86,
"instances_seen": [
"bb53391a07f1",
"e51c99b5436b"
],
"resource_snapshot_under_load": [
"mtusi-lab3-api-1: cpu 90.61%, mem 81.91MiB / 512MiB",
"mtusi-lab3-api-2: cpu 103.60%, mem 82.59MiB / 512MiB",
"mtusi-lab3-lb-1: cpu 15.84%, mem 13.01MiB / 128MiB",
"mtusi-lab3-postgres-1: cpu 57.27%, mem 54.5MiB / 512MiB"
],
"timeline_per_second": [
{
"t": 0,
"ok": 34,
"errors": 0
},
{
"t": 1,
"ok": 45,
"errors": 0
},
{
"t": 2,
"ok": 29,
"errors": 0
},
{
"t": 3,
"ok": 45,
"errors": 0
},
{
"t": 4,
"ok": 50,
"errors": 0
},
{
"t": 5,
"ok": 48,
"errors": 0
},
{
"t": 6,
"ok": 54,
"errors": 0
},
{
"t": 7,
"ok": 48,
"errors": 0
},
{
"t": 8,
"ok": 32,
"errors": 0
},
{
"t": 9,
"ok": 16,
"errors": 0
},
{
"t": 10,
"ok": 23,
"errors": 0
},
{
"t": 11,
"ok": 22,
"errors": 0
},
{
"t": 12,
"ok": 21,
"errors": 0
},
{
"t": 13,
"ok": 26,
"errors": 0
},
{
"t": 14,
"ok": 27,
"errors": 0
},
{
"t": 15,
"ok": 18,
"errors": 0
},
{
"t": 16,
"ok": 15,
"errors": 0
},
{
"t": 17,
"ok": 18,
"errors": 0
},
{
"t": 18,
"ok": 26,
"errors": 0
},
{
"t": 19,
"ok": 30,
"errors": 0
},
{
"t": 20,
"ok": 27,
"errors": 0
},
{
"t": 21,
"ok": 27,
"errors": 0
},
{
"t": 22,
"ok": 29,
"errors": 0
},
{
"t": 23,
"ok": 16,
"errors": 0
},
{
"t": 24,
"ok": 13,
"errors": 0
},
{
"t": 25,
"ok": 28,
"errors": 0
},
{
"t": 26,
"ok": 30,
"errors": 0
},
{
"t": 27,
"ok": 25,
"errors": 0
},
{
"t": 28,
"ok": 26,
"errors": 0
},
{
"t": 29,
"ok": 25,
"errors": 0
},
{
"t": 30,
"ok": 18,
"errors": 0
},
{
"t": 31,
"ok": 15,
"errors": 0
},
{
"t": 32,
"ok": 22,
"errors": 0
},
{
"t": 33,
"ok": 24,
"errors": 0
},
{
"t": 34,
"ok": 30,
"errors": 0
},
{
"t": 35,
"ok": 27,
"errors": 0
},
{
"t": 36,
"ok": 27,
"errors": 0
},
{
"t": 37,
"ok": 19,
"errors": 0
},
{
"t": 38,
"ok": 16,
"errors": 0
},
{
"t": 39,
"ok": 16,
"errors": 0
},
{
"t": 40,
"ok": 25,
"errors": 0
},
{
"t": 41,
"ok": 28,
"errors": 0
},
{
"t": 42,
"ok": 29,
"errors": 0
},
{
"t": 43,
"ok": 25,
"errors": 0
},
{
"t": 44,
"ok": 30,
"errors": 0
},
{
"t": 45,
"ok": 38,
"errors": 0
},
{
"t": 46,
"ok": 22,
"errors": 0
},
{
"t": 47,
"ok": 40,
"errors": 0
},
{
"t": 48,
"ok": 51,
"errors": 0
},
{
"t": 49,
"ok": 56,
"errors": 0
},
{
"t": 50,
"ok": 38,
"errors": 0
},
{
"t": 51,
"ok": 37,
"errors": 0
},
{
"t": 52,
"ok": 49,
"errors": 0
},
{
"t": 53,
"ok": 27,
"errors": 0
},
{
"t": 54,
"ok": 40,
"errors": 0
},
{
"t": 55,
"ok": 56,
"errors": 0
},
{
"t": 56,
"ok": 22,
"errors": 0
}
],
"acked_messages": 850,
"messages_in_history": 850,
"lost_acked_messages": 0,
"duplicate_messages": 0
},
{
"stopped_replica": "e51c99b5436b",
"baseline_before_stop": {
"seconds": 7.62,
"successful_requests": 295,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 38.7,
"latency_ms": {
"p50": 169.1,
"p95": 520.0,
"p99": 644.0
}
},
"stop_to_restore": {
"seconds": 19.96,
"successful_requests": 465,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 23.3,
"latency_ms": {
"p50": 321.7,
"p95": 602.9,
"p99": 694.0
}
},
"after_restore": {
"seconds": 29.98,
"successful_requests": 966,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 32.2,
"latency_ms": {
"p50": 237.7,
"p95": 579.4,
"p99": 767.1
}
},
"docker_stop_seconds": 4.96,
"last_error_seconds_after_stop": 0.0,
"first_success_on_other_replica_seconds": 0.0,
"requests_served_by_stopped_replica_after_stop_returned": 0,
"seconds_until_replica_back_in_rotation": 21.78,
"instances_seen": [
"bb53391a07f1",
"e51c99b5436b"
],
"resource_snapshot_under_load": [
"mtusi-lab3-api-1: cpu 103.71%, mem 82.34MiB / 512MiB",
"mtusi-lab3-api-2: cpu 89.86%, mem 90.22MiB / 512MiB",
"mtusi-lab3-lb-1: cpu 24.15%, mem 13.37MiB / 128MiB",
"mtusi-lab3-postgres-1: cpu 34.28%, mem 54.15MiB / 512MiB"
],
"timeline_per_second": [
{
"t": 0,
"ok": 19,
"errors": 0
},
{
"t": 1,
"ok": 30,
"errors": 0
},
{
"t": 2,
"ok": 53,
"errors": 0
},
{
"t": 3,
"ok": 35,
"errors": 0
},
{
"t": 4,
"ok": 28,
"errors": 0
},
{
"t": 5,
"ok": 53,
"errors": 0
},
{
"t": 6,
"ok": 52,
"errors": 0
},
{
"t": 7,
"ok": 38,
"errors": 0
},
{
"t": 8,
"ok": 28,
"errors": 0
},
{
"t": 9,
"ok": 24,
"errors": 0
},
{
"t": 10,
"ok": 28,
"errors": 0
},
{
"t": 11,
"ok": 27,
"errors": 0
},
{
"t": 12,
"ok": 27,
"errors": 0
},
{
"t": 13,
"ok": 22,
"errors": 0
},
{
"t": 14,
"ok": 19,
"errors": 0
},
{
"t": 15,
"ok": 15,
"errors": 0
},
{
"t": 16,
"ok": 17,
"errors": 0
},
{
"t": 17,
"ok": 27,
"errors": 0
},
{
"t": 18,
"ok": 21,
"errors": 0
},
{
"t": 19,
"ok": 27,
"errors": 0
},
{
"t": 20,
"ok": 27,
"errors": 0
},
{
"t": 21,
"ok": 24,
"errors": 0
},
{
"t": 22,
"ok": 13,
"errors": 0
},
{
"t": 23,
"ok": 13,
"errors": 0
},
{
"t": 24,
"ok": 21,
"errors": 0
},
{
"t": 25,
"ok": 26,
"errors": 0
},
{
"t": 26,
"ok": 30,
"errors": 0
},
{
"t": 27,
"ok": 27,
"errors": 0
},
{
"t": 28,
"ok": 24,
"errors": 0
},
{
"t": 29,
"ok": 20,
"errors": 0
},
{
"t": 30,
"ok": 15,
"errors": 0
},
{
"t": 31,
"ok": 16,
"errors": 0
},
{
"t": 32,
"ok": 22,
"errors": 0
},
{
"t": 33,
"ok": 24,
"errors": 0
},
{
"t": 34,
"ok": 25,
"errors": 0
},
{
"t": 35,
"ok": 28,
"errors": 0
},
{
"t": 36,
"ok": 21,
"errors": 0
},
{
"t": 37,
"ok": 13,
"errors": 0
},
{
"t": 38,
"ok": 13,
"errors": 0
},
{
"t": 39,
"ok": 16,
"errors": 0
},
{
"t": 40,
"ok": 29,
"errors": 0
},
{
"t": 41,
"ok": 28,
"errors": 0
},
{
"t": 42,
"ok": 24,
"errors": 0
},
{
"t": 43,
"ok": 28,
"errors": 0
},
{
"t": 44,
"ok": 29,
"errors": 0
},
{
"t": 45,
"ok": 25,
"errors": 0
},
{
"t": 46,
"ok": 39,
"errors": 0
},
{
"t": 47,
"ok": 49,
"errors": 0
},
{
"t": 48,
"ok": 51,
"errors": 0
},
{
"t": 49,
"ok": 57,
"errors": 0
},
{
"t": 50,
"ok": 50,
"errors": 0
},
{
"t": 51,
"ok": 34,
"errors": 0
},
{
"t": 52,
"ok": 31,
"errors": 0
},
{
"t": 53,
"ok": 47,
"errors": 0
},
{
"t": 54,
"ok": 57,
"errors": 0
},
{
"t": 55,
"ok": 55,
"errors": 0
},
{
"t": 56,
"ok": 54,
"errors": 0
},
{
"t": 57,
"ok": 31,
"errors": 0
}
],
"acked_messages": 863,
"messages_in_history": 1713,
"lost_acked_messages": 0,
"duplicate_messages": 0
}
]
}
+196
View File
@@ -0,0 +1,196 @@
{
"method": "30 rounds; each round 16 simultaneous identical POSTs with one Idempotency-Key through the LB (separate connections, released by a barrier)",
"rounds": 30,
"parallel_requests_per_round": 16,
"instances_seen": [
"bb53391a07f1",
"e51c99b5436b"
],
"all_rounds_single_message_id": true,
"failed_requests": 0,
"rounds_with_requests_on_2plus_replicas": 30,
"messages_created_per_key_max": 1,
"same_key_other_body_status": 409,
"per_round": [
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
},
{
"responses_201": 16,
"failures": 0,
"distinct_message_ids": 1,
"distinct_instances": 2
}
]
}
+7
View File
@@ -0,0 +1,7 @@
# 2026-10-29T10:53:36
20 x GET /api/v1/users/me with ONE bearer token (no re-login) through LB:
X-Instance-Id 3de2fdb570eb -> 10 responses
X-Instance-Id 945116f913cc -> 10 responses
$ docker ps (api containers: short ID = hostname = X-Instance-Id; no published ports)
945116f913cc mtusi-lab3-api-5 Up 36 seconds (healthy) ports=8080/tcp
3de2fdb570eb mtusi-lab3-api-6 Up About a minute (healthy) ports=8080/tcp
+19
View File
@@ -0,0 +1,19 @@
# 2026-10-29T10:54:06 persistence: restart lb, api, postgres with volumes kept; same bearer token after restart
## containers BEFORE
/mtusi-lab3-api-5 running StartedAt=2026-10-29T07:53:03.171345935Z
/mtusi-lab3-api-6 running StartedAt=2026-10-29T07:52:20.424136452Z
/mtusi-lab3-migrate-1 exited StartedAt=2026-10-29T07:52:54.407649276Z
/mtusi-lab3-lb-1 running StartedAt=2026-10-29T07:40:06.38472124Z
/mtusi-lab3-postgres-1 running StartedAt=2026-10-29T07:28:35.676622955Z
volume mtusi-lab3_postgres_data CreatedAt=2026-10-29T07:16:23Z
$ python tests/resilience.py --mode persistence --action-script scripts/restart.cmd
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
exit=0 (test took 41s)
## containers AFTER (new StartedAt = really restarted, volume CreatedAt unchanged)
/mtusi-lab3-migrate-1 exited StartedAt=2026-10-29T07:54:25.913938428Z
/mtusi-lab3-api-5 running StartedAt=2026-10-29T07:54:35.437454812Z
/mtusi-lab3-api-6 running StartedAt=2026-10-29T07:54:35.935961297Z
/mtusi-lab3-lb-1 running StartedAt=2026-10-29T07:54:42.453081277Z
/mtusi-lab3-postgres-1 running StartedAt=2026-10-29T07:54:19.666540466Z
volume mtusi-lab3_postgres_data CreatedAt=2026-10-29T07:16:23Z
+5
View File
@@ -0,0 +1,5 @@
# 2026-10-29T10:29:42 student tests against local PostgreSQL (compose), DB messenger_test
$ .venv\Scripts\python.exe -m pytest -q
............................................ [100%]
44 passed in 62.86s (0:01:02)
exit=0
+842
View File
@@ -0,0 +1,842 @@
{
"method": "closed loop 8 workers under rolling replacement: start N new replicas of the new build, wait until healthy and routed by LB, then stop+remove old replicas one at a time",
"replicas_before": [
"0a88ad74a16f",
"d47dafe15036"
],
"replicas_after": [
"3de2fdb570eb",
"945116f913cc"
],
"new_replicas": [
"3de2fdb570eb",
"945116f913cc"
],
"old_image_ids": {
"0a88ad74a16f": "sha256:5188aa6e7392cab4e9fbcf712a04a24e7f6e7f0e610676633cbaf67efc39cfc5",
"d47dafe15036": "sha256:5188aa6e7392cab4e9fbcf712a04a24e7f6e7f0e610676633cbaf67efc39cfc5"
},
"new_image_ids": {
"3de2fdb570eb": "sha256:35f4b43a6b981783ec1342221ba5f066f8e630dddc7ab2c424c8cbe208fa9921",
"945116f913cc": "sha256:35f4b43a6b981783ec1342221ba5f066f8e630dddc7ab2c424c8cbe208fa9921"
},
"app_version_build_arg": "rolling-104629",
"update_seconds": 137.13,
"steps": [
{
"replaced": "0a88ad74a16f",
"seconds_into_update": 118.09
},
{
"replaced": "d47dafe15036",
"seconds_into_update": 126.86
}
],
"before_update": {
"seconds": 5.29,
"successful_requests": 183,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 34.6,
"latency_ms": {
"p50": 139.4,
"p95": 509.9,
"p99": 716.6
}
},
"during_update": {
"seconds": 137.13,
"successful_requests": 5641,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 41.1,
"latency_ms": {
"p50": 134.9,
"p95": 542.3,
"p99": 696.1
}
},
"after_update": {
"seconds": 8.25,
"successful_requests": 384,
"failed_requests": 0,
"error_reasons": {},
"error_ratio": 0.0,
"successful_rps": 46.5,
"latency_ms": {
"p50": 165.1,
"p95": 409.6,
"p99": 603.4
}
},
"first_new_replica_response_seconds_into_update": 115.74,
"last_old_replica_response_seconds_into_update": 128.45,
"migrate_output_tail": [
" Container mtusi-lab3-migrate-run-b1814ed4ca5d Created ",
"INFO [alembic.runtime.migration] Context impl PostgresqlImpl.",
"INFO [alembic.runtime.migration] Will assume transactional DDL."
],
"timeline_per_second": [
{
"t": 0,
"ok": 32,
"errors": 0
},
{
"t": 1,
"ok": 33,
"errors": 0
},
{
"t": 2,
"ok": 35,
"errors": 0
},
{
"t": 3,
"ok": 45,
"errors": 0
},
{
"t": 4,
"ok": 32,
"errors": 0
},
{
"t": 5,
"ok": 26,
"errors": 0
},
{
"t": 6,
"ok": 44,
"errors": 0
},
{
"t": 7,
"ok": 48,
"errors": 0
},
{
"t": 8,
"ok": 40,
"errors": 0
},
{
"t": 9,
"ok": 28,
"errors": 0
},
{
"t": 10,
"ok": 32,
"errors": 0
},
{
"t": 11,
"ok": 44,
"errors": 0
},
{
"t": 12,
"ok": 27,
"errors": 0
},
{
"t": 13,
"ok": 30,
"errors": 0
},
{
"t": 14,
"ok": 49,
"errors": 0
},
{
"t": 15,
"ok": 50,
"errors": 0
},
{
"t": 16,
"ok": 35,
"errors": 0
},
{
"t": 17,
"ok": 30,
"errors": 0
},
{
"t": 18,
"ok": 43,
"errors": 0
},
{
"t": 19,
"ok": 34,
"errors": 0
},
{
"t": 20,
"ok": 30,
"errors": 0
},
{
"t": 21,
"ok": 43,
"errors": 0
},
{
"t": 22,
"ok": 58,
"errors": 0
},
{
"t": 23,
"ok": 45,
"errors": 0
},
{
"t": 24,
"ok": 33,
"errors": 0
},
{
"t": 25,
"ok": 37,
"errors": 0
},
{
"t": 26,
"ok": 52,
"errors": 0
},
{
"t": 27,
"ok": 29,
"errors": 0
},
{
"t": 28,
"ok": 34,
"errors": 0
},
{
"t": 29,
"ok": 55,
"errors": 0
},
{
"t": 30,
"ok": 55,
"errors": 0
},
{
"t": 31,
"ok": 36,
"errors": 0
},
{
"t": 32,
"ok": 31,
"errors": 0
},
{
"t": 33,
"ok": 54,
"errors": 0
},
{
"t": 34,
"ok": 40,
"errors": 0
},
{
"t": 35,
"ok": 30,
"errors": 0
},
{
"t": 36,
"ok": 49,
"errors": 0
},
{
"t": 37,
"ok": 59,
"errors": 0
},
{
"t": 38,
"ok": 42,
"errors": 0
},
{
"t": 39,
"ok": 31,
"errors": 0
},
{
"t": 40,
"ok": 31,
"errors": 0
},
{
"t": 41,
"ok": 36,
"errors": 0
},
{
"t": 42,
"ok": 28,
"errors": 0
},
{
"t": 43,
"ok": 34,
"errors": 0
},
{
"t": 44,
"ok": 49,
"errors": 0
},
{
"t": 45,
"ok": 48,
"errors": 0
},
{
"t": 46,
"ok": 30,
"errors": 0
},
{
"t": 47,
"ok": 32,
"errors": 0
},
{
"t": 48,
"ok": 40,
"errors": 0
},
{
"t": 49,
"ok": 36,
"errors": 0
},
{
"t": 50,
"ok": 27,
"errors": 0
},
{
"t": 51,
"ok": 49,
"errors": 0
},
{
"t": 52,
"ok": 54,
"errors": 0
},
{
"t": 53,
"ok": 38,
"errors": 0
},
{
"t": 54,
"ok": 30,
"errors": 0
},
{
"t": 55,
"ok": 37,
"errors": 0
},
{
"t": 56,
"ok": 41,
"errors": 0
},
{
"t": 57,
"ok": 33,
"errors": 0
},
{
"t": 58,
"ok": 46,
"errors": 0
},
{
"t": 59,
"ok": 53,
"errors": 0
},
{
"t": 60,
"ok": 57,
"errors": 0
},
{
"t": 61,
"ok": 34,
"errors": 0
},
{
"t": 62,
"ok": 35,
"errors": 0
},
{
"t": 63,
"ok": 50,
"errors": 0
},
{
"t": 64,
"ok": 31,
"errors": 0
},
{
"t": 65,
"ok": 45,
"errors": 0
},
{
"t": 66,
"ok": 58,
"errors": 0
},
{
"t": 67,
"ok": 55,
"errors": 0
},
{
"t": 68,
"ok": 40,
"errors": 0
},
{
"t": 69,
"ok": 28,
"errors": 0
},
{
"t": 70,
"ok": 50,
"errors": 0
},
{
"t": 71,
"ok": 28,
"errors": 0
},
{
"t": 72,
"ok": 40,
"errors": 0
},
{
"t": 73,
"ok": 60,
"errors": 0
},
{
"t": 74,
"ok": 57,
"errors": 0
},
{
"t": 75,
"ok": 41,
"errors": 0
},
{
"t": 76,
"ok": 33,
"errors": 0
},
{
"t": 77,
"ok": 31,
"errors": 0
},
{
"t": 78,
"ok": 29,
"errors": 0
},
{
"t": 79,
"ok": 26,
"errors": 0
},
{
"t": 80,
"ok": 53,
"errors": 0
},
{
"t": 81,
"ok": 43,
"errors": 0
},
{
"t": 82,
"ok": 54,
"errors": 0
},
{
"t": 83,
"ok": 29,
"errors": 0
},
{
"t": 84,
"ok": 35,
"errors": 0
},
{
"t": 85,
"ok": 30,
"errors": 0
},
{
"t": 86,
"ok": 35,
"errors": 0
},
{
"t": 87,
"ok": 46,
"errors": 0
},
{
"t": 88,
"ok": 48,
"errors": 0
},
{
"t": 89,
"ok": 54,
"errors": 0
},
{
"t": 90,
"ok": 32,
"errors": 0
},
{
"t": 91,
"ok": 31,
"errors": 0
},
{
"t": 92,
"ok": 49,
"errors": 0
},
{
"t": 93,
"ok": 31,
"errors": 0
},
{
"t": 94,
"ok": 41,
"errors": 0
},
{
"t": 95,
"ok": 57,
"errors": 0
},
{
"t": 96,
"ok": 56,
"errors": 0
},
{
"t": 97,
"ok": 41,
"errors": 0
},
{
"t": 98,
"ok": 28,
"errors": 0
},
{
"t": 99,
"ok": 42,
"errors": 0
},
{
"t": 100,
"ok": 30,
"errors": 0
},
{
"t": 101,
"ok": 30,
"errors": 0
},
{
"t": 102,
"ok": 46,
"errors": 0
},
{
"t": 103,
"ok": 56,
"errors": 0
},
{
"t": 104,
"ok": 51,
"errors": 0
},
{
"t": 105,
"ok": 25,
"errors": 0
},
{
"t": 106,
"ok": 31,
"errors": 0
},
{
"t": 107,
"ok": 49,
"errors": 0
},
{
"t": 108,
"ok": 30,
"errors": 0
},
{
"t": 109,
"ok": 40,
"errors": 0
},
{
"t": 110,
"ok": 49,
"errors": 0
},
{
"t": 111,
"ok": 46,
"errors": 0
},
{
"t": 112,
"ok": 33,
"errors": 0
},
{
"t": 113,
"ok": 29,
"errors": 0
},
{
"t": 114,
"ok": 21,
"errors": 0
},
{
"t": 115,
"ok": 31,
"errors": 0
},
{
"t": 116,
"ok": 30,
"errors": 0
},
{
"t": 117,
"ok": 43,
"errors": 0
},
{
"t": 118,
"ok": 56,
"errors": 0
},
{
"t": 119,
"ok": 53,
"errors": 0
},
{
"t": 120,
"ok": 31,
"errors": 0
},
{
"t": 121,
"ok": 57,
"errors": 0
},
{
"t": 122,
"ok": 65,
"errors": 0
},
{
"t": 123,
"ok": 51,
"errors": 0
},
{
"t": 124,
"ok": 66,
"errors": 0
},
{
"t": 125,
"ok": 68,
"errors": 0
},
{
"t": 126,
"ok": 36,
"errors": 0
},
{
"t": 127,
"ok": 30,
"errors": 0
},
{
"t": 128,
"ok": 40,
"errors": 0
},
{
"t": 129,
"ok": 34,
"errors": 0
},
{
"t": 130,
"ok": 44,
"errors": 0
},
{
"t": 131,
"ok": 72,
"errors": 0
},
{
"t": 132,
"ok": 48,
"errors": 0
},
{
"t": 133,
"ok": 38,
"errors": 0
},
{
"t": 134,
"ok": 29,
"errors": 0
},
{
"t": 135,
"ok": 42,
"errors": 0
},
{
"t": 136,
"ok": 54,
"errors": 0
},
{
"t": 137,
"ok": 53,
"errors": 0
},
{
"t": 138,
"ok": 47,
"errors": 0
},
{
"t": 139,
"ok": 52,
"errors": 0
},
{
"t": 140,
"ok": 33,
"errors": 0
},
{
"t": 141,
"ok": 29,
"errors": 0
},
{
"t": 142,
"ok": 31,
"errors": 0
},
{
"t": 143,
"ok": 55,
"errors": 0
},
{
"t": 144,
"ok": 57,
"errors": 0
},
{
"t": 145,
"ok": 55,
"errors": 0
},
{
"t": 146,
"ok": 52,
"errors": 0
},
{
"t": 147,
"ok": 40,
"errors": 0
},
{
"t": 148,
"ok": 32,
"errors": 0
},
{
"t": 149,
"ok": 39,
"errors": 0
},
{
"t": 150,
"ok": 34,
"errors": 0
}
],
"acked_messages": 3104,
"messages_in_history": 3104,
"lost_acked_messages": 0,
"duplicate_messages": 0
}
+7
View File
@@ -0,0 +1,7 @@
# 2026-10-29T10:53:14 base commit 0ab3a34 (+ solution); stack: lb + api x2 (1 CPU/512M each) + postgres
$ python scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
exit=0
$ python tests/smoke.py --base-url http://localhost:8080
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
exit=0