This commit is contained in:
Ben 2024-02-06 10:12:37 +00:00
parent 3f6d4cbd51
commit ecab792373
1 changed files with 25 additions and 1 deletions

View File

@ -12,13 +12,37 @@ Even when a developer connects to a workspace via [VS Code Remote SSH](https://g
> You can run the Coder server behind an ingress, reverse proxy, and/or LoadBalancer as long as WebSockets are supported.
## Direct connections
## Optimizing latency
There are several ways to optimize latency. How to identify what current latency is:
Understand your network:
- Understand VPNs
- Understand where workspace is
- Understand where clients are
- Understand Coder server is
### Direct connections
What is STUN
In some scenarios, a client can establish a direct "peer-to-peer" connection without traffic being routed through the Coder server. Here are the scenarios
- The client is connecting via SSH, not a web browser
- The client and Coder server has access to a STUN server
- We need to expose a UDP port on cluster's end
- Most clients already have NAT traversal capabilities
### Workspace proxies
This is a way to make connections better for web and non-direct connections
### Upgrade header
- Look in health check if DERP header is blocked
- The `upgrade: DERP` header is ideal
- Ideally: we have performance
## Up next