Skip to content

Commit

Permalink
Add a note about multi-node environment and sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
slvrtrn authored Jan 7, 2025
1 parent c0e9a9d commit 7f035c5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/client-common/src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1596,8 +1596,11 @@ interface ClickHouseHTTPSettings {
/** By default, the session is terminated after 60 seconds of inactivity
* This is regulated by the `default_session_timeout` server setting. */
session_timeout: UInt64
/** To check the session status, you can use this setting.
* If a session is expired or cannot be found, server returns `SESSION_NOT_FOUND` with error code 372. */
/** You can use this setting to check the session status before executing the query.
* If a session is expired or cannot be found, the server returns `SESSION_NOT_FOUND` with error code 372.

Check failure on line 1600 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (18)

Delete `·`

Check failure on line 1600 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (20)

Delete `·`

Check failure on line 1600 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (22)

Delete `·`
* NB: the session mechanism is only reliable when you connect directly to a particular ClickHouse server node.

Check failure on line 1601 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (18)

Delete `·`

Check failure on line 1601 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (20)

Delete `·`

Check failure on line 1601 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (22)

Delete `·`
* Due to each particular session not being shared across the cluster, sessions won't work well in a multi-node environment with a load balancer,

Check failure on line 1602 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (18)

Delete `·`

Check failure on line 1602 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (20)

Delete `·`

Check failure on line 1602 in packages/client-common/src/settings.ts

View workflow job for this annotation

GitHub Actions / node-unit-tests (22)

Delete `·`
* as there will be no guarantee that each consequent request will be received on the same node. */
session_check: Bool
}

Expand Down

0 comments on commit 7f035c5

Please sign in to comment.