This commit is contained in:
Xabenskie
2026-11-02 11:42:24 +03:00
parent 0ab3a341aa
commit 3ba9310ded
53 changed files with 3293 additions and 25 deletions
+2
View File
@@ -0,0 +1,2 @@
python3 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.
+11
View File
@@ -0,0 +1,11 @@
{
"result": "PASS",
"parallel_requests": 8,
"observed_instances": [
"a125004f5fbb4f9e91edb14bb3e64993",
"a8916b2407ed45cc87d73e88cf1639b9"
],
"responses_201": 8,
"messages_created": 1,
"different_body_status": 409
}
+20
View File
@@ -0,0 +1,20 @@
{
"result": "PASS",
"redis": {
"profile_status": 200,
"fallback_seconds": 0.0138,
"anonymous": 401,
"readiness": 200
},
"postgres": {
"authenticated_status": 503,
"response_seconds": 0.0048,
"anonymous_status": 401,
"internal_api_liveness": [
200,
200
],
"note": "Nginx-generated502/503/504 may have no API JSON/instance headers when all backends become unavailable."
},
"same_session_after_recovery": true
}
+39
View File
@@ -0,0 +1,39 @@
{
"captured_at_utc": "2026-11-02T08:38:18.305573+00:00",
"host_os": "macOS-27.2-arm64-arm-64bit-Mach-O",
"host_architecture": "arm64",
"docker": {
"server_version": "29.8.2",
"cpus": 12,
"memory_bytes": 8319238144,
"architecture": "aarch64"
},
"python_in_image": "Python 3.13.5",
"dataset_before": {
"users": 117,
"chats": 53,
"messages": 102032,
"sessions": 102,
"idempotency_records": 102011
},
"limits": {
"api_each": "0.75 CPU / 384 MiB",
"postgres": "1 CPU / 512 MiB",
"redis": "0.25 CPU / 128 MiB",
"lb": "0.5 CPU / 128 MiB"
},
"warmup": "API already healthy; acceptance, persistence and dependency checks performed before benchmark. No separate timed load warmup.",
"replicas": 2,
"repetitions": 1,
"duration_seconds": 30,
"concurrency": 4,
"host_cpu": "Apple M4 Pro",
"host_memory_bytes": 25769803776,
"dataset_after": {
"users": 120,
"chats": 54,
"messages": 126591,
"sessions": 105,
"idempotency_records": 126570
}
}
+8
View File
@@ -0,0 +1,8 @@
./scripts/check_fresh_migrations.sh
Applied 001_initial.sql
Applied 002_idempotency.sql
Migrations up to date
Migrations up to date
.............. [100%]
14 passed in 3.56s
PASS: migrations and application tests on fresh disposable PostgreSQL and Redis volumes.
+16
View File
@@ -0,0 +1,16 @@
{
"result": "PASS",
"target_container": "e8c5e3cb84a8918b5603e202cd1d66334d12a4943321e6db6d26716cc361b19d",
"target_instance": "4ffdcca2f8644acd9b76d65f8260eaf7",
"fixture": "temporary BEFORE INSERT trigger sleeps2s for one synthetic text; removed afterwards",
"in_flight_observed_in_pg_stat_activity": true,
"in_flight_response": 201,
"new_tcp_after_sigterm": {
"accepted": false,
"error_type": "ConnectionRefusedError"
},
"target_still_running_when_new_tcp_rejected": true,
"exit_code": 0,
"shutdown_seconds_from_sigterm": 1.9171,
"confirmed_message_preserved": true
}
+126
View File
@@ -0,0 +1,126 @@
{
"result": "PASS",
"containers": [
{
"service": "api",
"container": "8a1922748bf43fe98645bc9a03b0971445616c48bdf2df0690a386c293ebb710",
"name": "mtusi-lab3-api-5",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:37:46.879119007Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:86bd4cd854e6ccea91ee6f75e259b5808646c82e0946952fff8703ef205bb741",
"memory_bytes": 402653184,
"nano_cpus": 750000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data",
"mtusi-lab3_front"
],
"http_status": 200,
"instance": "0749a2e4af8a4b849e3eae6426945546",
"release": "lab3-9d88e53e"
},
{
"service": "api",
"container": "d63828d8ad840ddaa3e63b1dfe9716b2ace17e9eb9f05ec5bd5df73641fbf85f",
"name": "mtusi-lab3-api-6",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:37:52.762454968Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:86bd4cd854e6ccea91ee6f75e259b5808646c82e0946952fff8703ef205bb741",
"memory_bytes": 402653184,
"nano_cpus": 750000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data",
"mtusi-lab3_front"
],
"http_status": 200,
"instance": "dd54c30c2e4c413ea2e28066c45e0d3c",
"release": "lab3-9d88e53e"
},
{
"service": "lb",
"container": "8e7f7169b22230a255252691b145b2bd14394b16f9feb1a1f2fc4163fe03d59a",
"name": "mtusi-lab3-lb-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:32.827784792Z",
"image": "nginx:1.28.0-alpine",
"image_id": "sha256:30f1c0d78e0ad60901648be663a710bdadf19e4c10ac6782c235200619158284",
"memory_bytes": 134217728,
"nano_cpus": 500000000,
"published_ports": {
"8080/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "8080"
}
]
},
"volumes": [],
"networks": [
"mtusi-lab3_front"
]
},
{
"service": "migrate",
"container": "f28386721cb033e6cbc187963a0d606cac9d5cf04cb4c24b9bb87dd392942e43",
"name": "mtusi-lab3-migrate-1",
"status": "exited",
"health": null,
"started_at": "2026-11-02T08:36:54.173486177Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:1eb73e648436c8e2da04f5f1003b4804a91cdcef3cae9410c0f79d48ecd94ae9",
"memory_bytes": 268435456,
"nano_cpus": 500000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data"
]
},
{
"service": "postgres",
"container": "bfad6f9df6b7586ed9138173fc0414a86e67b4c1922a37ef3e645c461980deb7",
"name": "mtusi-lab3-postgres-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:38:04.389392668Z",
"image": "postgres:17.5-bookworm",
"image_id": "sha256:fbcea1bd13b6a882cd6caa6b58db3ae5c102efe50ec625b3e2a5cbc50db5bfe4",
"memory_bytes": 536870912,
"nano_cpus": 1000000000,
"published_ports": {},
"volumes": [
"mtusi-lab3_postgres_data"
],
"networks": [
"mtusi-lab3_data"
]
},
{
"service": "redis",
"container": "f8f6db5d380f2beacbd3c2af1d5b098a74da04f30b889ea3befafd0677ff08e4",
"name": "mtusi-lab3-redis-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:38:03.185004292Z",
"image": "redis:7.4.4-bookworm",
"image_id": "sha256:7b5ee51c14cf5febd4adde3a4b6cced72efdf154df7e9a0383163b13e16e9091",
"memory_bytes": 134217728,
"nano_cpus": 250000000,
"published_ports": {},
"volumes": [
"mtusi-lab3_redis_data"
],
"networks": [
"mtusi-lab3_data"
]
}
]
}
+11
View File
@@ -0,0 +1,11 @@
{
"container": "9ad409d735547c65b7a73a7bf803909e61256faec3266341934bf89608d848ea",
"name": "mtusi-lab3-api-4",
"instance": "9ab4e9373a944f05b69d934479430136",
"release": "lab3-9463abd8",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"stopped_at_utc": "2026-11-02T08:37:19.081389+00:00",
"stop_seconds": 0.4518,
"exit_code": 0,
"left_stopped": true
}
+17
View File
@@ -0,0 +1,17 @@
{
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.135,
"concurrency": 4,
"successful_requests": 24559,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 814.97,
"successful_latency_ms": {
"p50": 4.03,
"p95": 5.822,
"p99": 47.235
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+17
View File
@@ -0,0 +1,17 @@
{
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.135,
"concurrency": 4,
"successful_requests": 24559,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 814.97,
"successful_latency_ms": {
"p50": 4.03,
"p95": 5.822,
"p99": 47.235
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+11
View File
@@ -0,0 +1,11 @@
{
"result": "PASS",
"version": "nginx version: nginx/1.28.0",
"image": "nginx:1.28.0-alpine",
"public_server_header": "nginx",
"config_syntax": "PASS",
"observed_instances": [
"0749a2e4af8a4b849e3eae6426945546",
"dd54c30c2e4c413ea2e28066c45e0d3c"
]
}
+2
View File
@@ -0,0 +1,2 @@
python3 scripts/cluster.py exec python scripts/validate_openapi.py
PASS: full OpenAPI 3.1 and JSON Schema validation; application NOT tested.
+250
View File
@@ -0,0 +1,250 @@
{
"result": "PASS",
"before": [
{
"service": "api",
"container": "e8c5e3cb84a8918b5603e202cd1d66334d12a4943321e6db6d26716cc361b19d",
"name": "mtusi-lab3-api-3",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:24:29.880819722Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"memory_bytes": 402653184,
"nano_cpus": 750000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data",
"mtusi-lab3_front"
],
"http_status": 200,
"instance": "a125004f5fbb4f9e91edb14bb3e64993",
"release": "lab3-9463abd8"
},
{
"service": "api",
"container": "9ad409d735547c65b7a73a7bf803909e61256faec3266341934bf89608d848ea",
"name": "mtusi-lab3-api-4",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:24:29.778877972Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"memory_bytes": 402653184,
"nano_cpus": 750000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data",
"mtusi-lab3_front"
],
"http_status": 200,
"instance": "a8916b2407ed45cc87d73e88cf1639b9",
"release": "lab3-9463abd8"
},
{
"service": "lb",
"container": "8e7f7169b22230a255252691b145b2bd14394b16f9feb1a1f2fc4163fe03d59a",
"name": "mtusi-lab3-lb-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:23.133451802Z",
"image": "nginx:1.28.0-alpine",
"image_id": "sha256:30f1c0d78e0ad60901648be663a710bdadf19e4c10ac6782c235200619158284",
"memory_bytes": 134217728,
"nano_cpus": 500000000,
"published_ports": {
"8080/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "8080"
}
]
},
"volumes": [],
"networks": [
"mtusi-lab3_front"
]
},
{
"service": "migrate",
"container": "f28386721cb033e6cbc187963a0d606cac9d5cf04cb4c24b9bb87dd392942e43",
"name": "mtusi-lab3-migrate-1",
"status": "exited",
"health": null,
"started_at": "2026-11-02T08:24:32.061652Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:1eb73e648436c8e2da04f5f1003b4804a91cdcef3cae9410c0f79d48ecd94ae9",
"memory_bytes": 268435456,
"nano_cpus": 500000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data"
]
},
{
"service": "postgres",
"container": "bfad6f9df6b7586ed9138173fc0414a86e67b4c1922a37ef3e645c461980deb7",
"name": "mtusi-lab3-postgres-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:24:29.651115763Z",
"image": "postgres:17.5-bookworm",
"image_id": "sha256:fbcea1bd13b6a882cd6caa6b58db3ae5c102efe50ec625b3e2a5cbc50db5bfe4",
"memory_bytes": 536870912,
"nano_cpus": 1000000000,
"published_ports": {},
"volumes": [
"mtusi-lab3_postgres_data"
],
"networks": [
"mtusi-lab3_data"
]
},
{
"service": "redis",
"container": "f8f6db5d380f2beacbd3c2af1d5b098a74da04f30b889ea3befafd0677ff08e4",
"name": "mtusi-lab3-redis-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:24:29.682187472Z",
"image": "redis:7.4.4-bookworm",
"image_id": "sha256:7b5ee51c14cf5febd4adde3a4b6cced72efdf154df7e9a0383163b13e16e9091",
"memory_bytes": 134217728,
"nano_cpus": 250000000,
"published_ports": {},
"volumes": [
"mtusi-lab3_redis_data"
],
"networks": [
"mtusi-lab3_data"
]
}
],
"after": [
{
"service": "api",
"container": "e8c5e3cb84a8918b5603e202cd1d66334d12a4943321e6db6d26716cc361b19d",
"name": "mtusi-lab3-api-3",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:33.199244251Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"memory_bytes": 402653184,
"nano_cpus": 750000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data",
"mtusi-lab3_front"
],
"http_status": 200,
"instance": "f9c80459570c4c99991024bba6d2b167",
"release": "lab3-9463abd8"
},
{
"service": "api",
"container": "9ad409d735547c65b7a73a7bf803909e61256faec3266341934bf89608d848ea",
"name": "mtusi-lab3-api-4",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:33.076891376Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"memory_bytes": 402653184,
"nano_cpus": 750000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data",
"mtusi-lab3_front"
],
"http_status": 200,
"instance": "782d112163514263a4c14c0fb6d68bfc",
"release": "lab3-9463abd8"
},
{
"service": "lb",
"container": "8e7f7169b22230a255252691b145b2bd14394b16f9feb1a1f2fc4163fe03d59a",
"name": "mtusi-lab3-lb-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:32.827784792Z",
"image": "nginx:1.28.0-alpine",
"image_id": "sha256:30f1c0d78e0ad60901648be663a710bdadf19e4c10ac6782c235200619158284",
"memory_bytes": 134217728,
"nano_cpus": 500000000,
"published_ports": {
"8080/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "8080"
}
]
},
"volumes": [],
"networks": [
"mtusi-lab3_front"
]
},
{
"service": "migrate",
"container": "f28386721cb033e6cbc187963a0d606cac9d5cf04cb4c24b9bb87dd392942e43",
"name": "mtusi-lab3-migrate-1",
"status": "exited",
"health": null,
"started_at": "2026-11-02T08:36:35.37548171Z",
"image": "mtusi-lab3-api:lab3",
"image_id": "sha256:1eb73e648436c8e2da04f5f1003b4804a91cdcef3cae9410c0f79d48ecd94ae9",
"memory_bytes": 268435456,
"nano_cpus": 500000000,
"published_ports": {},
"volumes": [],
"networks": [
"mtusi-lab3_data"
]
},
{
"service": "postgres",
"container": "bfad6f9df6b7586ed9138173fc0414a86e67b4c1922a37ef3e645c461980deb7",
"name": "mtusi-lab3-postgres-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:32.796757626Z",
"image": "postgres:17.5-bookworm",
"image_id": "sha256:fbcea1bd13b6a882cd6caa6b58db3ae5c102efe50ec625b3e2a5cbc50db5bfe4",
"memory_bytes": 536870912,
"nano_cpus": 1000000000,
"published_ports": {},
"volumes": [
"mtusi-lab3_postgres_data"
],
"networks": [
"mtusi-lab3_data"
]
},
{
"service": "redis",
"container": "f8f6db5d380f2beacbd3c2af1d5b098a74da04f30b889ea3befafd0677ff08e4",
"name": "mtusi-lab3-redis-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:32.773500709Z",
"image": "redis:7.4.4-bookworm",
"image_id": "sha256:7b5ee51c14cf5febd4adde3a4b6cced72efdf154df7e9a0383163b13e16e9091",
"memory_bytes": 134217728,
"nano_cpus": 250000000,
"published_ports": {},
"volumes": [
"mtusi-lab3_redis_data"
],
"networks": [
"mtusi-lab3_data"
]
}
],
"public_test": "Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.\nPASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence."
}
+2
View File
@@ -0,0 +1,2 @@
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
+15
View File
@@ -0,0 +1,15 @@
{
"result": "PASS",
"public_test": "Executing explicit failover hook; hook output suppressed to avoid leaking secrets.\n{\"observed_instances_before\": 2, \"successful_writes\": 132, \"failed_attempts\": 0, \"first_recovery_seconds\": 0.871}\nPASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.",
"stopped": {
"container": "9ad409d735547c65b7a73a7bf803909e61256faec3266341934bf89608d848ea",
"name": "mtusi-lab3-api-4",
"instance": "782d112163514263a4c14c0fb6d68bfc",
"release": "lab3-9463abd8",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"stopped_at_utc": "2026-11-02T08:36:39.262177+00:00",
"stop_seconds": 0.3321,
"exit_code": 0,
"left_stopped": true
}
}
+3
View File
@@ -0,0 +1,3 @@
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 132, "failed_attempts": 0, "first_recovery_seconds": 0.871}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+25
View File
@@ -0,0 +1,25 @@
{
"samples": 10,
"per_container_peaks": {
"mtusi-lab3-api-5": {
"cpu_percent_peak": 68.64,
"memory_mib_peak": 78.41
},
"mtusi-lab3-api-6": {
"cpu_percent_peak": 69.43,
"memory_mib_peak": 66.61
},
"mtusi-lab3-lb-1": {
"cpu_percent_peak": 10.01,
"memory_mib_peak": 7.895
},
"mtusi-lab3-postgres-1": {
"cpu_percent_peak": 42.15,
"memory_mib_peak": 99.4
},
"mtusi-lab3-redis-1": {
"cpu_percent_peak": 0.99,
"memory_mib_peak": 11.04
}
}
}
+402
View File
@@ -0,0 +1,402 @@
[
{
"at_utc": "2026-11-02T08:38:21.926644+00:00",
"containers": [
{
"CPUPerc": "50.31%",
"MemPerc": "17.21%",
"MemUsage": "66.08MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "8"
},
{
"CPUPerc": "66.02%",
"MemPerc": "17.20%",
"MemUsage": "66.05MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "9"
},
{
"CPUPerc": "9.06%",
"MemPerc": "5.98%",
"MemUsage": "7.652MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "30.22%",
"MemPerc": "15.95%",
"MemUsage": "81.65MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.14%",
"MemPerc": "8.26%",
"MemUsage": "10.58MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:24.960579+00:00",
"containers": [
{
"CPUPerc": "68.64%",
"MemPerc": "17.27%",
"MemUsage": "66.31MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "9"
},
{
"CPUPerc": "53.09%",
"MemPerc": "17.15%",
"MemUsage": "65.86MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "9.49%",
"MemPerc": "5.70%",
"MemUsage": "7.293MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "31.09%",
"MemPerc": "16.17%",
"MemUsage": "82.77MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.91%",
"MemPerc": "8.30%",
"MemUsage": "10.62MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:27.995870+00:00",
"containers": [
{
"CPUPerc": "58.43%",
"MemPerc": "20.27%",
"MemUsage": "77.83MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "10"
},
{
"CPUPerc": "56.00%",
"MemPerc": "17.20%",
"MemUsage": "66.07MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "9.79%",
"MemPerc": "5.76%",
"MemUsage": "7.379MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "33.22%",
"MemPerc": "16.73%",
"MemUsage": "85.67MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.90%",
"MemPerc": "8.13%",
"MemUsage": "10.4MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:31.030777+00:00",
"containers": [
{
"CPUPerc": "52.13%",
"MemPerc": "17.41%",
"MemUsage": "66.87MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "9"
},
{
"CPUPerc": "67.00%",
"MemPerc": "17.21%",
"MemUsage": "66.07MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "9.38%",
"MemPerc": "5.72%",
"MemUsage": "7.316MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "33.30%",
"MemPerc": "17.16%",
"MemUsage": "87.88MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.96%",
"MemPerc": "8.14%",
"MemUsage": "10.41MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:34.047170+00:00",
"containers": [
{
"CPUPerc": "65.51%",
"MemPerc": "17.21%",
"MemUsage": "66.1MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "10"
},
{
"CPUPerc": "52.34%",
"MemPerc": "17.24%",
"MemUsage": "66.21MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "9.16%",
"MemPerc": "5.85%",
"MemUsage": "7.488MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "30.55%",
"MemPerc": "17.40%",
"MemUsage": "89.08MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.93%",
"MemPerc": "8.11%",
"MemUsage": "10.38MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:37.087544+00:00",
"containers": [
{
"CPUPerc": "56.33%",
"MemPerc": "19.86%",
"MemUsage": "76.26MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "11"
},
{
"CPUPerc": "51.99%",
"MemPerc": "17.30%",
"MemUsage": "66.44MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "9.40%",
"MemPerc": "6.09%",
"MemUsage": "7.789MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "33.34%",
"MemPerc": "17.80%",
"MemUsage": "91.15MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.14%",
"MemPerc": "8.48%",
"MemUsage": "10.86MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:40.128204+00:00",
"containers": [
{
"CPUPerc": "49.82%",
"MemPerc": "17.23%",
"MemUsage": "66.16MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "10"
},
{
"CPUPerc": "64.91%",
"MemPerc": "17.32%",
"MemUsage": "66.5MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "9.44%",
"MemPerc": "5.81%",
"MemUsage": "7.438MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "30.24%",
"MemPerc": "18.14%",
"MemUsage": "92.86MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.94%",
"MemPerc": "8.63%",
"MemUsage": "11.04MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:43.146647+00:00",
"containers": [
{
"CPUPerc": "61.56%",
"MemPerc": "20.42%",
"MemUsage": "78.41MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "11"
},
{
"CPUPerc": "56.33%",
"MemPerc": "17.35%",
"MemUsage": "66.61MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "8.46%",
"MemPerc": "6.17%",
"MemUsage": "7.895MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "32.44%",
"MemPerc": "18.46%",
"MemUsage": "94.5MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.17%",
"MemPerc": "8.25%",
"MemUsage": "10.56MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:46.182717+00:00",
"containers": [
{
"CPUPerc": "64.09%",
"MemPerc": "17.39%",
"MemUsage": "66.78MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "9"
},
{
"CPUPerc": "66.93%",
"MemPerc": "17.24%",
"MemUsage": "66.19MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "8.61%",
"MemPerc": "5.89%",
"MemUsage": "7.539MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "42.15%",
"MemPerc": "19.17%",
"MemUsage": "98.16MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.14%",
"MemPerc": "8.27%",
"MemUsage": "10.58MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
},
{
"at_utc": "2026-11-02T08:38:49.213747+00:00",
"containers": [
{
"CPUPerc": "53.84%",
"MemPerc": "17.29%",
"MemUsage": "66.39MiB / 384MiB",
"Name": "mtusi-lab3-api-5",
"PIDs": "9"
},
{
"CPUPerc": "69.43%",
"MemPerc": "17.32%",
"MemUsage": "66.5MiB / 384MiB",
"Name": "mtusi-lab3-api-6",
"PIDs": "10"
},
{
"CPUPerc": "10.01%",
"MemPerc": "6.13%",
"MemUsage": "7.844MiB / 128MiB",
"Name": "mtusi-lab3-lb-1",
"PIDs": "2"
},
{
"CPUPerc": "34.69%",
"MemPerc": "19.41%",
"MemUsage": "99.4MiB / 512MiB",
"Name": "mtusi-lab3-postgres-1",
"PIDs": "16"
},
{
"CPUPerc": "0.99%",
"MemPerc": "8.46%",
"MemUsage": "10.83MiB / 128MiB",
"Name": "mtusi-lab3-redis-1",
"PIDs": "6"
}
]
}
]
+171
View File
@@ -0,0 +1,171 @@
{
"result": "PASS",
"before": [
{
"container": "e8c5e3cb84a8918b5603e202cd1d66334d12a4943321e6db6d26716cc361b19d",
"name": "mtusi-lab3-api-3",
"instance": "efae54a83fc844f4b19b1e1c2aad0385",
"release": "lab3-9463abd8",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af"
},
{
"container": "9ad409d735547c65b7a73a7bf803909e61256faec3266341934bf89608d848ea",
"name": "mtusi-lab3-api-4",
"instance": "1b7fd0264d924b3ba1b87368400b4a56",
"release": "lab3-9463abd8",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af"
}
],
"after": [
{
"container": "8a1922748bf43fe98645bc9a03b0971445616c48bdf2df0690a386c293ebb710",
"name": "mtusi-lab3-api-5",
"instance": "0749a2e4af8a4b849e3eae6426945546",
"release": "lab3-9d88e53e",
"image_id": "sha256:86bd4cd854e6ccea91ee6f75e259b5808646c82e0946952fff8703ef205bb741"
},
{
"container": "d63828d8ad840ddaa3e63b1dfe9716b2ace17e9eb9f05ec5bd5df73641fbf85f",
"name": "mtusi-lab3-api-6",
"instance": "dd54c30c2e4c413ea2e28066c45e0d3c",
"release": "lab3-9d88e53e",
"image_id": "sha256:86bd4cd854e6ccea91ee6f75e259b5808646c82e0946952fff8703ef205bb741"
}
],
"target_release": "lab3-9d88e53e",
"lb_before": {
"service": "lb",
"container": "8e7f7169b22230a255252691b145b2bd14394b16f9feb1a1f2fc4163fe03d59a",
"name": "mtusi-lab3-lb-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:32.827784792Z",
"image": "nginx:1.28.0-alpine",
"image_id": "sha256:30f1c0d78e0ad60901648be663a710bdadf19e4c10ac6782c235200619158284",
"memory_bytes": 134217728,
"nano_cpus": 500000000,
"published_ports": {
"8080/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "8080"
}
]
},
"volumes": [],
"networks": [
"mtusi-lab3_front"
]
},
"lb_after": {
"service": "lb",
"container": "8e7f7169b22230a255252691b145b2bd14394b16f9feb1a1f2fc4163fe03d59a",
"name": "mtusi-lab3-lb-1",
"status": "running",
"health": "healthy",
"started_at": "2026-11-02T08:36:32.827784792Z",
"image": "nginx:1.28.0-alpine",
"image_id": "sha256:30f1c0d78e0ad60901648be663a710bdadf19e4c10ac6782c235200619158284",
"memory_bytes": 134217728,
"nano_cpus": 500000000,
"published_ports": {
"8080/tcp": [
{
"HostIp": "127.0.0.1",
"HostPort": "8080"
}
]
},
"volumes": [],
"networks": [
"mtusi-lab3_front"
]
},
"lb_not_restarted": true,
"build_seconds": 2.2969,
"migration_output": "Migrations up to date",
"replacements": [
{
"old_container": "e8c5e3cb84a8918b5603e202cd1d66334d12a4943321e6db6d26716cc361b19d",
"new_container": "8a1922748bf43fe98645bc9a03b0971445616c48bdf2df0690a386c293ebb710",
"old_ip": "172.23.0.4",
"new_ip": "172.23.0.5",
"dns_discovered_new_address": true,
"instances_during_start_first": [
"0749a2e4af8a4b849e3eae6426945546",
"1b7fd0264d924b3ba1b87368400b4a56",
"efae54a83fc844f4b19b1e1c2aad0385"
],
"observed_instances": [
"0749a2e4af8a4b849e3eae6426945546",
"1b7fd0264d924b3ba1b87368400b4a56"
],
"old_exit_code": 0,
"seconds": 5.864
},
{
"old_container": "9ad409d735547c65b7a73a7bf803909e61256faec3266341934bf89608d848ea",
"new_container": "d63828d8ad840ddaa3e63b1dfe9716b2ace17e9eb9f05ec5bd5df73641fbf85f",
"old_ip": "172.23.0.2",
"new_ip": "172.23.0.4",
"dns_discovered_new_address": true,
"instances_during_start_first": [
"0749a2e4af8a4b849e3eae6426945546",
"1b7fd0264d924b3ba1b87368400b4a56",
"dd54c30c2e4c413ea2e28066c45e0d3c"
],
"observed_instances": [
"0749a2e4af8a4b849e3eae6426945546",
"dd54c30c2e4c413ea2e28066c45e0d3c"
],
"old_exit_code": 0,
"seconds": 5.6574
}
],
"during_replacement": {
"seconds": 11.5214,
"concurrency": 4,
"successful_requests": 7916,
"failed_attempts": 1,
"successful_rps": 687.069,
"error_ratio": 0.000126,
"successful_latency_ms": {
"p50": 3.992,
"p95": 7.701,
"p99": 62.305
},
"instances": [
"0749a2e4af8a4b849e3eae6426945546",
"1b7fd0264d924b3ba1b87368400b4a56",
"dd54c30c2e4c413ea2e28066c45e0d3c",
"efae54a83fc844f4b19b1e1c2aad0385"
]
},
"total": {
"seconds": 20.7201,
"concurrency": 4,
"successful_requests": 14975,
"failed_attempts": 1,
"successful_rps": 722.729,
"error_ratio": 6.7e-05,
"successful_latency_ms": {
"p50": 4.089,
"p95": 7.12,
"p99": 59.058
},
"instances": [
"0749a2e4af8a4b849e3eae6426945546",
"1b7fd0264d924b3ba1b87368400b4a56",
"dd54c30c2e4c413ea2e28066c45e0d3c",
"efae54a83fc844f4b19b1e1c2aad0385"
]
},
"data": {
"confirmed_unique_messages": 14975,
"history_messages": 14975,
"confirmed_preserved": true,
"duplicate_ids": 0,
"duplicate_texts": 0
},
"change": "New image with a distinct release header; API code and schema remain compatible. Start-first: scale to3, prove new IP in DNS/LB, stop/remove one old container, return to2 with --no-recreate."
}
+135
View File
@@ -0,0 +1,135 @@
{
"result": "PASS",
"baseline": {
"seconds": 3.0036,
"concurrency": 4,
"successful_requests": 2095,
"failed_attempts": 0,
"successful_rps": 697.497,
"error_ratio": 0.0,
"successful_latency_ms": {
"p50": 4.402,
"p95": 6.728,
"p99": 56.167
},
"instances": [
"9ab4e9373a944f05b69d934479430136",
"f9c80459570c4c99991024bba6d2b167"
]
},
"phases": [
{
"stopped": {
"container": "e8c5e3cb84a8918b5603e202cd1d66334d12a4943321e6db6d26716cc361b19d",
"name": "mtusi-lab3-api-3",
"instance": "f9c80459570c4c99991024bba6d2b167",
"release": "lab3-9463abd8",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"stopped_at_utc": "2026-11-02T08:37:05.018221+00:00",
"stop_seconds": 0.3922,
"exit_code": 0,
"left_stopped": true
},
"traffic": {
"seconds": 8.0014,
"concurrency": 4,
"successful_requests": 3201,
"failed_attempts": 1,
"successful_rps": 400.056,
"error_ratio": 0.000312,
"successful_latency_ms": {
"p50": 6.213,
"p95": 37.884,
"p99": 72.594
},
"instances": [
"9ab4e9373a944f05b69d934479430136",
"f9c80459570c4c99991024bba6d2b167"
]
},
"post_stop_write_seconds_from_action_start": 1.3835,
"post_stop_write_seconds_from_stop_completion": 0.0138,
"read_during_outage": {
"status": 200,
"confirmed_message_preserved": true,
"seconds_from_action_start": 1.38,
"seconds_from_stop_completion": 0.0102
},
"new_connection_after_stop": {
"accepted": false,
"error_type": "TimeoutError"
},
"stopped_remains_stopped": true
},
{
"stopped": {
"container": "9ad409d735547c65b7a73a7bf803909e61256faec3266341934bf89608d848ea",
"name": "mtusi-lab3-api-4",
"instance": "9ab4e9373a944f05b69d934479430136",
"release": "lab3-9463abd8",
"image_id": "sha256:953592eec2a47c9875c4d1c6331455e1a105c66f9320e2d086c2dcb0a02d51af",
"stopped_at_utc": "2026-11-02T08:37:19.081389+00:00",
"stop_seconds": 0.4518,
"exit_code": 0,
"left_stopped": true
},
"traffic": {
"seconds": 8.0017,
"concurrency": 4,
"successful_requests": 3210,
"failed_attempts": 1,
"successful_rps": 401.166,
"error_ratio": 0.000311,
"successful_latency_ms": {
"p50": 6.206,
"p95": 37.612,
"p99": 74.049
},
"instances": [
"4ffdcca2f8644acd9b76d65f8260eaf7",
"9ab4e9373a944f05b69d934479430136"
]
},
"post_stop_write_seconds_from_action_start": 1.4405,
"post_stop_write_seconds_from_stop_completion": 0.0151,
"read_during_outage": {
"status": 200,
"confirmed_message_preserved": true,
"seconds_from_action_start": 1.4375,
"seconds_from_stop_completion": 0.0121
},
"new_connection_after_stop": {
"accepted": false,
"error_type": "TimeoutError"
},
"stopped_remains_stopped": true
}
],
"total": {
"seconds": 31.1217,
"concurrency": 4,
"successful_requests": 15915,
"failed_attempts": 2,
"successful_rps": 511.38,
"error_ratio": 0.000126,
"successful_latency_ms": {
"p50": 5.137,
"p95": 32.066,
"p99": 65.023
},
"instances": [
"1b7fd0264d924b3ba1b87368400b4a56",
"4ffdcca2f8644acd9b76d65f8260eaf7",
"9ab4e9373a944f05b69d934479430136",
"f9c80459570c4c99991024bba6d2b167"
]
},
"data": {
"confirmed_unique_messages": 15915,
"history_messages": 15915,
"confirmed_preserved": true,
"duplicate_ids": 0,
"duplicate_texts": 0
},
"each_original_container_tested": true
}
+2
View File
@@ -0,0 +1,2 @@
python3 tests/smoke.py --base-url "http://localhost:8080"
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
+3
View File
@@ -0,0 +1,3 @@
python3 scripts/cluster.py exec python -m pytest student-tests -q --tb=short -o cache_dir=/tmp/pytest-cache
.............. [100%]
14 passed in 3.58s