Skip to content

Document native support for replica-aware routing - #119544

Merged
alexey-milovidov merged 2 commits into
masterfrom
docs/replica-aware-routing-native-support
Sep 12, 2026
Merged

alexey-milovidov merged 2 commits into
masterfrom
docs/replica-aware-routing-native-support

Conversation

@amychen1776

@amychen1776 amychen1776 commented Sep 11, 2026 •

Copy link
Copy Markdown
Collaborator

Updates the replica-aware routing page now that the feature works over the native protocol and Enterprise customers can enable it themselves.

The page previously said replica-aware routing was "currently unavailable over the native protocol" and that native-protocol clients had to switch to HTTP, and it told customers to open a support ticket to get the feature turned on. Both are out of date.

Changes:

  • Native support. New section covering --tls-sni-override and the <routing-value>.sticky.<host> routing value, kept to what a reader needs in order to open a native connection. Removed the warning callout and the "requires the HTTP protocol" limitation; the real constraint is simply that native-protocol routing needs TLS.
  • Self-serve enablement. Enterprise customers turn replica-aware routing on from the toggles on the service settings page. The HTTP and native methods are enabled separately. Support is now the fallback for services the rollout hasn't reached.
  • Read-after-write consistency is shown over both interfaces, and promoted to a top-level section along with the replica check, since neither is HTTP-specific any more. Also notes that reusing a routing value helps when a schema change hasn't yet replicated.
  • Badges: private preview to beta, and dropped the contact-support wording from the Enterprise plan badge.

Source: Replica-aware Routing blog (internal; not linked from the page).

Two things worth a maintainer's eye:

  • The blog says the feature is in public beta, so I switched the badge to beta. Confirm that's the status you want published.
  • The July 13, 2026 cloud changelog entry still describes the older ?session_id= mechanism and calls the feature private preview. I left it alone as a dated historical record, but if session_id no longer routes, that entry is pointing customers at something that doesn't work.

Changelog category (leave one):

  • Documentation (changelog entry is not required)

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/119544]

Version info

  • Merged into: 26.9.1.1238 (included in 26.9 and later)

Replica-aware routing now works over the native protocol as well as HTTP,
so the page no longer says the feature is unavailable there.

- Add a native-protocol section covering `--tls-sni-override` and the
  `<routing-value>.sticky.<host>` SNI form, plus the custom certificate
  verification a client needs when it sets the SNI itself.
- Replace the "requires the HTTP protocol" limitation with the actual
  native-protocol constraint: the routing value travels in the TLS SNI,
  so the connection has to use TLS.
- Describe self-serve enablement through the toggles on the service
  settings page for Enterprise customers, instead of a support ticket.
  The HTTP and native methods are enabled separately.
- Show read-after-write consistency over both interfaces, and note that
  reusing a routing value also helps when a schema change hasn't yet
  replicated.
- Promote read-after-write consistency and the replica check to
  top-level sections, since they now apply to both interfaces.
- Swap the private preview badge for the beta badge, and drop the
  contact-support wording from the Enterprise plan badge.

Co-Authored-By: Claude Opus 5 <[email protected]>
@mintlify

mintlify Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
ClickHouse-docs 🟢 Ready View Preview Sep 11, 2026, 9:38 PM

@clickhouse-gh

clickhouse-gh Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [127f0da]

Summary: ✅


AI Review

Summary

This PR updates the Cloud Replica-aware routing page to document native-protocol routing via --tls-sni-override, self-serve enablement in the console, and read-after-write guidance for both HTTP and native clients. The current draft is closer after the follow-up commit, but it still overstates what native routing preserves and leaves one certificate-troubleshooting path undocumented, so it should not merge yet.

Findings

⚠️ Majors

  • [docs/products/cloud/features/infrastructure/replica-aware-routing.mdx:15-24] The page now says replica-aware routing is available over both interfaces, but the unchanged intro still presents temporary tables and named session state as native use cases. That contract is false for native connections: HTTP named sessions are HTTP-only (docs/concepts/features/interfaces/http.mdx:549-555), and native session state disappears with the TCP connection (src/Client/ClientBase.h:521-526; docs/reference/statements/create/table/temporary-table.mdx:19-22). Reusing the same routing value across separate native connections only improves replica locality; it does not keep session-scoped objects reachable. Scope temporary tables and named sessions to HTTP requests, or explicitly say that on native they remain tied to one live connection.
  • [docs/products/cloud/features/infrastructure/replica-aware-routing.mdx:155-157] The new certificate troubleshooting advice does not cover clients that enable hostname verification. clickhouse client passes --tls-sni-override to SecureStreamSocket::setPeerHostName (src/Client/Connection.cpp:227-231), and Poco uses that same peer host name for CN/SAN verification when openSSL.client.extendedVerification=true (base/poco/NetSSL_OpenSSL/include/Poco/Net/SecureStreamSocket.h:215-225; base/poco/NetSSL_OpenSSL/src/SecureSocketImpl.cpp:463-479). In that mode, keeping --host on the regular service hostname does not fix the mismatch, so the current troubleshooting step sends users in the wrong direction. Either note that the stock clickhouse client examples rely on the default openSSL.client.extendedVerification=false, or explicitly document that clickhouse client cannot currently combine --tls-sni-override with hostname verification.
Final Verdict

Status: ⚠️ Request changes

Minimum required actions:

  1. Split the HTTP-only session-state use cases from the native-routing guidance.
  2. Correct the native certificate troubleshooting note so it describes the hostname-verification limitation accurately.

@clickhouse-gh clickhouse-gh Bot added the pr-documentation Documentation PRs for the specific code PR label Sep 11, 2026
Readers need to know how to open a native connection, not how the proxy
uses the SNI internally.

- Remove the "Overriding the SNI in your own client" section, including
  the Go certificate-verification example.
- Trim the native-protocol introduction to the routing value's form and
  the flags that carry it.
- Refer to `--tls-sni-override` rather than "the SNI value" in the
  limitation and troubleshooting entries, so each one names the flag the
  reader actually sets.

Co-Authored-By: Claude Opus 5 <[email protected]>

<Warning>
**Requires the HTTP interface**
Replica-aware routing is available over both interfaces:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new “available over both interfaces” framing makes the unchanged intro read as if the temporary-table / named-session use cases also work over the native path. They do not: HTTP named sessions are HTTP-only (docs/concepts/features/interfaces/http.mdx:549-555), and native session state is tied to the TCP connection (src/Client/ClientBase.h:521-526; temporary tables disappear when the session ends in docs/reference/statements/create/table/temporary-table.mdx:19-22).

Reusing the same SNI override across separate native connections pins the replica, but it does not keep session-scoped objects reachable across queries. I think the native guidance needs to be scoped to cache locality / read-after-write, or it should explicitly say that session-scoped state still requires the same live connection.


**Certificate errors over the native protocol**

- Confirm `--host` is your regular service hostname, and that the routing value is passed through `--tls-sni-override` rather than `--host`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This troubleshooting step is incomplete for a supported client configuration. clickhouse client passes --tls-sni-override straight to SecureStreamSocket::setPeerHostName (src/Client/Connection.cpp:227-231), and Poco uses that same peer host name for CN/SAN verification when openSSL.client.extendedVerification=true (base/poco/NetSSL_OpenSSL/include/Poco/Net/SecureStreamSocket.h:215-225; base/poco/NetSSL_OpenSSL/src/SecureSocketImpl.cpp:463-479).

In that mode, keeping --host on the regular service hostname does not fix the certificate mismatch, so this bullet sends users in the wrong direction. Please either note that the stock clickhouse client examples rely on the default openSSL.client.extendedVerification=false, or explicitly document that clickhouse client cannot currently combine --tls-sni-override with hostname verification.

@alexey-milovidov alexey-milovidov self-assigned this Sep 12, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Sep 12, 2026
Merged via the queue into master with commit 23adc7e Sep 12, 2026
174 checks passed
@alexey-milovidov
alexey-milovidov deleted the docs/replica-aware-routing-native-support branch September 12, 2026 09:12
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 12, 2026

This branch was successfully deployed

1 active deployment
staging - docs — 127f0dad Deployed Sep 11, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-documentation Documentation (docs, examples, READMEs). pr-documentation Documentation PRs for the specific code PR pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants