forked from mtusi2026/mtusi2026lab3
create tasks from 4
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# Доказательства
|
||||
|
||||
Храните небольшие обезличенные результаты: команды и stdout проверок, JSON/CSV агрегатов нагрузки, EXPLAIN, dashboard JSON, текст разбора отказа. Укажите дату, commit, аппаратные лимиты и профиль нагрузки.
|
||||
|
||||
Не добавляйте .env, session tokens, cookies, приватные ключи, credentials, реальные сообщения, raw dumps и signed URLs. Для скриншотов скрывайте секреты. Большие логи/бинарные traces сохраняйте отдельно по правилам преподавателя; одного скриншота без методики недостаточно.
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"scenario": "sequential failover of each API replica",
|
||||
"replicas": 2,
|
||||
"results": [
|
||||
{
|
||||
"target_instance_id": "170796a1dad0",
|
||||
"window_seconds": 15.038,
|
||||
"successful_reads": 81,
|
||||
"successful_writes": 82,
|
||||
"failed_attempts": 0,
|
||||
"successful_rps": 10.839,
|
||||
"first_recovery_seconds": 1.306
|
||||
},
|
||||
{
|
||||
"target_instance_id": "feb12e05fd43",
|
||||
"window_seconds": 15.079,
|
||||
"successful_reads": 75,
|
||||
"successful_writes": 76,
|
||||
"failed_attempts": 0,
|
||||
"successful_rps": 10.014,
|
||||
"first_recovery_seconds": 2.672
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
# Lab3 level 4 evidence — 2026-11-03
|
||||
|
||||
Environment: Windows host, Docker Desktop Engine 28.0.1, Compose deployment on
|
||||
one machine, two API replicas limited to 0.75 CPU / 768 MiB each. All requests
|
||||
used Nginx at `http://localhost:8080`; API ports were not published.
|
||||
|
||||
## Sequential failover
|
||||
|
||||
Command:
|
||||
|
||||
```text
|
||||
python tests/failover_each.py --action-script scripts/stop-one.cmd \
|
||||
--restore-script scripts/restore-api.cmd --window 15 \
|
||||
--output evidence/failover-each-2026-11-03.json
|
||||
```
|
||||
|
||||
| Target instance | Successful reads | Successful writes | Errors | Successful RPS | First recovery |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: |
|
||||
| `170796a1dad0` | 81 | 82 | 0 | 10.839 | 1.306 s |
|
||||
| `feb12e05fd43` | 75 | 76 | 0 | 10.014 | 2.672 s |
|
||||
|
||||
The stopped replica was restored and observed again before the next target was
|
||||
stopped. Confirmed messages remained readable after both failures.
|
||||
|
||||
## Shared idempotency
|
||||
|
||||
`python tests/idempotency_concurrent.py` passed: 32 concurrent requests with
|
||||
one key used two API instance IDs and created exactly one message.
|
||||
|
||||
## Sequential replacement under load
|
||||
|
||||
Command:
|
||||
|
||||
```text
|
||||
python tests/rolling_update.py --action-script scripts/rolling-update.cmd \
|
||||
--duration 180 --concurrency 4 \
|
||||
--output evidence/rolling-update-2026-11-03.json
|
||||
```
|
||||
|
||||
- Rolling action: 115.800 s.
|
||||
- Four instance IDs observed: two original and two replacements.
|
||||
- Successful writes: 12,147; failed attempts: 177.
|
||||
- Successful RPS: 67.439; error ratio: 1.4362%.
|
||||
- Successful latency: p50 37.729 ms, p95 189.374 ms, p99 215.986 ms.
|
||||
|
||||
This is a closed-loop single-host experiment. It includes coordinated omission
|
||||
and client overhead; latency percentiles cover successes only. Brief failures
|
||||
are retained in the result rather than hidden by client retries. PostgreSQL,
|
||||
Nginx and the Docker host remain single points of failure.
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"scenario": "sequential API replacement under closed-loop writes",
|
||||
"requested_duration_seconds": 180.0,
|
||||
"elapsed_seconds": 180.118,
|
||||
"rolling_action_seconds": 115.8,
|
||||
"concurrency": 4,
|
||||
"observed_instance_ids": [
|
||||
"5782a3226f58",
|
||||
"d3604e18baea",
|
||||
"e54e39339867",
|
||||
"e55cbed4e283"
|
||||
],
|
||||
"successful_requests": 12147,
|
||||
"failed_requests": 177,
|
||||
"error_ratio": 0.014362,
|
||||
"successful_rps": 67.439,
|
||||
"successful_latency_ms": {
|
||||
"p50": 37.729,
|
||||
"p95": 189.374,
|
||||
"p99": 215.986
|
||||
},
|
||||
"note": "Closed-loop result on one host; success latency excludes failures."
|
||||
}
|
||||
Reference in New Issue
Block a user