Skip to content

Commit 63278ab

Browse files
authored
Reword latency docs for HA (#8860)
Signed-off-by: Spike Curtis <spike@coder.com>
1 parent 4058f04 commit 63278ab

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

docs/admin/high-availability.md

+14-6
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,27 @@ endpoint. [GCP](https://cloud.google.com/sql/docs/postgres/high-availability), [
66
and other cloud vendors offer fully-managed HA Postgres services that pair
77
nicely with Coder.
88

9-
For Coder to operate correctly, every node must be within 10ms of each other
10-
and Postgres. We make a best-effort attempt to warn the user when inter-Coder
11-
latency is too high, but if requests start dropping, this is one metric to investigate.
9+
For Coder to operate correctly, Coderd instances should have low-latency connections
10+
to each other so that they can effectively relay traffic between users and workspaces no
11+
matter which Coderd instance users or workspaces connect to. We make a best-effort attempt
12+
to warn the user when inter-Coderd latency is too high, but if requests start dropping, this
13+
is one metric to investigate.
14+
15+
We also recommend that you deploy all Coderd instances such that they have low-latency
16+
connections to Postgres. Coderd often makes several database round-trips while processing
17+
a single API request, so prioritizing low-latency between Coderd and Postgres is more important
18+
than low-latency between users and Coderd.
19+
1220
Note that this latency requirement applies _only_ to Coder services. Coder will
13-
operate correctly even with few seconds of latency on
14-
workspace <-> Coder and user <-> Coder connections.
21+
operate correctly even with few seconds of latency on workspace <-> Coder and user <-> Coder
22+
connections.
1523

1624
## Setup
1725

1826
Coder automatically enters HA mode when multiple instances simultaneously connect
1927
to the same Postgres endpoint.
2028

21-
HA brings one configuration variable to set in each Coder
29+
HA brings one configuration variable to set in each Coderd
2230
node: `CODER_DERP_SERVER_RELAY_URL`. The HA nodes use these URLs to communicate
2331
with each other. Inter-node communication is only required while using the
2432
embedded relay (default). If you're using [custom relays](../networking/index.md#custom-relays), Coder ignores `CODER_DERP_SERVER_RELAY_URL` since Postgres is the sole rendezvous for the Coder nodes.

0 commit comments

Comments
 (0)