Skip to content

Commit 722598d

Browse files
Traffic tool (#271)
* feat: traffic estimator * docs: fix eb size calculation
1 parent dd05ce2 commit 722598d

File tree

5 files changed

+1350
-27
lines changed

5 files changed

+1350
-27
lines changed

docs/egress-node-traffic-analysis.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- block size 90,112 bytes (88 KiB)
2121
- average transaction size: 1,400 bytes (based on mainnet data)
2222
- average transactions per block: ~13.5 (based on mainnet data)
23-
- **131,400 blocks x 90,112 bytes = 11,840,724,480 bytes ~11.84 GiB**
23+
- **131,400 blocks x 90,112 bytes = 11,840,724,480 bytes ~11.03 GiB**
2424

2525
> [!Note]
2626
>
@@ -39,24 +39,24 @@
3939

4040
#### Node traffic
4141
```
42-
(A) Headers: 131,400 blocks x 1,024 bytes x 20 peers = 2.69 GiB
43-
Bodies: 131,400 blocks x 90,112 bytes x 5 peers = 59.19 GiB
44-
Total: 61.88 GiB
42+
(A) Headers: 131,400 blocks x 1,024 bytes x 20 peers = 2.51 GiB
43+
Bodies: 131,400 blocks x 90,112 bytes x 5 peers = 55.13 GiB
44+
Total: 57.64 GiB
4545
46-
(B) Headers: 131,400 blocks x 1,024 bytes x 35 peers = 4.71 GiB
47-
Bodies: 131,400 blocks x 90,112 bytes x 9 peers = 106.55 GiB
48-
Total: 111.26 GiB
46+
(B) Headers: 131,400 blocks x 1,024 bytes x 35 peers = 4.39 GiB
47+
Bodies: 131,400 blocks x 90,112 bytes x 9 peers = 99.23 GiB
48+
Total: 103.62 GiB
4949
```
5050

5151
- additional traffic from transactions (5-10 GiB?) and consensus (~1-2 GiB?)
5252

5353
#### Final total egress per month/ node
5454
```
55-
(A) Low end: 61.88 GiB + 5 GiB + 1 GiB = 67.88 GiB
56-
High end: 61.88 GiB + 10 GiB + 2 GiB = 73.88 GiB
55+
(A) Low end: 57.64 GiB + 5 GiB + 1 GiB = 63.64 GiB
56+
High end: 57.64 GiB + 10 GiB + 2 GiB = 69.64 GiB
5757
58-
(B) Low end: 111.26 GiB + 5 GiB + 1 GiB = 117.26 GiB
59-
High end: 111.26 GiB + 10 GiB + 2 GiB = 123.26 GiB
58+
(B) Low end: 103.62 GiB + 5 GiB + 1 GiB = 109.62 GiB
59+
High end: 103.62 GiB + 10 GiB + 2 GiB = 115.62 GiB
6060
```
6161

6262
## Ouroboros Leios
@@ -71,7 +71,7 @@
7171
- Body hash: 32 bytes
7272
- RB Ref: 32 bytes
7373
- Signature: 64 bytes
74-
- Body: 98,304 bytes
74+
- Body: 98,304 bytes (96 KiB)
7575

7676
#### Endorsement Blocks (EB)
7777
- Header: 240 bytes
@@ -87,8 +87,8 @@
8787
- Votes per EB: 600 votes × 1.5 EBs = 900 votes per stage
8888

8989
#### Ranking Blocks (RB)
90-
- Header: 1,024 bytes
91-
- Body: 90,112 bytes
90+
- Header: 1,024 bytes (1 KiB)
91+
- Body: 90,112 bytes (88 KiB)
9292

9393
### Monthly Traffic Calculation
9494

@@ -100,14 +100,14 @@
100100

101101
#### Example Calculation (1 IB/s, 20 peers, 100% header propagation, 25% body requests)
102102
```
103-
IB Headers: 2,592,000 seconds × 304 bytes × 20 peers = 15.76 GiB
104-
IB Bodies: 2,592,000 seconds × 98,304 bytes × 5 peers = 1.27 TiB
105-
EB Headers: 194,400 seconds × 240 bytes × 20 peers = 933.12 MiB
106-
EB Bodies: 194,400 seconds × 32 bytes × 20 IBs per stage × 5 peers = 622.08 MiB
103+
IB Headers: 2,592,000 seconds × 304 bytes × 20 peers = 14.69 GiB
104+
IB Bodies: 2,592,000 seconds × 98,304 bytes × 5 peers = 1.18 TiB
105+
EB Headers: 1 IB/s × 240 bytes × 1.5 EBs × 20 peers × 129,600 stages = 869.38 MiB
106+
EB Bodies: 1 IB/s × 32 bytes × 1.5 EBs × 5 peers × 129,600 stages = 579.59 MiB
107107
Votes: 194,400 seconds × 150 bytes × 900 votes × 20 peers = 524.88 GiB
108-
RB Headers: 129,600 seconds × 1,024 bytes × 20 peers = 2.65 GiB
109-
RB Bodies: 129,600 seconds × 90,112 bytes × 5 peers = 58.39 GiB
110-
Total: 1.88 TiB
108+
RB Headers: 129,600 seconds × 1,024 bytes × 20 peers = 2.47 GiB
109+
RB Bodies: 129,600 seconds × 90,112 bytes × 5 peers = 54.43 GiB
110+
Total: 1.75 TiB
111111
112112
Note:
113113
- IB traffic dominates due to larger body size (98,304 bytes = 96 KiB)
@@ -120,11 +120,11 @@ Note:
120120

121121
| IB/s | IB Headers | IB Bodies | EB Headers | EB Bodies | Votes | RB Headers | RB Bodies | Total | vs Praos (A) |
122122
|------|------------|-----------|------------|-----------|-------|------------|-----------|-------|--------------|
123-
| 1 | 15.76 GB | 1.27 TB | 933.12 MB | 622.08 MB | 524.88 GB | 2.65 GB | 58.39 GB | 1.88 TB | +2,670% |
124-
| 5 | 78.80 GB | 6.37 TB | 933.12 MB | 3.11 GB | 2.62 TB | 2.65 GB | 58.39 GB | 9.07 TB | +13,260% |
125-
| 10 | 157.59 GB | 12.74 TB | 933.12 MB | 6.22 GB | 5.25 TB | 2.65 GB | 58.39 GB | 18.11 TB | +26,590% |
126-
| 20 | 315.19 GB | 25.48 TB | 933.12 MB | 12.44 GB | 10.50 TB | 2.65 GB | 58.39 GB | 36.19 TB | +53,130% |
127-
| 30 | 472.78 GB | 38.22 TB | 933.12 MB | 18.66 GB | 15.75 TB | 2.65 GB | 58.39 GB | 54.28 TB | +79,670% |
123+
| 1 | 14.69 GiB | 1.18 TiB | 869.38 MiB | 579.59 MiB | 524.88 GiB | 2.47 GiB | 54.43 GiB | 1.75 TiB | +2,670% |
124+
| 5 | 73.45 GiB | 5.90 TiB | 869.38 MiB | 2.90 GiB | 2.62 TiB | 2.47 GiB | 54.43 GiB | 8.52 TiB | +13,260% |
125+
| 10 | 146.90 GiB | 11.80 TiB | 869.38 MiB | 5.80 GiB | 5.25 TiB | 2.47 GiB | 54.43 GiB | 17.03 TiB | +26,590% |
126+
| 20 | 293.80 GiB | 23.60 TiB | 869.38 MiB | 11.60 GiB | 10.50 TiB | 2.47 GiB | 54.43 GiB | 34.06 TiB | +53,130% |
127+
| 30 | 440.70 GiB | 35.40 TiB | 869.38 MiB | 17.40 GiB | 15.75 TiB | 2.47 GiB | 54.43 GiB | 51.09 TiB | +79,670% |
128128

129129
### Monthly Cost by Cloud Provider ($)
130130

@@ -141,7 +141,7 @@ Note:
141141
| Hetzner | $0.00108 | 1,024 | $2.07 | $9.80 | $19.50 | $38.92 | $58.35 | +75% |
142142
| UpCloud | $0.000 | 1,024–24,576 | $0.00 | $0.00 | $0.00 | $0.00 | $0.00 | 0% |
143143

144-
Note: Percentage increases are calculated against Praos scenario A (20 peers) baseline of 67.88 GiB/month and $7.73/month (using average cost across providers)
144+
Note: Percentage increases are calculated against Praos scenario A (20 peers) baseline of 63.64 GiB/month and $7.73/month (using average cost across providers)
145145

146146
### Data Egress Cost Sources
147147

site/docusaurus.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ const config: Config = {
102102
to: "https://leios.cardano-scaling.org/cost-estimator/",
103103
label: "Cost Estimator",
104104
},
105+
{
106+
to: "/traffic-estimator",
107+
label: "Traffic Estimator",
108+
},
105109
],
106110
},
107111
{

0 commit comments

Comments
 (0)