Skip to content

chore: add replica_host and nats_port to replicas table#26665

Open
spikecurtis wants to merge 1 commit into
mainfrom
spike/gru-69-db-replica-nats
Open

chore: add replica_host and nats_port to replicas table#26665
spikecurtis wants to merge 1 commit into
mainfrom
spike/gru-69-db-replica-nats

Conversation

@spikecurtis

@spikecurtis spikecurtis commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

relates to GRU-69

Adds cluster_host and nats_port to replicas table, to explicitly track NATS routes in the cluster.

I decided to make the NATS support explicit and transport the port number over the replicasync so that different Coder Servers can run on different ports. This is not something customers will typically care about, but is very useful for testing, so that they can all run on localhost within one machine.

I've also gone with a design where the NATS pubsub directly tells replicasync the port number after it opens the socket. This is also very useful for testing because it allows us to have the OS assign the port number at runtime, avoiding races where we fail to bind to a free port.

@linear-code

linear-code Bot commented Jun 24, 2026

Copy link
Copy Markdown

GRU-69

Copy link
Copy Markdown
Contributor Author

@spikecurtis spikecurtis force-pushed the spike/gru-69-db-replica-nats branch from 7de3198 to f609f9d Compare June 24, 2026 15:32
@spikecurtis spikecurtis marked this pull request as ready for review June 24, 2026 15:34
@spikecurtis spikecurtis requested a review from sreya June 24, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant