Complete Lab 4 attachment service

This commit is contained in:
2026-11-14 02:11:47 +03:00
parent ec540a1a72
commit 1c10525136
36 changed files with 2740 additions and 73 deletions
+9
View File
@@ -0,0 +1,9 @@
{
"oversized_upload": 413,
"corrupt_image": 415,
"mime_spoof": 415,
"unsafe_filename": 400,
"foreign_chat_attachment": 404,
"unknown_attachment": 404,
"result": "PASS"
}
+37
View File
@@ -0,0 +1,37 @@
# Результаты persistence и failover
Сводка составлена по выводу WSL, предоставленному автором. Hooks запущены через цели Makefile репозитория.
## Persistence: перезапуск хранилищ
Commande :
```sh
make test-persistence ACTION_SCRIPT=scripts/restart.sh BASE_URL=http://localhost:8080
```
Результат: `PASS: persistence preserved confirmed data and existing session.`
## Failover одной API-реплики
Commande :
```sh
make test-failover ACTION_SCRIPT=scripts/stop-one.sh BASE_URL=http://localhost:8080
```
Résumé JSON affiché par le test :
```json
{"observed_instances_before":2,"successful_writes":84,"failed_attempts":0,"first_recovery_seconds":1.578}
```
Результат: `PASS: failover preserved confirmed data and existing session.`
## Восстановление после теста
Commande : `bash scripts/recover-api.sh`
Результат: `PASS: two API replicas are healthy through the load balancer.`
Тест также вывел `Hook scope needs operator evidence`. Эта сводка фиксирует результат тестового сценария, сообщённый автором; она не является независимым подтверждением состояния Docker.
+11
View File
@@ -0,0 +1,11 @@
{
"liveness": 200,
"readiness_during_outage": 503,
"upload_during_outage": {
"status": 503,
"error_code": "unavailable",
"elapsed_seconds": 9.187
},
"readiness_after_restore": 200,
"result": "PASS"
}
+1
View File
@@ -0,0 +1 @@
2026-11-13T22:46:05Z db93123e60d5
+22
View File
@@ -0,0 +1,22 @@
{
"concurrent_clients": 10,
"successful_uploads": 10,
"decoded_dimensions": [
3000,
3000
],
"input_bytes": 35063,
"container_memory_mib_before": {
"db93123e60d5": 134.8,
"bad2d3dd6806": 143.0
},
"container_memory_mib_peak": {
"db93123e60d5": 150.2,
"bad2d3dd6806": 151.0
},
"elapsed_seconds": 3.829,
"observed_instances": [
"bad2d3dd6806",
"db93123e60d5"
]
}