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: docs/admin/networking/index.md
+52-4Lines changed: 52 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -79,13 +79,61 @@ dashboard-accessed web apps.
79
79
80
80
##Latency
81
81
82
-
Coder measures and reports severalmeasures of latency,including database latency andtheround-trip time between a userandtheir workspace.
82
+
Coder measures and reports severaltypes of latency,providing insights intotheperformance of your deployment. Understanding these metrics can help you diagnose issuesandoptimize the user experience.
83
83
84
-
A higher latency can lead to lagforthe user in how they interact with terminal sessions, file actions, lag within code-server and other browser-based IDEs, and a general experience of a laggy connection.
84
+
There are three main types of latency metricsforyour Coder deployment:
85
85
86
-
You can find latency measurements in
86
+
- Dashboard-to-server latency:
87
+
88
+
The Coder UI measures round-trip time to the Coder server using the browser's Performance API.
89
+
90
+
This appears in the user interface next to your username, showing how responsive the dashboard is.
87
91
88
-
To lower latency and help improve your users' experience, you can
92
+
- Workspace connection latency:
93
+
94
+
When users connect to workspaces, Coder measures and displays the latency between the user and:
95
+
- Workspace (direct P2P connection when possible)
96
+
- DERP relay servers (when P2P isn't possible)
97
+
98
+
This latency is visible in workspace cards and resource pages. It shows the round-trip time in milliseconds.
99
+
100
+
- Database latency:
101
+
102
+
For administrators, Coder monitors and reports database query performance in the health dashboard.
103
+
104
+
###How latency is classified
105
+
106
+
Latency measurements are color-coded in the dashboard:
107
+
108
+
-**Green** (<150ms): Good performance.
109
+
-**Yellow** (150-300ms): Moderate latency that might affect user experience.
110
+
-**Red** (>300ms): High latency that will noticeably affect user experience.
111
+
112
+
###View latency information
113
+
114
+
-**Dashboard**: The global latency indicator appears in the top navigation bar.
115
+
-**Workspace list**: Each workspace shows its connection latency.
116
+
-**Health dashboard**: Administrators can view advanced metrics including database latency.
117
+
-**CLI**: Use`coder ping <workspace>` to measure and analyze latency from the command line.
118
+
119
+
###Factors that affect latency
120
+
121
+
-**Geographic distance**: Physical distance between users, Coder server, and workspaces.
122
+
-**Network connectivity**: Quality of internet connections and routing.
123
+
-**Infrastructure**: Cloud provider regions and network optimization.
124
+
-**P2P connectivity**: Whether direct connections can be established or relays are needed.
125
+
126
+
###How to optimize latency
127
+
128
+
To improve latency and user experience:
129
+
130
+
-**Deploy workspace proxies**: Place[proxies](./workspace-proxies.md) in regions closer to users.
131
+
-**Use P2P connections**: Ensure network configurations permit direct connections.
132
+
-**Regional deployments**: Place Coder servers in regions where most users work.
133
+
-**Network configuration**: Optimize routing between users and workspaces.
134
+
-**Check firewall rules**: Ensure they don't block necessary Coder connections.
135
+
136
+
For help troubleshooting connection issues, including latency problems, refer to the[networking troubleshooting guide](./troubleshooting.md).