diff --git a/docs/api/components/schemas.yaml b/docs/api/components/schemas.yaml index 0f509ffb4e..b54ce8f619 100644 --- a/docs/api/components/schemas.yaml +++ b/docs/api/components/schemas.yaml @@ -2042,7 +2042,39 @@ Startup-config: type: string default: 10s server: - description: Couchbase Server connection string/URL. + description: | + Couchbase Server connection string/URL for bootstrap configuration. + The connection string should only reference Couchbase Server Data (KV) nodes. + Using other node types (Query, Index, Analytics, or Search nodes) is not supported. + **Connection String Format** + Sync Gateway supports the ability to resolve DNS SRV records for alternate hostnames, or specifying multiple hostnames explicitly. See the [Couchbase Go SDK documentation on DNS SRV records](https://docs.couchbase.com/go-sdk/current/howtos/managing-connections.html#using-dns-srv-records) for more details. + Sync Gateway supports both the couchbases:// for TLS and couchbase:// schemes for insecure connection. + The supported schemes match that of the Couchbase Server SDKs. + **Examples of valid server values:** + - `couchbases://nodeA.example.com` + - `couchbase://nodeA.example.com` + - `couchbases://nodeA.example.com,nodeB.example.com` + - `couchbase://nodeA.example.com,nodeB.example.com` + - `couchbases://nodeA.example.com:1234,nodeB.example.com:1234` + - `couchbase://nodeA.example.com:1234,nodeB.example.com:1234` + - `couchbases://127.0.0.1` + - `couchbase://127.0.0.1` + On startup, Sync Gateway will try all hostnames until it is able + to connect successfully. + **Port Information** + When using the couchbase:// or couchbases:// schemes, the port is not required as Sync Gateway will use the default Couchbase Server client-to-node ports (11210 for couchbase:// and 11207 for couchbases://). See the [Couchbase Server ports documentation](https://docs.couchbase.com/server/current/install/install-ports.html#ports-listed-by-communication-path) for more details. + **Alternate Addresses** + If your Couchbase Server cluster is running in a containerized, port mapped, or otherwise NATd environment like Docker or Kubernetes, Sync Gateway might need more information to connect to the cluster. In many cases the client is able to automatically select the correct set of addresses. + If the detection heuristic fails in your environment, it is possible to override this behavior by adding a network parameter to the connection string. + The network parameter can be: + - `external`: Force the use alternate addresses of Couchbase Server. Used when Sync Gateway should not share network used by Couchbase Server internally. + - `default`: Do not allow use of alternate addresses of Couchbase Server. Used when Sync Gateway and Couchbase Server are on the same network. + Example: `"server": "couchbases://my-cbs-server?network=default"` + Will force the connection to ignore any alternative external addresses configured + on the Couchbase Server node. + **Lost Connections** + If the connection to Couchbase Server is lost during normal operations, Sync Gateway + will automatically re-connect to another node in the cluster. type: string username: description: Username for authenticating to server.