---
# System prepended metadata

title: testnet redundancy testing

---

# testnet redundancy testing 

- branch: `feat/redundancy-api-tests`
- commit: `0624ea47e3e30eab8de8ee5ab72596fc137011d0`
- file size ~5Mb (4386 chunks)

## test 1 - 1 second timeout

```shell
curl -v -o out.bin \
-H "Swarm-Cache: false" \
-H "Swarm-Chunk-Retrieval-Timeout: 1s" \
-H "Swarm-Redundancy-Strategy: 0" \
-H "Swarm-Redundancy-Fallback-Mode: false" \
$api/bzz/$ref/

output:

< HTTP/1.1 200 OK

100 4919k  100 4919k    0     0   186k      0  0:00:26  0:00:26 --:--:--  179k
```

## test 2 - 500 millisecond timeout

```shell
curl -v -o out.bin \
-H "Swarm-Cache: false" \
-H "Swarm-Chunk-Retrieval-Timeout: 500ms" \
-H "Swarm-Redundancy-Strategy: 0" \
-H "Swarm-Redundancy-Fallback-Mode: false" \
$api/bzz/$ref/

output:

< HTTP/1.1 200 OK

100 4919k  100 4919k    0     0   182k      0  0:00:27  0:00:27 --:--:--  207k
```

## test 3 - below 300 millisecond timeout - breaking point

```shell
curl -v -o out.bin \
-H "Swarm-Cache: false" \
-H "Swarm-Chunk-Retrieval-Timeout: 300ms" \
-H "Swarm-Redundancy-Strategy: 0" \
-H "Swarm-Redundancy-Fallback-Mode: false" \
$api/bzz/$ref/

output:

download stuck with

"time"="2024-01-10 12:23:20.119574" "level"="debug" "logger"="node/libp2p" "msg"="handle protocol failed" "protocol"="pullsync" "version"="1.3.0" "stream"="pullsync" "peer"="2b3cd53f15bc7558e5d42df3a92b33438a5062266e1c873dee61e999217065ea" "error"="make offer: context deadline exceeded"
```

## test 4 - fallback true; 300 millisecond timeout

```shell
curl -v -o out.bin \
-H "Swarm-Cache: false" \
-H "Swarm-Chunk-Retrieval-Timeout: 300ms" \
-H "Swarm-Redundancy-Strategy: 0" \
-H "Swarm-Redundancy-Fallback-Mode: false" \
$api/bzz/$ref/

output:

100 4919k  100 4919k    0     0   135k      0  0:00:36  0:00:36 --:--:--  145k
```

## test 5 - fallback false; 300 millisecond timeout with redundancy strategy 3

```shell
curl -v -o out.bin \
-H "Swarm-Cache: false" \
-H "Swarm-Chunk-Retrieval-Timeout: 300ms" \
-H "Swarm-Redundancy-Strategy: 0" \
-H "Swarm-Redundancy-Fallback-Mode: false" \
$api/bzz/$ref/

output:

100 1819k  100 1819k    0     0   128k      0  0:00:14  0:00:14 --:--:--  129k
```

----

- video file ~32Mb

- step 1

> Swarm-Cache: false
> Swarm-Chunk-Retrieval-Timeout: 10s
> Swarm-Redundancy-Strategy: 0
> Swarm-Redundancy-Fallback-Mode: false
> Content-Length: 105128851
> Content-Type: video/mp4

result: downloaded successfully

- step 2

> Swarm-Cache: false
> Swarm-Chunk-Retrieval-Timeout: 1s
> Swarm-Redundancy-Strategy: 0
> Swarm-Redundancy-Fallback-Mode: false
> Content-Length: 105128851
> Content-Type: video/mp4

result: context deadline exceeded

- step 3

> Swarm-Cache: false
> Swarm-Chunk-Retrieval-Timeout: 1s
> Swarm-Redundancy-Strategy: 0
> Swarm-Redundancy-Fallback-Mode: true
> Content-Length: 105128851
> Content-Type: video/mp4

result: success at 

- step 4

> Swarm-Cache: false
> Swarm-Chunk-Retrieval-Timeout: 1s
> Swarm-Redundancy-Strategy: 0
> Swarm-Redundancy-Fallback-Mode: false
> Content-Length: 105128851
> Content-Type: video/mp4

result: stuck at 3648k with "error"="context deadline exceeded"

`11 32.0M   11 3648k    0     0  34792      0  0:16:06  0:01:47  0:14:19     0^C`

- step 5

> Swarm-Cache: false
> Swarm-Chunk-Retrieval-Timeout: 5s
> Swarm-Redundancy-Strategy: 0
> Swarm-Redundancy-Fallback-Mode: true
> Content-Length: 105128851
> Content-Type: video/mp4

result: success

- step 6 (repeat step 4)

> Swarm-Cache: false
> Swarm-Chunk-Retrieval-Timeout: 1s
> Swarm-Redundancy-Strategy: 0
> Swarm-Redundancy-Fallback-Mode: false
> Content-Length: 105128851
> Content-Type: video/mp4

result: success

`100 32.0M  100 32.0M    0     0   222k      0  0:02:27  0:02:27 --:--:--  226k`

```shell
swarm:Videos/ $ sha384sum *
de8e965827bbebcd04066662bdba51402822a097817e150f57a536a71c2948d0f1f28ccf7f7a3ea002ab8b60b24ddb45  download.mp4
de8e965827bbebcd04066662bdba51402822a097817e150f57a536a71c2948d0f1f28ccf7f7a3ea002ab8b60b24ddb45  graeber.mp4
```