Skip to main content

Client Configuration (for database)

  • You can override the server-wide client configuration per database:
    You can do this using:

  • When set from the Studio, the client configuration is stored directly on the RavenDB server
    and applies to any client that connects to the specific database.

  • These settings override the client's own configuration,
    which can be set in your application code when initializing the DocumentStore.
    This enables administrators to dynamically control client behavior, even after the client has started running.
    For example, adjusting load balancing behavior on the fly in response to changing system demands.

  • In this article:

Set the client configuration (for database)

Figure 1. Client Configuration Per Database

  1. Go to Settings > Client Configuration

  2. Select whether to override the server-wide client configuration:
    Toggle "Use server config" to make this database use the settings defined server-wide.
    Toggle "Use database config" to override the server-wide settings with a configuration specific to this database.

  3. Identity parts separator
    Set the separator character used in automatically generated document IDs of type identity and HiLo.
    It applies only to Identity IDs generated by the server and HiLo IDs generated by the client.
    You can use any single character except | (pipe).
    Default value: /

  4. Maximum number of requests per session
    Set this number to restrict the number of requests (Reads & Writes) allowed per session when using the Client API.
    Default value: 30

  5. Load balance behavior
    Set the Load balance method for Read & Write requests.
    For a detailed explanation see: Load balance behavior.

    Available options:

    • None: (default)
      Read requests - the node the client will target will be based on the "Read balance behavior" configuration.
      Write requests - will be sent to the preferred node.

    • Use session context:
      Select this option to allow client sessions to control load balancing using a "context string".
      With this option selected, the session determines the target node for all Read & Write requests by hashing:

      • the session's "context string" (set in the client session),
      • and an optional seed value (set here or in the client session).

      All sessions that use the same "context string" and the same seed will route their requests to the same node.
      This gives you fine-grained control over how requests are distributed across the cluster based on how you assign "context strings" and "seeds". Using session context

  6. Read balance behavior
    Set the "Read balance method" the client will use when accessing a node with Read requests.
    The selected method also affects how the client chooses a failover node for Read requests.
    For a detailed explanation see: Read balance behavior.

    Available options:

  7. Save
    Click Save to apply the changes.