https://github.com/andresribeiro/latency-insights
Understand the impact of network latency on user experience
https://github.com/andresribeiro/latency-insights
dns http network networking tcp tls udp websocket websockets
Last synced: 10 months ago
JSON representation
Understand the impact of network latency on user experience
- Host: GitHub
- URL: https://github.com/andresribeiro/latency-insights
- Owner: andresribeiro
- License: mit
- Created: 2025-05-31T16:30:19.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-31T19:39:32.000Z (about 1 year ago)
- Last Synced: 2025-06-20T09:09:43.502Z (12 months ago)
- Topics: dns, http, network, networking, tcp, tls, udp, websocket, websockets
- Language: TypeScript
- Homepage: https://latency-insights.b-cdn.net/
- Size: 47.9 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Latency Insights for Developers 👩💻
This project is a web-based tool designed to help developers understand the impact of network latency on user experience. It simulates different network conditions to demonstrate how varying round-trip times (RTT) affect real-time communication (chat) and HTTP request loading times.
## Features
- **Simulated Latency:** Choose from a range of predefined latency values (50ms to 1000ms) to observe their effects.
- **Real-time Chat Simulation:** Experience how latency impacts the responsiveness of a two-way chat between \"Alice\" and \"Bob.\" Messages are delayed based on the selected RTT.
- **Simulated HTTP Request Loading:** See a breakdown of a simulated HTTP request's load time, including network RTT, DNS lookup, TCP handshake, TLS handshake, and server processing.
- **Fake Tweets Loading:** Load a list of \"tech tweets\" with a delay that reflects the simulated HTTP load time, demonstrating how content delivery is affected by latency.
## How it Works
The application uses `setTimeout` to simulate network delays.
- **Chat:** When a message is sent, it's immediately displayed on the sender's side, but a delayed `setTimeout` is used to display it on the receiver's side, mimicking network propagation.
- **HTTP Request:** The \"Load Tweets\" button triggers a `setTimeout` that accounts for the specified network latency, along with values for DNS, TCP, TLS, and server processing, before displaying the \"tweets.\"