Skip to content

Commit c09cedf

Browse files
committed
just latency section
1 parent e8b7ce8 commit c09cedf

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

docs/admin/networking/index.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,64 @@ low-latency browser experiences for geo-distributed teams.
197197

198198
To learn more, see [Workspace Proxies](./workspace-proxies.md).
199199

200+
## Latency
201+
202+
Coder measures and reports several types of latency, providing insights into the performance of your deployment. Understanding these metrics can help you diagnose issues and optimize the user experience.
203+
204+
There are three main types of latency metrics for your Coder deployment:
205+
206+
- Dashboard-to-server latency:
207+
208+
The Coder UI measures round-trip time to the Coder server or workspace proxy using built-in browser timing capabilities.
209+
210+
This appears in the user interface next to your username, showing how responsive the dashboard is.
211+
212+
- Workspace connection latency:
213+
214+
The latency shown on the workspace dashboard measures the round-trip time between the workspace agent and its DERP relay server.
215+
216+
This metric is displayed in milliseconds on the workspace dashboard and specifically shows the agent-to-relay latency, not direct P2P connections.
217+
218+
Total end-to-end latency experienced by a user is a combination of dashboard-to-server latency plus this agent-to-relay latency.
219+
220+
- Database latency:
221+
222+
For administrators, Coder monitors and reports database query performance in the health dashboard.
223+
224+
### How latency is classified
225+
226+
Latency measurements are color-coded in the dashboard:
227+
228+
- **Green** (<150ms): Good performance.
229+
- **Yellow** (150-300ms): Moderate latency that might affect user experience.
230+
- **Red** (>300ms): High latency that will noticeably affect user experience.
231+
232+
### View latency information
233+
234+
- **Dashboard**: The global latency indicator appears in the top navigation bar.
235+
- **Workspace list**: Each workspace shows its connection latency.
236+
- **Health dashboard**: Administrators can view advanced metrics including database latency.
237+
- **CLI**: Use `coder ping <workspace>` to measure and analyze latency from the command line.
238+
239+
### Factors that affect latency
240+
241+
- **Geographic distance**: Physical distance between users, Coder server, and workspaces.
242+
- **Network connectivity**: Quality of internet connections and routing.
243+
- **Infrastructure**: Cloud provider regions and network optimization.
244+
- **P2P connectivity**: Whether direct connections can be established or relays are needed.
245+
246+
### How to optimize latency
247+
248+
To improve latency and user experience:
249+
250+
- **Deploy workspace proxies**: Place [proxies](./workspace-proxies.md) in regions closer to users, connecting back to your single Coder server deployment.
251+
- **Use P2P connections**: Ensure network configurations permit direct connections.
252+
- **Strategic placement**: Deploy your Coder server in a region where most users work.
253+
- **Network configuration**: Optimize routing between users and workspaces.
254+
- **Check firewall rules**: Ensure they don't block necessary Coder connections.
255+
256+
For help troubleshooting connection issues, including latency problems, refer to the [networking troubleshooting guide](./troubleshooting.md).
257+
200258
## Up next
201259

202260
- Learn about [Port Forwarding](./port-forwarding.md)

0 commit comments

Comments
 (0)