create tasks from 5

This commit is contained in:
EgorAnti
2026-11-03 20:49:07 +03:00
parent 6a4cd9534f
commit d235571a52
18 changed files with 1071 additions and 97 deletions
+3 -3
View File
@@ -9,7 +9,7 @@ used Nginx at `http://localhost:8080`; API ports were not published.
Command:
```text
python tests/failover_each.py --action-script scripts/stop-one.cmd \
python student_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
```
@@ -24,7 +24,7 @@ stopped. Confirmed messages remained readable after both failures.
## Shared idempotency
`python tests/idempotency_concurrent.py` passed: 32 concurrent requests with
`python student_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
@@ -32,7 +32,7 @@ one key used two API instance IDs and created exactly one message.
Command:
```text
python tests/rolling_update.py --action-script scripts/rolling-update.cmd \
python student_tests/rolling_update.py --action-script scripts/rolling-update.cmd \
--duration 180 --concurrency 4 \
--output evidence/rolling-update-2026-11-03.json
```
+42
View File
@@ -0,0 +1,42 @@
{
"scenario": "hard loss of one Swarm worker",
"failed_node": "hla-swarm-worker2",
"old_task_id": "sesmka0dxn5k",
"tasks_before": [
{
"task_id": "zmboecjxvdyn",
"node": "hla-swarm-manager"
},
{
"task_id": "sesmka0dxn5k",
"node": "hla-swarm-worker2"
}
],
"tasks_after_relocation": [
{
"task_id": "zmboecjxvdyn",
"node": "hla-swarm-manager"
},
{
"task_id": "pke5uf5okm69",
"node": "hla-swarm-worker1"
}
],
"instance_ids_before": [
"1726221ff80d",
"edb5532a721e"
],
"instance_ids_after": [
"1726221ff80d",
"81c7197f2bfe"
],
"successful_reads": 165,
"successful_writes": 166,
"failed_attempts": 0,
"first_recovery_seconds": 1.796,
"successful_rps": 11.033,
"experiment_seconds_including_rejoin": 73.763,
"confirmed_data_preserved": true,
"database_node_failed": false,
"note": "PostgreSQL, Nginx, manager quorum and local volumes are not protected by this experiment."
}
+33
View File
@@ -0,0 +1,33 @@
# Swarm worker-node failover — 2026-11-03
Topology: one Swarm manager and two workers, implemented as three privileged
Docker-in-Docker daemons. Two API tasks used `max_replicas_per_node=1`. Nginx,
PostgreSQL and Redis remained on the live manager. Images were pulled by nodes
from the disposable local registry by digest.
Command:
```text
python student_tests/node_failover.py --base-url http://localhost:18080 \
--window 30 --output evidence/node-failover-2026-11-03.json
```
Observed result:
- Hard-stopped node: `hla-swarm-worker2` (the entire nested Docker daemon).
- Old API task: `sesmka0dxn5k` on `worker2`.
- Replacement API task: `pke5uf5okm69` on `worker1`.
- Other API task remained on manager.
- Instance IDs changed from `1726221ff80d` / `edb5532a721e` to
`1726221ff80d` / `81c7197f2bfe`.
- Successful reads: 165; successful writes: 166; failed attempts: 0.
- First successful operation after node-stop started: 1.796 s.
- Successful operations per second during the 30 s window: 11.033.
- The pre-failure confirmed message and every response-confirmed in-flight
message remained readable.
- The stopped worker rejoined in `Ready` state after the experiment.
Protected scope: loss of one worker carrying an API task while manager/state
remain alive. Not protected and not claimed: PostgreSQL node loss, manager
quorum loss, Nginx loss, local-volume loss, underlay loss, or physical host
loss. `database_node_failed` is explicitly `false` in the raw JSON.