This commit is contained in:
2026-10-30 21:09:56 +03:00
parent ec540a1a72
commit 3223dd469a
87 changed files with 15475 additions and 33 deletions
+23
View File
@@ -0,0 +1,23 @@
{
"concurrency": 10,
"fixture_bytes": 5881918,
"http_codes": {
"201": 10
},
"success": 10,
"wall_ms": 160918.8,
"latency_ms": {
"p50": 398.4,
"p95": 669.1,
"p99": 669.1,
"max": 669.1
},
"approx_success_rps": 0.062,
"api_rss_baseline_mib": 51.96,
"api_rss_peak_mib": 68.4,
"api_rss_delta_mib": 16.44,
"api_cpu_peak_percent": 4.0,
"naive_full_buffer_mib": 56.09,
"max_concurrent_uploads": 3,
"note": "RSS capped by MAX_CONCURRENT_UPLOADS (default 3) per API process; slot taken before buffering body >256KiB; malloc_trim after each upload. rss_peak \u2264 baseline + MAX_CONCURRENT_UPLOADS \u00d7 (body + decoded_raster). Closed-loop client; RPS is throughput of confirmed 201s."
}
+23
View File
@@ -0,0 +1,23 @@
# Grade 4 resilience (local stand, 2026-10-30)
## Persistence
Command: make test-persistence ACTION_SCRIPT=scripts/restart.sh BASE_URL=http://127.0.0.1:8080
Result: PASS — message + attachment bytes preserved across restart of db/cache/minio/api/lb; volumes kept.
## Failover
Command: make test-failover ACTION_SCRIPT=scripts/stop-one.sh BASE_URL=http://127.0.0.1:8080
Result: PASS
observed_instances_before=2 successful_writes=115 failed_attempts=1 first_recovery_seconds≈5.3
Stopped replica restored afterwards with: docker compose --env-file .env up -d --no-deps api
## Private bucket
Command: sh tests/check_bucket_private.sh
Result: PASS — unsigned GET → 403; host :9000/:9001 not published
## Limited S3 creds
Command: sh student-tests/test_attachment_limited_creds.sh
Result: PASS — API uses S3_*_FILE only; access key ≠ MinIO root; rb by limited user denied
## Load uploads
Command: sh scripts/load_uploads.sh
See evidence/load_uploads.json (10× ~5.6 MiB → 10×201; rss_peak≈163 MiB, rss_delta≈75 MiB).