Выполнение 3 лабораторной работы

This commit is contained in:
2026-11-06 20:26:11 +03:00
parent 0ab3a341aa
commit 87f2a65448
105 changed files with 8359 additions and 25 deletions
+17
View File
@@ -0,0 +1,17 @@
## failover #1: контейнеры до
messenger-lab3-api-12 Up 29 seconds (healthy)
messenger-lab3-api-9 Up 30 seconds (healthy)
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 125, "failed_attempts": 0, "first_recovery_seconds": 3.691}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
## контейнеры после (остановленная реплика должна быть Exited)
messenger-lab3-api-12 Up 49 seconds (healthy)
messenger-lab3-api-9 Exited (0) 12 seconds ago
Container messenger-lab3-api-12 Running
Container messenger-lab3-api-9 Starting
Container messenger-lab3-api-9 Started
Container messenger-lab3-api-9 Waiting
Container messenger-lab3-api-12 Waiting
Container messenger-lab3-api-9 Healthy
Container messenger-lab3-api-12 Healthy
LB sees 2/2 api replicas UP
+17
View File
@@ -0,0 +1,17 @@
## failover #2: контейнеры до
messenger-lab3-api-12 Up 52 seconds (healthy)
messenger-lab3-api-9 Up 3 seconds (healthy)
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 136, "failed_attempts": 0, "first_recovery_seconds": 3.687}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
## контейнеры после (остановленная реплика должна быть Exited)
messenger-lab3-api-12 Up About a minute (healthy)
messenger-lab3-api-9 Exited (0) 11 seconds ago
Container messenger-lab3-api-12 Running
Container messenger-lab3-api-9 Starting
Container messenger-lab3-api-9 Started
Container messenger-lab3-api-9 Waiting
Container messenger-lab3-api-12 Waiting
Container messenger-lab3-api-9 Healthy
Container messenger-lab3-api-12 Healthy
LB sees 2/2 api replicas UP
+14
View File
@@ -0,0 +1,14 @@
{
"rounds": 20,
"parallel_requests_per_round": 40,
"requests_total": 840,
"messages_in_history": 21,
"messages_expected": 21,
"replicas_that_served_requests": 2,
"requests_per_replica": {
"13b0fc8945bc": 400,
"65e3ad44afc9": 400
},
"result": "PASS",
"failures": []
}
+15
View File
@@ -0,0 +1,15 @@
## persistence: старт контейнеров ДО
/messenger-lab3-api-12 65e3ad44afc9 started=2026-11-06T16:56:21.3113159Z
/messenger-lab3-api-9 13b0fc8945bc started=2026-11-06T16:57:34.953569522Z
/messenger-lab3-cache-1 e014a8d18926 started=2026-11-06T16:56:12.606839975Z
/messenger-lab3-db-1 a902ccd96269 started=2026-11-06T16:56:12.448360493Z
/messenger-lab3-lb-1 d99ad9b80ef3 started=2026-11-06T16:56:24.157711719Z
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
## старт контейнеров ПОСЛЕ (время старта db/cache/api/lb должно измениться; volume pgdata прежний)
/messenger-lab3-api-12 65e3ad44afc9 started=2026-11-06T16:57:56.21787969Z
/messenger-lab3-api-9 13b0fc8945bc started=2026-11-06T16:57:55.931156961Z
/messenger-lab3-cache-1 e014a8d18926 started=2026-11-06T16:57:47.861880861Z
/messenger-lab3-db-1 a902ccd96269 started=2026-11-06T16:57:47.558274049Z
/messenger-lab3-lb-1 d99ad9b80ef3 started=2026-11-06T16:57:59.030347367Z
messenger-lab3_pgdata
+1
View File
@@ -0,0 +1 @@
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.
+26
View File
@@ -0,0 +1,26 @@
# 2026-11-06T16:56:37Z commit=0ab3a34
## docker compose ps (публикуется только lb; у api порт только внутри сети)
NAME SERVICE STATUS PORTS
messenger-lab3-api-12 api Up 16 seconds (healthy) 8080/tcp
messenger-lab3-api-9 api Up 16 seconds (healthy) 8080/tcp
messenger-lab3-cache-1 cache Up 24 seconds (healthy) 6379/tcp
messenger-lab3-db-1 db Up 25 seconds (healthy) 5432/tcp
messenger-lab3-lb-1 lb Up 13 seconds (healthy) 127.0.0.1:8404->8404/tcp, 0.0.0.0:8081->8080/tcp, [::]:8081->8080/tcp
## лимиты ресурсов (NanoCpus / Memory) и образы
/messenger-lab3-api-12 nanocpus=1000000000 mem_bytes=536870912 image=messenger-api:lab3
/messenger-lab3-api-9 nanocpus=1000000000 mem_bytes=536870912 image=messenger-api:lab3
/messenger-lab3-cache-1 nanocpus=500000000 mem_bytes=134217728 image=valkey/valkey:8.1@sha256:640c5e62cea04b6d6f2084232651d0cc70362d31f4f805e7be94dbed6855e8f2
/messenger-lab3-db-1 nanocpus=2000000000 mem_bytes=1073741824 image=postgres:17@sha256:b8faeff7712663c2773a190181e1246e37e364b887611c04658c28b44e2408fe
/messenger-lab3-lb-1 nanocpus=1000000000 mem_bytes=134217728 image=mirror.gcr.io/library/haproxy:3.0-alpine@sha256:1c15903c50d5510dcc01de755049e7015a6dd3f35bb2dc4582e888116cb71d8f
## container_name не задан; число реплик api:
2
## состояние backend'ов в HAProxy
api api1 UP
api api2 UP
api api3 MAINT (resolution)
api api4 MAINT (resolution)
api api5 MAINT (resolution)
api api6 MAINT (resolution)
api api7 MAINT (resolution)
api api8 MAINT (resolution)
api BACKEND UP