Зафиксировать чистые замеры трека 1 и уточнить отчёт.

Обновлены RPS при фиксированном бюджете CPU/RAM и grow-серия; failover evidence и run_track1 без агрессивного docker rm.
This commit is contained in:
Mlvn
2026-11-06 21:12:49 +03:00
parent b1972bcfd8
commit 0f93dd76f7
23 changed files with 232 additions and 196 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 104, "failed_attempts": 1, "first_recovery_seconds": 2.45}
{"observed_instances_before": 2, "successful_writes": 112, "failed_attempts": 1, "first_recovery_seconds": 2.452}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+1 -1
View File
@@ -1,4 +1,4 @@
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://localhost:8080"
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 94, "failed_attempts": 1, "first_recovery_seconds": 2.82}
{"observed_instances_before": 2, "successful_writes": 115, "failed_attempts": 1, "first_recovery_seconds": 2.45}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
+3 -3
View File
@@ -1,4 +1,4 @@
observed X-Instance-Id via LB:
5c2febc72d04
6f977988feb1
observed X-Instance-Id via LB /health/live (40 requests):
768d1d0dcfb6
ac070c8e5c53
count=2
+12 -6
View File
@@ -1,6 +1,12 @@
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 7 seconds ago Up 5 seconds (health: starting) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 7 seconds ago Up 5 seconds (health: starting) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 34 seconds ago Up 32 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 52 seconds ago Up 51 seconds (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 52 seconds ago Up 51 seconds (healthy) 127.0.0.1:6379->6379/tcp
=== compose ps ===
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 2 seconds ago Up 1 second (health: starting) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 2 seconds ago Up Less than a second (health: starting) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb About a minute ago Up About a minute (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 6 minutes ago Up 6 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 6 minutes ago Up 6 minutes (healthy) 127.0.0.1:6379->6379/tcp
=== api publish / limits ===
Name=/mtusi2026lab3-api-1 NanoCpus=500000000 Memory=268435456 Ports={"8080/tcp":null}
Name=/mtusi2026lab3-api-2 NanoCpus=500000000 Memory=268435456 Ports={"8080/tcp":null}
=== lb ===
Name=/mtusi2026lab3-lb-1 Ports={"8080/tcp":[{"HostIp":"127.0.0.1","HostPort":"8080"}]}
+10 -10
View File
@@ -2,16 +2,16 @@
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.007,
"concurrency": 8,
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
"elapsed_seconds": 30.0,
"successful_requests": 17630,
"failed_requests": 2,
"error_ratio": 0.000113,
"successful_rps": 587.206,
"successful_requests": 38244,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 1274.523,
"successful_latency_ms": {
"p50": 7.806,
"p95": 43.069,
"p99": 70.326
}
"p50": 5.207,
"p95": 11.383,
"p99": 23.418
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+5
View File
@@ -0,0 +1,5 @@
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 42 seconds ago Up 41 seconds (healthy) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 41 seconds ago Up 40 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 4 minutes ago Up 4 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 4 minutes ago Up 4 minutes (healthy) 127.0.0.1:6379->6379/tcp
+4 -5
View File
@@ -1,5 +1,4 @@
mtusi2026lab3-lb-1 43.72% 10.45MiB / 128MiB
mtusi2026lab3-api-2 52.37% 66.08MiB / 512MiB
mtusi2026lab3-api-1 55.70% 66.15MiB / 512MiB
mtusi2026lab3-postgres-1 90.82% 63.12MiB / 512MiB
mtusi2026lab3-redis-1 7.32% 9.688MiB / 256MiB
mtusi2026lab3-lb-1 0.18% 12.72MiB / 128MiB
mtusi2026lab3-api-1 2.11% 34.25MiB / 1GiB
mtusi2026lab3-postgres-1 0.64% 169.6MiB / 512MiB
mtusi2026lab3-redis-1 0.67% 10.23MiB / 256MiB
+8 -8
View File
@@ -2,16 +2,16 @@
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.011,
"concurrency": 8,
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
"elapsed_seconds": 30.0,
"successful_requests": 17519,
"successful_requests": 24105,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 583.75,
"successful_rps": 803.214,
"successful_latency_ms": {
"p50": 8.706,
"p95": 38.678,
"p99": 71.101
}
"p50": 6.762,
"p95": 21.044,
"p99": 57.587
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+5 -5
View File
@@ -1,6 +1,6 @@
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 12 seconds ago Up 10 seconds (healthy) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 12 seconds ago Up 10 seconds (healthy) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 39 seconds ago Up 37 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 57 seconds ago Up 56 seconds (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 57 seconds ago Up 56 seconds (healthy) 127.0.0.1:6379->6379/tcp
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 43 seconds ago Up 41 seconds (healthy) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 43 seconds ago Up 41 seconds (healthy) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 41 seconds ago Up 40 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 5 minutes ago Up 5 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 5 minutes ago Up 5 minutes (healthy) 127.0.0.1:6379->6379/tcp
+5 -5
View File
@@ -1,5 +1,5 @@
mtusi2026lab3-api-2 3.59% 79.73MiB / 256MiB
mtusi2026lab3-api-1 1.48% 80.56MiB / 256MiB
mtusi2026lab3-lb-1 5.31% 11.88MiB / 128MiB
mtusi2026lab3-postgres-1 0.19% 96.55MiB / 512MiB
mtusi2026lab3-redis-1 0.57% 9.75MiB / 256MiB
mtusi2026lab3-lb-1 0.35% 11.57MiB / 128MiB
mtusi2026lab3-api-2 4.60% 11.25MiB / 512MiB
mtusi2026lab3-api-1 4.82% 11.74MiB / 512MiB
mtusi2026lab3-postgres-1 16.66% 181.6MiB / 512MiB
mtusi2026lab3-redis-1 1.86% 10.24MiB / 256MiB
+8 -8
View File
@@ -2,16 +2,16 @@
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.033,
"elapsed_seconds": 30.007,
"concurrency": 8,
"successful_requests": 16449,
"failed_requests": 3820,
"error_ratio": 0.188465,
"successful_rps": 547.704,
"successful_requests": 35315,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 1176.901,
"successful_latency_ms": {
"p50": 7.773,
"p95": 33.441,
"p99": 61.507
"p50": 5.551,
"p95": 12.617,
"p99": 27.51
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+5 -5
View File
@@ -1,6 +1,6 @@
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 28 seconds ago Up 26 seconds (healthy) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 28 seconds ago Up 27 seconds (healthy) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 27 seconds ago Up 25 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 45 seconds ago Up 44 seconds (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 45 seconds ago Up 44 seconds (healthy) 127.0.0.1:6379->6379/tcp
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 41 seconds ago Up 40 seconds (healthy) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 41 seconds ago Up 39 seconds (healthy) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 40 seconds ago Up 38 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 3 minutes ago Up 3 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 3 minutes ago Up 3 minutes (healthy) 127.0.0.1:6379->6379/tcp
+5 -5
View File
@@ -1,5 +1,5 @@
mtusi2026lab3-lb-1 39.89% 12.01MiB / 128MiB
mtusi2026lab3-api-2 58.19% 29.21MiB / 512MiB
mtusi2026lab3-api-1 56.66% 31.08MiB / 512MiB
mtusi2026lab3-postgres-1 94.16% 89.26MiB / 512MiB
mtusi2026lab3-redis-1 7.38% 9.754MiB / 256MiB
mtusi2026lab3-lb-1 0.38% 11.92MiB / 128MiB
mtusi2026lab3-api-1 1.48% 29.01MiB / 768MiB
mtusi2026lab3-api-2 1.33% 15.62MiB / 768MiB
mtusi2026lab3-postgres-1 1.01% 180.4MiB / 512MiB
mtusi2026lab3-redis-1 2.30% 9.98MiB / 256MiB
+8 -8
View File
@@ -2,16 +2,16 @@
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.007,
"concurrency": 8,
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
"elapsed_seconds": 30.013,
"successful_requests": 18347,
"successful_requests": 33143,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 611.308,
"successful_rps": 1104.515,
"successful_latency_ms": {
"p50": 8.447,
"p95": 37.298,
"p99": 68.98
}
"p50": 5.507,
"p95": 13.456,
"p99": 33.913
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+6
View File
@@ -0,0 +1,6 @@
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 40 seconds ago Up 40 seconds (healthy) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 40 seconds ago Up 40 seconds (healthy) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 40 seconds ago Up 38 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 3 minutes ago Up 3 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 3 minutes ago Up 3 minutes (healthy) 127.0.0.1:6379->6379/tcp
+5
View File
@@ -0,0 +1,5 @@
mtusi2026lab3-lb-1 0.40% 13.71MiB / 128MiB
mtusi2026lab3-api-1 0.27% 30.51MiB / 512MiB
mtusi2026lab3-api-2 0.17% 13.12MiB / 512MiB
mtusi2026lab3-postgres-1 61.94% 200.2MiB / 512MiB
mtusi2026lab3-redis-1 0.66% 9.973MiB / 256MiB
+10 -10
View File
@@ -2,16 +2,16 @@
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.013,
"concurrency": 8,
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead.",
"elapsed_seconds": 30.0,
"successful_requests": 13521,
"failed_requests": 42384,
"error_ratio": 0.758143,
"successful_rps": 450.622,
"successful_requests": 26975,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 898.769,
"successful_latency_ms": {
"p50": 8.277,
"p95": 45.456,
"p99": 71.757
}
"p50": 5.925,
"p95": 21.961,
"p99": 56.599
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+6
View File
@@ -0,0 +1,6 @@
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
mtusi2026lab3-api-1 mtusi2026lab3-api "/server" api 40 seconds ago Up 39 seconds (healthy) 8080/tcp
mtusi2026lab3-api-2 mtusi2026lab3-api "/server" api 40 seconds ago Up 39 seconds (healthy) 8080/tcp
mtusi2026lab3-lb-1 haproxy:2.9.14-alpine "docker-entrypoint.s…" lb 39 seconds ago Up 37 seconds (healthy) 127.0.0.1:8080->8080/tcp
mtusi2026lab3-postgres-1 postgres:16.6 "docker-entrypoint.s…" postgres 2 minutes ago Up 2 minutes (healthy) 127.0.0.1:5432->5432/tcp
mtusi2026lab3-redis-1 redis:7.4.1 "docker-entrypoint.s…" redis 2 minutes ago Up 2 minutes (healthy) 127.0.0.1:6379->6379/tcp
+5
View File
@@ -0,0 +1,5 @@
mtusi2026lab3-lb-1 0.48% 11.75MiB / 128MiB
mtusi2026lab3-api-1 0.38% 27.84MiB / 256MiB
mtusi2026lab3-api-2 0.22% 15.15MiB / 256MiB
mtusi2026lab3-postgres-1 0.69% 153.8MiB / 512MiB
mtusi2026lab3-redis-1 0.52% 9.75MiB / 256MiB
+48 -48
View File
@@ -2,75 +2,75 @@
"runs": [
{
"label": "fixed_budget_n1",
"successful_rps": 587.206,
"error_ratio": 0.000113,
"p50_ms": 7.806,
"p95_ms": 43.069,
"p99_ms": 70.326,
"successful_requests": 17630,
"failed_requests": 2,
"successful_rps": 1274.523,
"error_ratio": 0.0,
"p50_ms": 5.207,
"p95_ms": 11.383,
"p99_ms": 23.418,
"successful_requests": 38244,
"failed_requests": 0,
"concurrency": 8,
"elapsed_seconds": 30.0
"elapsed_seconds": 30.007
},
{
"label": "fixed_budget_n2",
"successful_rps": 583.75,
"successful_rps": 803.214,
"error_ratio": 0.0,
"p50_ms": 8.706,
"p95_ms": 38.678,
"p99_ms": 71.101,
"successful_requests": 17519,
"p50_ms": 6.762,
"p95_ms": 21.044,
"p99_ms": 57.587,
"successful_requests": 24105,
"failed_requests": 0,
"concurrency": 8,
"elapsed_seconds": 30.0
"elapsed_seconds": 30.011
},
{
"label": "fixed_budget_n4",
"successful_rps": 191.028,
"error_ratio": 0.946069,
"p50_ms": 7.41,
"p95_ms": 58.94,
"p99_ms": 209.114,
"successful_requests": 5853,
"failed_requests": 102674,
"successful_rps": 1031.514,
"error_ratio": 0.0,
"p50_ms": 5.836,
"p95_ms": 15.396,
"p99_ms": 33.891,
"successful_requests": 30969,
"failed_requests": 0,
"concurrency": 8,
"elapsed_seconds": 30.0
"elapsed_seconds": 30.023
},
{
"label": "grow_n2_small",
"successful_rps": 450.622,
"error_ratio": 0.758143,
"p50_ms": 8.277,
"p95_ms": 45.456,
"p99_ms": 71.757,
"successful_requests": 13521,
"failed_requests": 42384,
"concurrency": 8,
"elapsed_seconds": 30.0
},
{
"label": "grow_n2_medium",
"successful_rps": 611.308,
"successful_rps": 898.769,
"error_ratio": 0.0,
"p50_ms": 8.447,
"p95_ms": 37.298,
"p99_ms": 68.98,
"successful_requests": 18347,
"p50_ms": 5.925,
"p95_ms": 21.961,
"p99_ms": 56.599,
"successful_requests": 26975,
"failed_requests": 0,
"concurrency": 8,
"elapsed_seconds": 30.013
},
{
"label": "grow_n2_large",
"successful_rps": 547.704,
"error_ratio": 0.188465,
"p50_ms": 7.773,
"p95_ms": 33.441,
"p99_ms": 61.507,
"successful_requests": 16449,
"failed_requests": 3820,
"label": "grow_n2_medium",
"successful_rps": 1104.515,
"error_ratio": 0.0,
"p50_ms": 5.507,
"p95_ms": 13.456,
"p99_ms": 33.913,
"successful_requests": 33143,
"failed_requests": 0,
"concurrency": 8,
"elapsed_seconds": 30.033
"elapsed_seconds": 30.007
},
{
"label": "grow_n2_large",
"successful_rps": 1176.901,
"error_ratio": 0.0,
"p50_ms": 5.551,
"p95_ms": 12.617,
"p99_ms": 27.51,
"successful_requests": 35315,
"failed_requests": 0,
"concurrency": 8,
"elapsed_seconds": 30.007
}
]
}
+6 -6
View File
@@ -4,10 +4,10 @@ Closed-loop `tests/load.py` (duration=30, concurrency=8). RPS — только
| label | RPS | err_ratio | p50 ms | p95 ms | p99 ms | ok | fail |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| fixed_budget_n1 | 587.206 | 0.000113 | 7.806 | 43.069 | 70.326 | 17630 | 2 |
| fixed_budget_n2 | 583.75 | 0.0 | 8.706 | 38.678 | 71.101 | 17519 | 0 |
| fixed_budget_n4 | 191.028 | 0.946069 | 7.41 | 58.94 | 209.114 | 5853 | 102674 |
| grow_n2_small | 450.622 | 0.758143 | 8.277 | 45.456 | 71.757 | 13521 | 42384 |
| grow_n2_medium | 611.308 | 0.0 | 8.447 | 37.298 | 68.98 | 18347 | 0 |
| grow_n2_large | 547.704 | 0.188465 | 7.773 | 33.441 | 61.507 | 16449 | 3820 |
| fixed_budget_n1 | 1274.523 | 0.0 | 5.207 | 11.383 | 23.418 | 38244 | 0 |
| fixed_budget_n2 | 803.214 | 0.0 | 6.762 | 21.044 | 57.587 | 24105 | 0 |
| fixed_budget_n4 | 1031.514 | 0.0 | 5.836 | 15.396 | 33.891 | 30969 | 0 |
| grow_n2_small | 898.769 | 0.0 | 5.925 | 21.961 | 56.599 | 26975 | 0 |
| grow_n2_medium | 1104.515 | 0.0 | 5.507 | 13.456 | 33.913 | 33143 | 0 |
| grow_n2_large | 1176.901 | 0.0 | 5.551 | 12.617 | 27.51 | 35315 | 0 |