lab4: исправления по ревью
This commit is contained in:
@@ -14,7 +14,7 @@ with SeaweedFS 3.80, two API replicas and HAProxy.
|
||||
| `s3-init.txt` | Idempotent bucket bootstrap, app/forbidden prefix probes | `docker compose run --rm s3-init` (twice) |
|
||||
| `private-bucket.txt` | Anonymous S3 GET and published ports | `docker compose exec seaweedfs wget ...` |
|
||||
| `s3-outage.txt` | S3 down: attachments 503, other endpoints 200 | `docker compose stop seaweedfs` |
|
||||
| `sweep.txt` | Abandoned presign cleanup after grace; ready survives | `S3_SWEEP_GRACE=2s S3_SWEEP_INTERVAL=1s` |
|
||||
| `sweep.txt` | Abandoned presign cleanup after grace; ready survives | `S3_SWEEP_GRACE=2s S3_SWEEP_INTERVAL=1s S3_PRESIGN_TTL=1s` |
|
||||
| `memory/` | 10 concurrent 9.4 MiB uploads, cgroup memory samples | `python3 scripts/lab4_memory_experiment.py` |
|
||||
| `track1/` | Proxy vs presigned upload: traffic, latency, memory | `python3 scripts/lab4_track1.py` |
|
||||
|
||||
@@ -26,3 +26,5 @@ Notes:
|
||||
the primary RAM metric.
|
||||
- Presigned completion re-reads the object once to verify SHA-256, so API RX
|
||||
stays close to the file size. The client-facing LB leg is the actual saving.
|
||||
- Presigned URLs sign `Content-Length`: an oversized PUT is rejected by S3 with 403
|
||||
before anything is stored.
|
||||
|
||||
@@ -1 +1 @@
|
||||
PASS: lab4 attachment failover; served by cbc4cbeea6da
|
||||
PASS: lab4 attachment failover; served by 7fd3e5df907d
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
elapsed,phase,anon,current
|
||||
0.367,during,281419776,386904064
|
||||
1.063,during,281698304,384315392
|
||||
1.689,during,281784320,369328128
|
||||
2.139,during,281849856,290664448
|
||||
0.378,during,281362432,400949248
|
||||
0.804,during,281423872,381423616
|
||||
1.395,during,281542656,403361792
|
||||
1.827,during,281542656,371871744
|
||||
2.376,during,281632768,411824128
|
||||
2.81,during,281653248,381726720
|
||||
|
||||
|
@@ -3,9 +3,9 @@ concurrency: 10
|
||||
file_size_bytes: 9454448
|
||||
uploads: 30
|
||||
rounds: 3
|
||||
elapsed_seconds: 2.097
|
||||
baseline_anon_bytes: 279879680
|
||||
peak_anon_bytes: 281849856
|
||||
anon_delta_bytes: 1970176
|
||||
peak_memory_current_bytes: 386904064
|
||||
elapsed_seconds: 2.980
|
||||
baseline_anon_bytes: 280317952
|
||||
peak_anon_bytes: 281653248
|
||||
anon_delta_bytes: 1335296
|
||||
peak_memory_current_bytes: 411824128
|
||||
note: memory.current includes page cache from temporary spool files; anon is the primary metric
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Running
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Waiting
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Healthy
|
||||
Container mtusi-messenger-lab4-s3-init-run-6d633e58a067 Creating
|
||||
Container mtusi-messenger-lab4-s3-init-run-6d633e58a067 Created
|
||||
{"time":"2026-10-21T19:37:16.099886123Z","level":"INFO","msg":"s3 bucket ready","endpoint":"http://seaweedfs:8333","bucket":"messenger-attachments"}
|
||||
Container mtusi-messenger-lab4-s3-init-run-77217672cba1 Creating
|
||||
Container mtusi-messenger-lab4-s3-init-run-77217672cba1 Created
|
||||
{"time":"2026-10-21T20:24:44.714991263Z","level":"INFO","msg":"s3 bucket ready","endpoint":"http://seaweedfs:8333","bucket":"messenger-attachments"}
|
||||
=== run 2 (idempotent) ===
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Running
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Waiting
|
||||
Container mtusi-messenger-lab4-seaweedfs-1 Healthy
|
||||
Container mtusi-messenger-lab4-s3-init-run-a60a52baaf22 Creating
|
||||
Container mtusi-messenger-lab4-s3-init-run-a60a52baaf22 Created
|
||||
{"time":"2026-10-21T19:37:16.941920617Z","level":"INFO","msg":"s3 bucket ready","endpoint":"http://seaweedfs:8333","bucket":"messenger-attachments"}
|
||||
Container mtusi-messenger-lab4-s3-init-run-33ccde88f9aa Creating
|
||||
Container mtusi-messenger-lab4-s3-init-run-33ccde88f9aa Created
|
||||
{"time":"2026-10-21T20:24:45.578062247Z","level":"INFO","msg":"s3 bucket ready","endpoint":"http://seaweedfs:8333","bucket":"messenger-attachments"}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
created attachment before outage: 01a15ff7-e2fe-7a6c-b896-c61c3451a6c5
|
||||
created attachment before outage: 01a1601e-9947-753c-8085-65db29e8a909
|
||||
seaweedfs stopped
|
||||
health/ready during outage: {'status': 'ok'}
|
||||
chat list during outage: 200
|
||||
download during outage: 503
|
||||
upload during outage: 503
|
||||
seaweedfs restarted
|
||||
upload after recovery: ready 01a15ff8-6610-7628-a06a-26e590c6186b
|
||||
upload after recovery: ready 01a1601f-1c45-793b-bb59-281781ea8482
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
ready attachment created: 01a15ff8-9634-77d1-b7e2-cd5831a19d49
|
||||
abandoned presign attachment: 01a15ff8-9639-7e03-a71c-2971e9425972 (no PUT)
|
||||
ready attachment created: 01a16022-78dc-7349-b3da-2937b2faf1f0
|
||||
abandoned presign attachment: 01a16022-78e3-733f-861b-0443011dcfc8 (no PUT)
|
||||
abandoned pending row removed after grace
|
||||
ready attachment survived sweep: ready 99ea7533c441f79cd630d15ce4d58d1ec4e06f6f0efb3b77a5c088305cd1bd75
|
||||
sweeper settings restored (10m/1m)
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
size,bytes,flow,iteration,latency_s,lb_rx_bytes,lb_tx_bytes,api_rx_bytes,api_tx_bytes,api_anon_peak
|
||||
~1MiB,1050888,proxy,0,0.2246,1059079,1059227,1059155,1060779,282734592
|
||||
~1MiB,1050888,proxy,1,0.2436,1057539,1058793,1058440,1058956,282742784
|
||||
~1MiB,1050888,proxy,2,0.2276,1058111,1058605,1059413,1060497,282763264
|
||||
~1MiB,1050888,proxy,3,0.2225,1056087,1058199,1058375,1058314,282767360
|
||||
~1MiB,1050888,proxy,4,0.2267,1057825,1059425,1058752,1059718,282771456
|
||||
~1MiB,1050888,presign,0,0.2196,3464,3596,1058037,9166,282787840
|
||||
~1MiB,1050888,presign,1,0.2249,3465,3729,1057424,9073,282836992
|
||||
~1MiB,1050888,presign,2,0.2171,4015,3833,1058301,8969,282849280
|
||||
~1MiB,1050888,presign,3,0.2276,3465,3597,1057489,8774,282865664
|
||||
~1MiB,1050888,presign,4,0.2327,4631,4333,1057989,9060,282877952
|
||||
~9MiB,9454448,proxy,0,0.2375,9490073,9512447,9506779,9489274,282886144
|
||||
~9MiB,9454448,proxy,1,0.2365,9488841,9503073,9493951,9486796,282882048
|
||||
~9MiB,9454448,proxy,2,0.2353,9489017,9505121,9505811,9490554,282890240
|
||||
~9MiB,9454448,proxy,3,0.2282,9491723,9501595,9500701,9493150,282906624
|
||||
~9MiB,9454448,proxy,4,0.229,9493835,9509411,9500971,9489868,282918912
|
||||
~9MiB,9454448,presign,0,0.2359,3465,3663,9473260,11216,282935296
|
||||
~9MiB,9454448,presign,1,0.235,4014,3832,9473694,11664,282968064
|
||||
~9MiB,9454448,presign,2,0.2391,3465,3795,9473579,13975,283009024
|
||||
~9MiB,9454448,presign,3,0.2504,4564,4068,9473083,14572,283045888
|
||||
~9MiB,9454448,presign,4,0.2353,3465,3597,9473381,12391,283054080
|
||||
~1MiB,1050888,proxy,0,0.2291,1058727,1075375,1074306,1059556,284934144
|
||||
~1MiB,1050888,proxy,1,0.2253,1058659,1058991,1060120,1061998,285270016
|
||||
~1MiB,1050888,proxy,2,0.2328,1058925,1059123,1058798,1059912,285433856
|
||||
~1MiB,1050888,proxy,3,0.227,1058485,1058633,1058297,1059591,285433856
|
||||
~1MiB,1050888,proxy,4,0.2284,1057165,1057115,1057126,1058104,285638656
|
||||
~1MiB,1050888,presign,0,0.2249,4098,3850,1058691,10486,285917184
|
||||
~1MiB,1050888,presign,1,0.2262,4163,3981,1058060,9274,286142464
|
||||
~1MiB,1050888,presign,2,0.2356,3548,3680,1057677,9240,286138368
|
||||
~1MiB,1050888,presign,3,0.2297,3482,3614,1058397,10146,286183424
|
||||
~1MiB,1050888,presign,4,0.2388,3482,3680,1057479,8382,286216192
|
||||
~9MiB,9454448,proxy,0,0.2374,9491811,9511561,9503858,9488878,286212096
|
||||
~9MiB,9454448,proxy,1,0.2397,9498015,9511259,9498331,9490528,286228480
|
||||
~9MiB,9454448,proxy,2,0.2247,9492207,9511759,9493573,9486286,286261248
|
||||
~9MiB,9454448,proxy,3,0.2273,9486399,9496645,9483662,9481323,286285824
|
||||
~9MiB,9454448,proxy,4,0.237,9483275,9494891,9493892,9482709,286285824
|
||||
~9MiB,9454448,presign,0,0.2431,4098,3916,9473045,12060,286306304
|
||||
~9MiB,9454448,presign,1,0.246,3552,3680,9472208,9451,286318592
|
||||
~9MiB,9454448,presign,2,0.2347,4164,3982,9473447,11088,286326784
|
||||
~9MiB,9454448,presign,3,0.2346,3482,3614,9471731,9174,286343168
|
||||
~9MiB,9454448,presign,4,0.2389,4098,3916,9473771,14040,286367744
|
||||
|
||||
|
@@ -2,10 +2,10 @@ Lab4 track 1: proxy vs presigned upload
|
||||
|
||||
| size | flow | median latency, s | p95 latency, s | LB rx, bytes | API rx, bytes | API anon peak, bytes |
|
||||
|---|---|---:|---:|---:|---:|---:|
|
||||
| ~1MiB | proxy | 0.227 | 0.244 | 1057728 | 1058827 | 282771456 |
|
||||
| ~1MiB | presign | 0.225 | 0.233 | 3808 | 1057848 | 282877952 |
|
||||
| ~9MiB | proxy | 0.235 | 0.237 | 9490698 | 9501643 | 282918912 |
|
||||
| ~9MiB | presign | 0.236 | 0.250 | 3795 | 9473399 | 283054080 |
|
||||
| ~1MiB | proxy | 0.228 | 0.233 | 1058392 | 1061729 | 285638656 |
|
||||
| ~1MiB | presign | 0.230 | 0.239 | 3755 | 1058061 | 286216192 |
|
||||
| ~9MiB | proxy | 0.237 | 0.240 | 9490341 | 9494663 | 286285824 |
|
||||
| ~9MiB | presign | 0.239 | 0.246 | 3879 | 9472840 | 286367744 |
|
||||
|
||||
Note: presigned upload keeps the file body off the API request path and off the load balancer.
|
||||
Completion still streams the object from S3 once to verify its SHA-256, so api_rx stays close to
|
||||
|
||||
Reference in New Issue
Block a user