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
and other cloud vendors offer fully-managed HA Postgres services that pair
7
7
nicely with Coder.
8
8
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
+
12
20
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.
15
23
16
24
## Setup
17
25
18
26
Coder automatically enters HA mode when multiple instances simultaneously connect
19
27
to the same Postgres endpoint.
20
28
21
-
HA brings one configuration variable to set in each Coder
29
+
HA brings one configuration variable to set in each Coderd
22
30
node: `CODER_DERP_SERVER_RELAY_URL`. The HA nodes use these URLs to communicate
23
31
with each other. Inter-node communication is only required while using the
24
32
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