Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions content/develop/clients/dotnet/connect.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,26 @@ conn.StringSet("foo", "bar");
Console.WriteLine(conn.StringGet("foo"));
```

### SNI hostname selection for cluster connections

> [!NOTE]
> The SNI precedence scheme described in this section
> requires `StackExchange.Redis` v3.3.1 or later.

When you connect with TLS to a cluster that `StackExchange.Redis` discovers through
`CLUSTER SLOTS`, each discovered node needs its own
[SNI hostname](https://en.wikipedia.org/wiki/Server_Name_Indication). This allows a shared load
balancer or proxy to route the TLS handshake to the right backend. `StackExchange.Redis`
resolves the SNI hostname for a connection in this order:

1. An explicitly configured `ConfigurationOptions.SslHost` always wins.
2. Otherwise, a `DnsEndPoint` uses its own host.
3. Otherwise, the client falls back to the default SNI provider.
4. If none of these is available, the client uses the endpoint address.

Because of this order, `ConfigurationOptions.SslHost` only reports a value if you set one
explicitly; it doesn't report a host that the client inferred for you.

## Connect using Smart client handoffs (SCH)

*Smart client handoffs (SCH)* is a feature of Redis Cloud and
Expand Down
Loading