Replies: 2 comments
-
Also, try: Long-Running Stability Test Goal: Setup: Keep 500 peers running continuously for 2 days on cheap spot instances. Use CloudWatch + Prometheus/Grafana for resource tracking. Simulate light ongoing activity (occasional pubsub + DHT queries). |
Beta Was this translation helpful? Give feedback.
-
Large-Scale Peer Discovery & DHT Benchmark Goal: Setup: Deploy 1,000+ py-libp2p peers on ECS (Fargate) or EKS (Kubernetes). Use multiple AWS regions to add realistic latency. Perform parallel DHT lookups (PUT/GET) and peer discovery under churn (nodes joining/leaving). Metrics to collect: Average lookup latency (ms). Routing table convergence time. Success rate under churn. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
1. Metrics to Track for py-libp2p
To monitor a live network, collect metrics at 3 levels:
a) Node-Level (per peer instance)
CPU / Memory / Network
CPUUtilization
MemoryUtilization
NetworkIn
/NetworkOut
Open Connections
Libp2p-Specific Node Stats
b) Protocol-Level (DHT, PubSub, Relays)
DHT
dht_lookup_latency
)dht_query_success_rate
)dht_routing_table_size
)PubSub
pubsub_msg_rate
)pubsub_msg_latency
)pubsub_msg_drop_count
)Relay / NAT
relay_conn_count
)nat_holepunch_success_rate
)c) Cluster-Level (whole network)
2. AWS Setup
We’ll use CloudWatch for collection and Grafana for visualization.
Step 1 – Instrument py-libp2p
Add a small metrics exporter in your py-libp2p nodes:
prometheus_client
) to expose metrics at/metrics
.Step 2 – Push to CloudWatch
Use the CloudWatch Agent in each container/instance:
/metrics
).py-libp2p
).3. Grafana Dashboard Layout
Use Amazon Managed Grafana (integrated with CloudWatch).
Panels to Create:
Top Row – Network Health
libp2p_connected_peers
Second Row – DHT Performance
libp2p_dht_lookup_latency
libp2p_dht_query_success_rate
Third Row – PubSub Throughput
libp2p_pubsub_msg_rate
libp2p_pubsub_msg_latency
Fourth Row – Resource Usage
CPUUtilization
,MemoryUtilization
NetworkIn
/NetworkOut
Fifth Row – Failures & Errors
4. Alerting
Set CloudWatch alarms for:
Integrate with SNS or Slack/Webhook for real-time alerts.
Beta Was this translation helpful? Give feedback.
All reactions