Skip to content

Commit f19e659

Browse files
committed
docs: clarify +discover uses single DNS endpoint only
Document that kurrentdb+discover:// only uses the first host and silently ignores the rest. Recommend kurrentdb:// with multiple gossip seeds for redundancy when individual node addresses are known. Ref: #414
1 parent 2fd4114 commit f19e659

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

docs/api/getting-started.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,39 @@ mode, you must explicitly set `tls=false` in your connection string or client co
3535

3636
KurrentDB uses connection strings to configure the client connection. The connection string supports two protocols:
3737

38-
- **`kurrentdb://`** - for connecting directly to specific node endpoints (single node or multi-node cluster with explicit endpoints)
39-
- **`kurrentdb+discover://`** - for connecting using cluster discovery via DNS or gossip endpoints
38+
- **`kurrentdb://`** - for connecting to a single node, or to a multi-node cluster using multiple gossip seed endpoints
39+
- **`kurrentdb+discover://`** - for connecting using DNS discovery with a single DNS endpoint
4040

41-
When using `kurrentdb://`, you specify the exact endpoints to connect to. The client will connect directly to these endpoints. For multi-node clusters, you can specify multiple endpoints separated by commas, and the client will query each node's Gossip API to get cluster information, then picks a node based on the URI's node preference.
41+
When using `kurrentdb://` with multiple endpoints separated by commas, the client will query each node's Gossip API to get cluster information, then picks a node based on the URI's node preference. If one of the nodes is down, the client will try the next endpoint. This is the recommended approach when you know the addresses of individual cluster nodes and need reliability when any node may be unavailable.
4242

43-
With `kurrentdb+discover://`, the client uses cluster discovery to find available nodes. This is particularly useful when you have a DNS A record pointing to cluster nodes or when you want the client to automatically discover the cluster topology.
43+
With `kurrentdb+discover://`, the client resolves a single DNS endpoint to discover the cluster topology. This is useful when you have a DNS `A` record pointing to your cluster nodes.
44+
45+
::: warning Only one host with +discover
46+
When using `kurrentdb+discover://`, only a single host should be provided. If multiple hosts are specified, only the first one will be used for discovery and the rest will be ignored. If you need to specify multiple endpoints for redundancy, use `kurrentdb://` without `+discover` instead.
47+
:::
4448

4549
::: info Gossip support
4650
Since version 22.10, kurrentdb supports gossip on single-node deployments, so
4751
`kurrentdb+discover://` can be used for any topology, including single-node setups.
4852
:::
4953

50-
For cluster connections using discovery, use the following format:
54+
For multi-node clusters where you know the individual node addresses, use multiple gossip seed endpoints:
5155

5256
```
53-
kurrentdb+discover://admin:changeit@cluster.dns.name:2113
57+
kurrentdb://admin:changeit@node1.dns.name:2113,node2.dns.name:2113,node3.dns.name:2113
5458
```
5559

56-
Where `cluster.dns.name` is a DNS `A` record that points to all cluster nodes.
60+
The client will try each endpoint in turn and use the Gossip API to discover the cluster topology and select the best node based on the configured node preference.
5761

58-
For direct connections to specific endpoints, you can specify individual nodes:
62+
For cluster connections using DNS discovery, use a single DNS endpoint:
5963

6064
```
61-
kurrentdb://admin:changeit@node1.dns.name:2113,node2.dns.name:2113,node3.dns.name:2113
65+
kurrentdb+discover://admin:changeit@cluster.dns.name:2113
6266
```
6367

64-
Or for a single node:
68+
Where `cluster.dns.name` is a DNS `A` record that points to all cluster nodes.
69+
70+
For a single node:
6571

6672
```
6773
kurrentdb://admin:changeit@localhost:2113

0 commit comments

Comments
 (0)