lab3: second tiny fix

This commit is contained in:
yurtaev.va
2026-10-23 19:29:40 +03:00
parent 3a3302c5b4
commit 088961a433
24 changed files with 477 additions and 134 deletions
+7 -2
View File
@@ -1,5 +1,10 @@
# Доказательства
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
- `node_failover.json` — остановка Docker daemon worker1, перенос API на worker2, конкурентный Idempotency-Key, чтение и запись.
- `swarm_rolling_load.json` — 30 секунд записи во время `scripts/swarm-lab.sh rolling-update`.
- `swarm_rolling_update.txt` — завершение поочерёдного обновления сервиса.
- `swarm_load.json` и `swarm_stats.txt` — отдельная 15-секундная нагрузка и срез CPU/RAM узлов.
- `readiness_failover.json` — исключение живой, но неготовой API-реплики активной проверкой HAProxy.
- `history_explain.txt` — план индексного чтения истории на 10 000 синтетических сообщениях.
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
Это агрегированные результаты синтетического локального эксперимента. Токены и пароль БД здесь не сохраняются. Команды, ограничения и выводы приведены в [REPORT.md](../REPORT.md).
+11
View File
@@ -0,0 +1,11 @@
synthetic_chat_id=493ca34c-b101-414a-a747-56017577daf0
message_count=10000
Limit (cost=0.29..10.73 rows=101 width=69) (actual time=0.015..0.042 rows=101 loops=1)
Buffers: shared hit=11
-> Index Scan using messages_history_idx on messages (cost=0.29..1034.81 rows=10000 width=69) (actual time=0.014..0.034 rows=101 loops=1)
Index Cond: (chat_id = '493ca34c-b101-414a-a747-56017577daf0'::uuid)
Buffers: shared hit=11
Planning:
Buffers: shared hit=109
Planning Time: 0.406 ms
Execution Time: 0.074 ms
+39 -13
View File
@@ -1,20 +1,46 @@
{
"before_nodes": [
"lab3-worker1",
"lab3-worker2"
"before_tasks": [
{
"task_id": "5qmzptzqohbf",
"node": "lab3-worker2"
},
{
"task_id": "iypq8msbdy1k",
"node": "lab3-worker1"
}
],
"after_nodes": [
"lab3-worker2",
"lab3-worker2"
"after_tasks": [
{
"task_id": "5qmzptzqohbf",
"node": "lab3-worker2"
},
{
"task_id": "w19aa9l23olu",
"node": "lab3-worker2"
}
],
"before_instance_ids": [
"63f148667462",
"8b2a7bca0580"
],
"after_instance_ids": [
"63f148667462",
"eb4b7f490edb"
],
"before_instance_count": 2,
"concurrent_replays": 16,
"concurrent_message_count": 1,
"successful_writes": 96,
"failed_attempts": 0,
"first_success_seconds": 0.02,
"replacement_running_seconds": 20.054,
"concurrent_instance_ids": [
"63f148667462",
"8b2a7bca0580"
],
"successful_writes": 92,
"successful_reads": 92,
"failed_post_attempts": 0,
"failed_read_attempts": 0,
"docker_stop_seconds": 1.199,
"first_success_seconds": 1.216,
"replacement_running_seconds": 20.311,
"confirmed_messages_preserved": true,
"latency_p50_ms": 14.586,
"latency_p95_ms": 22.945
"latency_p50_ms": 13.096,
"latency_p95_ms": 16.899
}
+10
View File
@@ -0,0 +1,10 @@
{
"target_instance_id": "d5c6218cf96c",
"observed_before": [
"d5c6218cf96c",
"d6788e0998bf"
],
"excluded_within_seconds": 5.435,
"transient_errors": 2,
"successful_writes_after_exclusion": 10
}
+6 -6
View File
@@ -2,16 +2,16 @@
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 15.0,
"elapsed_seconds": 15.025,
"elapsed_seconds": 15.037,
"concurrency": 4,
"successful_requests": 4513,
"successful_requests": 3864,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 300.358,
"successful_rps": 256.971,
"successful_latency_ms": {
"p50": 9.415,
"p95": 35.526,
"p99": 77.236
"p50": 13.08,
"p95": 31.988,
"p99": 60.431
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
+6 -6
View File
@@ -2,16 +2,16 @@
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.041,
"elapsed_seconds": 30.035,
"concurrency": 4,
"successful_requests": 10791,
"successful_requests": 7449,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 359.214,
"successful_rps": 248.009,
"successful_latency_ms": {
"p50": 8.83,
"p95": 22.727,
"p99": 64.266
"p50": 12.897,
"p95": 37.412,
"p99": 73.878
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
-17
View File
@@ -1,17 +0,0 @@
{
"lab": 3,
"workload": "closed-loop POST messages; no automatic retries",
"requested_duration_seconds": 30.0,
"elapsed_seconds": 30.041,
"concurrency": 4,
"successful_requests": 10791,
"failed_requests": 0,
"error_ratio": 0.0,
"successful_rps": 359.214,
"successful_latency_ms": {
"p50": 8.83,
"p95": 22.727,
"p99": 64.266
},
"note": "Latency percentiles cover successes only. Timeouts/errors are counted separately; closed-loop has coordinated omission and client overhead."
}
-4
View File
@@ -22,10 +22,6 @@ overall progress: 0 out of 2 tasks
overall progress: 0 out of 2 tasks
overall progress: 0 out of 2 tasks
overall progress: 0 out of 2 tasks
overall progress: 0 out of 2 tasks
overall progress: 1 out of 2 tasks
overall progress: 1 out of 2 tasks
overall progress: 1 out of 2 tasks
overall progress: 1 out of 2 tasks
overall progress: 1 out of 2 tasks
overall progress: 1 out of 2 tasks
+3 -3
View File
@@ -1,3 +1,3 @@
lab3-manager 61.49% 272.4MiB / 7.653GiB
lab3-worker1 70.05% 132.1MiB / 7.653GiB
lab3-worker2 85.95% 166.9MiB / 7.653GiB
lab3-manager 68.26% 260.3MiB / 7.653GiB
lab3-worker1 74.43% 150.5MiB / 7.653GiB
lab3-worker2 79.84% 198.8MiB / 7.653GiB