Skip to content

Commit 94350e5

Browse files
authored
Merge pull request #2176 from Danielle9897/RDoc-2354-clientConfigView
RDoc-2354 Client configuration view
2 parents 752d954 + 10f40d5 commit 94350e5

24 files changed

+420
-318
lines changed
221 KB
Loading
22.8 KB
Loading
Binary file not shown.

docs/studio/database/settings/client-configuration-per-database.mdx

Lines changed: 71 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -11,64 +11,79 @@ import TabItem from '@theme/TabItem';
1111
import CodeBlock from '@theme/CodeBlock';
1212
import LanguageSwitcher from "@site/src/components/LanguageSwitcher";
1313
import LanguageContent from "@site/src/components/LanguageContent";
14+
import ContentFrame from '@site/src/components/ContentFrame';
15+
import Panel from '@site/src/components/Panel';
1416

15-
# Client Configuration (for database)
1617
<Admonition type="note" title="">
1718

18-
* You can override the [client-configuration](../../../studio/server/client-configuration.mdx) that is set server-wide __per database__:
19-
20-
* From the Studio - as described in this article
21-
* From the Client API - see [put client-configuration operation](../../../client-api/operations/server-wide/configuration/put-serverwide-client-configuration.mdx#put-client-configuration-(server-wide))
22-
23-
* Setting the client-configuration from the studio sets the configuration on the RavenDB server.
24-
This enables administrators to dynamically control the client behavior even after it has started running.
25-
e.g. manage load balancing of client requests on the fly in response to changing system demands.
26-
27-
</Admonition>
28-
## Set the client-configuration (for database)
29-
30-
![Figure 1. Client Configuration Per Database](./assets/client-configuration-database-1.png)
31-
32-
33-
**1. Identity parts separator**
34-
35-
* Changes the default **separator** for automatically generated document IDs.
36-
You can use any `char` except `|` (pipe).
37-
Default value: `/`
38-
39-
**2. Max number of requests per session**
40-
41-
* Set this number to restrict the number of requests (***Reads*** & ***Writes***) per session in the client API.
42-
Default value: 30
43-
44-
**3. Use Session Context for Load Balancing**
45-
46-
* Allow client sessions to select their topology by tag,
47-
so they'd be able to load-balance their requests.
48-
49-
* Optionally, select a hash seed to randomize the topology that clients would use.
50-
51-
* For a detailed explanation see: [Load Balance Behavior](../../../client-api/configuration/load-balance/load-balance-behavior.mdx).
52-
53-
**4. Read balance behavior**
54-
55-
* Set the load-balance method that the client will use when accessing a node with ***Read*** requests.
56-
The method selected will also affect the client's decision of which node to failover to in case of issues with the ***Read*** request.
57-
Note: ***Write*** requests will always access the [preferred node](../../../client-api/configuration/load-balance/overview.mdx#the-preferred-node) calculated by the client.
58-
59-
* Available options are:
60-
* _None_
61-
* _Round Robin_
62-
* _Fastest Node_
63-
64-
* For a detailed explanation see: [Read Balance Behavior](../../../client-api/configuration/load-balance/read-balance-behavior.mdx).
65-
66-
67-
68-
<Admonition type="info" title="Note" id="note" href="#note">
69-
70-
This view will be as in the above image when the general server [Client Configuration](../../../studio/server/client-configuration.mdx) is not yet defined.
71-
If a general server client-configuration is defined then this view will show the __effective configuration__ for the specific database.
72-
19+
* You can **override** the [server-wide client configuration](../../../studio/server/client-configuration.mdx) per database:
20+
You can do this using:
21+
* The Studio - as described in this article
22+
* The Client API - see [Put client configuration operation](../../../client-api/operations/maintenance/configuration/put-client-configuration.mdx)
23+
24+
* When set from the Studio, the client configuration is stored directly on the RavenDB server
25+
and applies to any client that connects to the specific database.
26+
27+
* These settings override the client's own configuration,
28+
which can be set in your application code when initializing the _DocumentStore_.
29+
This enables administrators to dynamically control client behavior, even after the client has started running.
30+
For example, adjusting load balancing behavior on the fly in response to changing system demands.
31+
32+
* In this article:
33+
* [Set the client configuration (for database)](../../../studio/database/settings/client-configuration-per-database.mdx#set-the-client-configuration-for-database)
34+
7335
</Admonition>
7436

37+
<Panel heading="Set the client configuration (for database)">
38+
39+
![Figure 1. Client Configuration Per Database](./assets/client-configuration-1.png)
40+
41+
1. Go to **Settings > Client Configuration**
42+
43+
2. Select whether to override the server-wide client configuration:
44+
Toggle **"Use server config"** to make this database use the settings defined [server-wide](../../../studio/server/client-configuration.mdx).
45+
Toggle **"Use database config"** to override the server-wide settings with a configuration specific to this database.
46+
47+
3. **Identity parts separator**
48+
Set the **separator character** used in automatically generated document IDs of type **identity** and **HiLo**.
49+
It applies only to [Identity IDs](../../../server/kb/document-identifier-generation.mdx#strategy-identity) generated by the server
50+
and [HiLo IDs](../../../server/kb/document-identifier-generation/#strategy-hilo-algorithm) generated by the client.
51+
You can use any single character except `|` (pipe).
52+
Default value: `/`
53+
54+
4. **Maximum number of requests per session**
55+
Set this number to restrict the number of requests (***Reads*** & ***Writes***) allowed per session when using the Client API.
56+
Default value: `30`
57+
58+
5. **Load balance behavior**
59+
Set the Load balance method for ***Read*** & ***Write*** requests.
60+
For a detailed explanation see: [Load balance behavior](../../../client-api/configuration/load-balance/load-balance-behavior.mdx).
61+
62+
Available options:
63+
* [None](../../../client-api/configuration/load-balance/load-balance-behavior.mdx#none-default-option): (default)
64+
Read requests - the node the client will target will be based on the "Read balance behavior" configuration.
65+
Write requests - will be sent to the [preferred node](../../../client-api/configuration/load-balance/overview.mdx#the-preferred-node).
66+
* [Use session context](../../../client-api/configuration/load-balance/load-balance-behavior.mdx#usesessioncontext):
67+
Select this option to allow client sessions to control load balancing using a "context string".
68+
With this option selected, the session determines the target node for all ***Read*** & ***Write*** requests by **hashing**:
69+
* the session's "context string" (set in the client session),
70+
* and an optional seed value (set here or in the client session).
71+
72+
All sessions that use the same "context string" and the same seed will route their requests to the same node.
73+
This gives you fine-grained control over how requests are distributed across the cluster based on how you assign "context strings" and "seeds".
74+
![Using session context](./assets/client-configuration-2.png)
75+
76+
6. **Read balance behavior**
77+
Set the "Read balance method" the client will use when accessing a node with ***Read*** requests.
78+
The selected method also affects how the client chooses a failover node for ***Read*** requests.
79+
For a detailed explanation see: [Read balance behavior](../../../client-api/configuration/load-balance/read-balance-behavior.mdx).
80+
81+
Available options:
82+
* [None](../../../client-api/configuration/load-balance/read-balance-behavior.mdx#none-default-option) (default)
83+
* [Round Robin](../../../client-api/configuration/load-balance/read-balance-behavior.mdx#roundrobin)
84+
* [Fastest Node](../../../client-api/configuration/load-balance/read-balance-behavior.mdx#fastestnode)
85+
86+
7. **Save**
87+
Click _Save_ to apply the changes.
88+
89+
</Panel>
154 KB
Loading
22.8 KB
Loading
-62.5 KB
Binary file not shown.

docs/studio/server/client-configuration.mdx

Lines changed: 69 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,59 +11,78 @@ import TabItem from '@theme/TabItem';
1111
import CodeBlock from '@theme/CodeBlock';
1212
import LanguageSwitcher from "@site/src/components/LanguageSwitcher";
1313
import LanguageContent from "@site/src/components/LanguageContent";
14+
import ContentFrame from '@site/src/components/ContentFrame';
15+
import Panel from '@site/src/components/Panel';
1416

15-
# Client Configuration (server-wide)
1617
<Admonition type="note" title="">
1718

18-
* Set the client-configuration for __all__ databases in the cluster:
19-
20-
* From the Studio - as described in this article
21-
22-
* From the Client API - see [put client-configuration operation](../../client-api/operations/server-wide/configuration/put-serverwide-client-configuration.mdx)
23-
24-
* These default values can be overwritten __per database__ in [client-configuration (for database)](../../studio/database/settings/client-configuration-per-database.mdx)
25-
26-
* Setting the client-configuration from the studio sets the configuration on the RavenDB server.
27-
This enables administrators to dynamically control the client behavior even after it has started running.
28-
e.g. manage load balancing of client requests on the fly in response to changing system demands.
19+
* The client configuration can be set for **ALL** databases in the cluster.
20+
You can do this using:
21+
* The Studio - as described in this article
22+
* The Client API - see [Put client configuration operation](../../client-api/operations/server-wide/configuration/put-serverwide-client-configuration.mdx)
23+
24+
* When set from the Studio, the client configuration is stored directly on the RavenDB server
25+
and applies to any client that connects to any database in the cluster.
26+
27+
* These settings override the client's own configuration,
28+
which can be set in your application code when initializing the _DocumentStore_.
29+
This enables administrators to dynamically control client behavior, even after the client has started running.
30+
For example, adjusting load balancing behavior on the fly in response to changing system demands.
31+
32+
* To override these global values and define a separate client configuration for a specific database,
33+
see: [Client configuration (for database)](../../studio/database/settings/client-configuration-per-database.mdx)
34+
35+
* In this article:
36+
* [Set the client configuration (server-wide)](../../studio/server/client-configuration.mdx#set-the-client-configuration-server-wide)
2937

3038
</Admonition>
31-
## Set the client-configuration (server-wide)
32-
33-
![Figure 1. Client Requests Configuration](./assets/client-configuration.png)
34-
35-
**1. Identity parts separator**
36-
37-
* Changes the default **separator** for automatically generated document IDs.
38-
You can use any `char` except `|` (pipe).
39-
Default value: `/`
40-
41-
**2. Max number of requests per session**
42-
43-
* Set this number to restrict the number of requests (***Reads*** & ***Writes***) per session in the client API.
44-
Default value: 30
45-
46-
**3. Use Session Context for Load Balancing**
47-
48-
* Allow client sessions to select their topology by tag,
49-
so they'd be able to load-balance their requests.
50-
51-
* Optionally, select a hash seed to fix the topology that clients would use.
52-
53-
* For a detailed explanation see: [Load Balance Behavior](../../client-api/configuration/load-balance/load-balance-behavior.mdx).
54-
55-
**4. Read balance behavior**
56-
57-
* Set the load-balance method that the client will use when accessing a node with ***Read*** requests.
58-
The method selected will also affect the client's decision of which node to failover to in case of issues with the ***Read*** request.
59-
Note: ***Write*** requests will always access the [preferred node](../../client-api/configuration/load-balance/overview.mdx#the-preferred-node) calculated by the client.
60-
61-
* Available options are:
62-
* _None_
63-
* _Round Robin_
64-
* _Fastest Node_
65-
66-
* For a detailed explanation about each option see: [Read Balance Behavior](../../client-api/configuration/load-balance/read-balance-behavior.mdx).
67-
68-
6939

40+
<Panel heading="Set the client configuration (server-wide)">
41+
42+
![Server-wide client configuration](./assets/client-configuration-1.png)
43+
44+
1. Go to **Manage Server > Client Configuration**
45+
46+
2. **Identity parts separator**
47+
Set the **separator character** used in automatically generated document IDs of type **identity** and **HiLo**.
48+
It applies only to [Identity IDs](../../server/kb/document-identifier-generation.mdx#strategy-identity) generated by the server
49+
and [HiLo IDs](../../server/kb/document-identifier-generation/#strategy-hilo-algorithm) generated by the client.
50+
You can use any single character except `|` (pipe).
51+
Default value: `/`
52+
53+
3. **Maximum number of requests per session**
54+
Set this number to restrict the number of requests (***Reads*** & ***Writes***) allowed per session when using the Client API.
55+
Default value: `30`
56+
57+
4. **Load balance behavior**
58+
Set the Load balance method for ***Read*** & ***Write*** requests.
59+
For a detailed explanation see: [Load balance behavior](../../client-api/configuration/load-balance/load-balance-behavior.mdx).
60+
61+
Available options:
62+
* [None](../../client-api/configuration/load-balance/load-balance-behavior.mdx#none-default-option): (default)
63+
Read requests - the node the client will target will be based on the "Read balance behavior" configuration.
64+
Write requests - will be sent to the [preferred node](../../client-api/configuration/load-balance/overview.mdx#the-preferred-node).
65+
* [Use session context](../../client-api/configuration/load-balance/load-balance-behavior.mdx#usesessioncontext):
66+
Select this option to allow client sessions to control load balancing using a "context string".
67+
With this option selected, the session determines the target node for all ***Read*** & ***Write*** requests by **hashing**:
68+
* the session's "context string" (set in the client session),
69+
* and an optional seed value (set here or in the client session).
70+
71+
All sessions that use the same "context string" and the same seed will route their requests to the same node.
72+
This gives you fine-grained control over how requests are distributed across the cluster based on how you assign "context strings" and "seeds".
73+
![Using session context](./assets/client-configuration-2.png)
74+
75+
5. **Read balance behavior**
76+
Set the "Read balance method" the client will use when accessing a node with ***Read*** requests.
77+
The selected method also affects how the client chooses a failover node for ***Read*** requests.
78+
For a detailed explanation see: [Read balance behavior](../../client-api/configuration/load-balance/read-balance-behavior.mdx).
79+
80+
Available options:
81+
* [None](../../client-api/configuration/load-balance/read-balance-behavior.mdx#none-default-option) (default)
82+
* [Round Robin](../../client-api/configuration/load-balance/read-balance-behavior.mdx#roundrobin)
83+
* [Fastest Node](../../client-api/configuration/load-balance/read-balance-behavior.mdx#fastestnode)
84+
85+
6. **Save**
86+
Click _Save_ to apply the changes.
87+
88+
</Panel>
221 KB
Loading
22.8 KB
Loading

0 commit comments

Comments
 (0)