Реализовать lab3 на оценку 4: HAProxy, реплики API и общая идемпотентность.

This commit is contained in:
2026-10-30 15:27:54 +03:00
parent 0ab3a341aa
commit 5946fe214c
47 changed files with 3035 additions and 31 deletions
Binary file not shown.
Binary file not shown.
+17
View File
@@ -0,0 +1,17 @@
{
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 20.0,
"elapsed_seconds": 20.032,
"concurrency": 4,
"successful_requests": 4821,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 240.665,
"successful_latency_ms": {
"p50": 16.0,
"p95": 32.0,
"p99": 78.0
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
BIN
View File
Binary file not shown.
+9
View File
@@ -0,0 +1,9 @@
date: 2026-10-30
branch: solution/bvt2303-bolotov
target_grade: 4
host: Docker Desktop on Windows
images: python:3.12.8-slim-bookworm, postgres:16.6-bookworm, redis:7.4.2-bookworm, haproxy:2.9.14-bookworm
api_replicas: 2
entrypoint: http://127.0.0.1:8080 (HAProxy only)
limits: api 0.5 CPU / 256Mi; postgres 0.5/512Mi; redis 0.25/128Mi; lb 0.25/128Mi
health: HAProxy inter=2s fall=2; API stop_grace_period=12s; uvicorn graceful=8s
Binary file not shown.
+8
View File
@@ -0,0 +1,8 @@
{
"successful": 356,
"errors": 3,
"p50_ms": 16.0,
"p95_ms": 32.0,
"p99_ms": 2016.0,
"replicas_rolled": 2
}
Binary file not shown.
+26
View File
@@ -0,0 +1,26 @@
[
{
"round": 0,
"observed_before": [
"252249c099ca",
"8aabecba79c6"
],
"target": "252249c099ca",
"successful_writes": 85,
"failed_attempts": 2,
"first_recovery_seconds": 5.594,
"target_absent_in_last5": true
},
{
"round": 1,
"observed_before": [
"252249c099ca",
"8aabecba79c6"
],
"target": "8aabecba79c6",
"successful_writes": 129,
"failed_attempts": 1,
"first_recovery_seconds": 5.469,
"target_absent_in_last5": true
}
]
Binary file not shown.
Binary file not shown.
Binary file not shown.