You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/solana/README.md
+43-2Lines changed: 43 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,16 @@ Solana nodes on AWS can be deployed in 2 different configurations: base RPC and
26
26
3. The Solana nodes use all required secrets locally, but optionally can store a copy in [AWS Secrets Manager](https://docs.aws.amazon.com/secretsmanager/latest/userguide/intro.html) as secure backup.
27
27
4. The Solana nodes send various monitoring metrics for both EC2 and Solana nodes to Amazon CloudWatch.
28
28
29
+
### Optimizing Data Transfer Costs
30
+
31
+
Solana Agave clients generate significant outbound traffic, ranging from 80 to 200+ TiB monthly in recent years. To manage associated costs, the blueprint includes an outbound traffic optimization feature that automatically monitors and adjusts bandwidth usage.
32
+
33
+
The system works by tracking the node's "Slots Behind" metric after the initial sync is done. When this metric reaches zero, indicating the node is fully synced, the system applies a user-defined bandwidth limit specified in the `SOLANA_LIMIT_OUT_TRAFFIC_MBPS` variable of your `.env` file. If the slots behind metric exceeds 100, the limit is temporarily removed until the node catches up. While the default outbound bandwidth limit is set to 20 Mbit/s (~6.5 TiB/month), testing has shown that nodes can maintain synchronization even at speeds as low as 15 Mbit/s. Inbound bandwidth remains unrestricted.
34
+
35
+
To maintain operational efficiency, the system excludes internal network traffic from these restrictions. Traffic within standard internal IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16) remains unrestricted, ensuring that AWS applications using internal IPs function normally. This optimization can reduce data transfer costs by over 90%.
36
+
37
+
It's important to note that while this feature is highly effective for RPC nodes, it should not be implemented on consensus nodes. Restricting outbound traffic on consensus nodes can compromise performance and is not recommended for optimal network participation.
38
+
29
39
## Additional materials
30
40
31
41
<details>
@@ -84,8 +94,8 @@ This is the Well-Architected checklist for Solana nodes implementation of the AW
84
94
85
95
| Usage pattern | Ideal configuration | Primary option on AWS | Data Transfer Estimates | Config reference |
6. How can I check network throttling configuration currently applied to the instance?
319
+
320
+
```bash
321
+
# Check iptables manage table
322
+
iptables -t mangle -L -n -v
323
+
324
+
# Set network interface ID
325
+
INTERFACE=$(ip -br addr show | grep -v '^lo'| awk '{print $1}'| head -n1)
326
+
327
+
# Check traffic control (tc) tool configuration
328
+
tc qdisc show
329
+
330
+
# Watch current traffic
331
+
tc -s qdisc ls dev $INTERFACE
332
+
333
+
# Monitor bandwidth in real-time
334
+
iftop -i $INTERFACE
335
+
```
336
+
337
+
7. How to manually remove all iptables and tc rules?
338
+
339
+
```bash
340
+
# Remove tc rules
341
+
tc qdisc del dev $INTERFACE root
342
+
343
+
# Remove iptables rules
344
+
iptables -t mangle -D OUTPUT -j MARKING
345
+
iptables -t mangle -F MARKING
346
+
iptables -t mangle -X MARKING
347
+
```
348
+
308
349
## Upgrades
309
350
310
351
When nodes need to be upgraded or downgraded, [use blue/green pattern to do it](https://aws.amazon.com/blogs/devops/performing-bluegreen-deployments-with-aws-codedeploy-and-auto-scaling-groups/). This is not yet automated and contributions are welcome!
0 commit comments