1 stable release
Uses new Rust 2024
| new 2025.10.22 | Oct 21, 2025 |
|---|---|
| 2025.9.25 |
|
| 2025.4.27 |
|
| 2025.4.20 |
|
#3 in #real-world
269 downloads per month
195KB
199 lines
Laggy
Laggy is a network‑performance measurement tool designed to assess latency and jitter between a specified source location and AWS cloud regions. It supports both IPv4 and IPv6 communications, and uses AWS regional API Gateways to emulate realistic end‑to‑end connectivity scenarios.
Key Highlights
- Measures round‑trip network latency (“min”, “max”, “avg”) for each target site/region.
- Captures jitter implicitly via the variance between min and max values.
- Produces structured output (JSON) which includes the “whoami” metadata (client IP, geolocation, ASN) plus per‑site latency statistics.
- Covers multiple AWS regions (e.g., “use1”, “cac1”, “usw2”, etc.) with distinct latency profiles based on geography.
Sample Output
"whoami": {
"ip": "172.203.190.66",
"geo": {
"country": "United States",
"c_iso": "US",
"state": "Virginia",
"s_iso": "VA",
"city": "Washington",
"zip": "22747",
"latitude": 38.7095,
"longitude": -78.1539,
"cidr": "172.203.160.0/19"
},
"asn": {
"id": 8075,
"org": "MICROSOFT-CORP-MSN-AS-BLOCK",
"net": "172.192.0.0/12"
},
"ipaddress": {
"version": 4,
"multicast": false,
"private": false,
"global": true,
"unspecified": false,
"reserved": false,
"loopback": false,
"link_local": false,
"site_local": null,
"ipv4_mapped": "None",
"ipv6_mapped": "::ffff:172.203.190.66",
"sixtofour": "None",
"teredo": "None"
},
"attribution": "This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.",
"geolite2-asn.mmdb": "Tue, 21 Oct 2025 08:30:17 GMT",
"geolite2-city.mmdb": "Fri, 17 Oct 2025 15:30:49 GMT"
}
Example per‑site latency statistics:
{"site": "https://ipv4.use1.lag.4n6ir.com", "min": "49.474989ms", "max": "65.239886ms", "avg": "53.155841ms"}
{"site": "https://ipv4.cac1.lag.4n6ir.com", "min": "86.190945ms", "max": "97.900145ms", "avg": "91.066022ms"}
{"site": "https://ipv4.use2.lag.4n6ir.com", "min": "87.780783ms", "max": "105.434917ms", "avg": "94.822079ms"}
{"site": "https://ipv4.mxc1.lag.4n6ir.com", "min": "191.688637ms", "max": "201.067481ms", "avg": "196.623262ms"}
{"site": "https://ipv4.usw1.lag.4n6ir.com", "min": "227.183168ms", "max": "265.51817ms", "avg": "248.774731ms"}
{"site": "https://ipv4.euw1.lag.4n6ir.com", "min": "239.461047ms", "max": "260.934128ms", "avg": "252.676971ms"}
{"site": "https://ipv4.euw2.lag.4n6ir.com", "min": "268.89503ms", "max": "283.836643ms", "avg": "274.866102ms"}
{"site": "https://ipv4.euw3.lag.4n6ir.com", "min": "284.438715ms", "max": "305.463134ms", "avg": "294.465567ms"}
{"site": "https://ipv4.caw1.lag.4n6ir.com", "min": "285.499577ms", "max": "321.867029ms", "avg": "298.455462ms"}
{"site": "https://ipv4.usw2.lag.4n6ir.com", "min": "273.72637ms", "max": "322.391924ms", "avg": "301.248329ms"}
{"site": "https://ipv4.eus1.lag.4n6ir.com", "min": "298.847091ms", "max": "311.121293ms", "avg": "306.100594ms"}
{"site": "https://ipv4.euc1.lag.4n6ir.com", "min": "309.745704ms", "max": "330.092068ms", "avg": "321.134644ms"}
{"site": "https://ipv4.euc2.lag.4n6ir.com", "min": "299.883087ms", "max": "349.077992ms", "avg": "321.950201ms"}
{"site": "https://ipv4.eus2.lag.4n6ir.com", "min": "320.605045ms", "max": "343.429678ms", "avg": "333.948839ms"}
{"site": "https://ipv4.eun1.lag.4n6ir.com", "min": "335.043557ms", "max": "421.025676ms", "avg": "361.93723ms"}
{"site": "https://ipv4.sae1.lag.4n6ir.com", "min": "375.280304ms", "max": "403.455761ms", "avg": "387.516091ms"}
{"site": "https://ipv4.ilc1.lag.4n6ir.com", "min": "446.641812ms", "max": "475.884023ms", "avg": "459.996726ms"}
{"site": "https://ipv4.apne1.lag.4n6ir.com", "min": "510.081861ms", "max": "533.147351ms", "avg": "522.33966ms"}
{"site": "https://ipv4.apne3.lag.4n6ir.com", "min": "536.524993ms", "max": "580.325484ms", "avg": "550.548533ms"}
{"site": "https://ipv4.mes1.lag.4n6ir.com", "min": "550.74309ms", "max": "578.135506ms", "avg": "559.875995ms"}
{"site": "https://ipv4.ape2.lag.4n6ir.com", "min": "571.204748ms", "max": "618.928571ms", "avg": "588.000005ms"}
{"site": "https://ipv4.mec1.lag.4n6ir.com", "min": "568.966973ms", "max": "611.790613ms", "avg": "592.672915ms"}
{"site": "https://ipv4.apne2.lag.4n6ir.com", "min": "581.629905ms", "max": "622.229639ms", "avg": "594.936668ms"}
{"site": "https://ipv4.aps1.lag.4n6ir.com", "min": "614.012755ms", "max": "645.066602ms", "avg": "628.345081ms"}
{"site": "https://ipv4.apse2.lag.4n6ir.com", "min": "615.411275ms", "max": "665.818342ms", "avg": "640.513927ms"}
{"site": "https://ipv4.ape1.lag.4n6ir.com", "min": "640.074965ms", "max": "664.881117ms", "avg": "654.470508ms"}
{"site": "https://ipv4.apse6.lag.4n6ir.com", "min": "659.694405ms", "max": "669.850743ms", "avg": "665.478079ms"}
{"site": "https://ipv4.afs1.lag.4n6ir.com", "min": "666.212275ms", "max": "686.539328ms", "avg": "676.802651ms"}
{"site": "https://ipv4.apse4.lag.4n6ir.com", "min": "666.758555ms", "max": "699.817636ms", "avg": "686.168473ms"}
{"site": "https://ipv4.apse1.lag.4n6ir.com", "min": "696.191183ms", "max": "702.685691ms", "avg": "698.865192ms"}
{"site": "https://ipv4.apse5.lag.4n6ir.com", "min": "708.350994ms", "max": "751.185882ms", "avg": "721.756144ms"}
{"site": "https://ipv4.apse3.lag.4n6ir.com", "min": "735.413523ms", "max": "751.755833ms", "avg": "743.90954ms"}
{"site": "https://ipv4.aps2.lag.4n6ir.com", "min": "746.904826ms", "max": "759.133876ms", "avg": "752.015994ms"}
{"site": "https://ipv4.apse7.lag.4n6ir.com", "min": "760.031276ms", "max": "835.024842ms", "avg": "784.809453ms"}
Value Proposition
- Enables developers, network engineers or SREs to benchmark connectivity from their source to AWS regions for performance‑sensitive workloads.
- Compares latency across regions (and between IPv4 vs IPv6) and detects jitter (via min‑to‑max variation).
- Provides structured, machine‑readable output for dashboards or automation pipelines.
- Offers transparent insights by including source IP and region‑specific latency data.
Summary
Laggy provides a lightweight yet insightful tool to assess how “far” your network really is — in terms of latency and jitter — to various AWS regions, using real HTTP/HTTPS endpoints via API Gateway. It’s ideal for optimizing region selection, disaster recovery planning, or performance tuning.
Dependencies
~4–19MB
~194K SLoC