<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Managing client connections</title>
    <link>/en/admin/managing-client-connections/</link>
    <description>Recent content in Managing client connections on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/admin/managing-client-connections/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Admin: Limiting the number and length of client connections</title>
      <link>/en/admin/managing-client-connections/limiting-number-and-length-of-client-connections/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-client-connections/limiting-number-and-length-of-client-connections/</guid>
      <description>
        
        
        &lt;p&gt;You can manage how many active sessions a user can open to the server, and the duration of those sessions. Doing so helps prevent overuse of available resources, and can improve overall throughput.&lt;/p&gt;
&lt;p&gt;You can define connection limits at two levels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Set the &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-user/&#34;&gt;MAXCONNECTIONS&lt;/a&gt; property on individual users. This property specifies how many sessions a user can open concurrently on individual nodes, or across the database cluster. For example, the following ALTER USER statement allows user Joe up to 10 concurrent sessions:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER USER Joe MAXCONNECTIONS 10 ON DATABASE;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Set the configuration parameter &lt;a href=&#34;../../../en/sql-reference/config-parameters/general-parameters/&#34;&gt;MaxClientSessions&lt;/a&gt; on the database or individual nodes. This parameter specifies the maximum number of client sessions that can run on nodes in the database cluster, by default set to 50. An extra five sessions are always reserved to dbadmin users. This enables them to log in when the total number of client sessions equals MaxClientSessions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Total client connections to a given node cannot exceed the limits set in MaxClientSessions.&lt;/p&gt;
&lt;p&gt;Changes to a client&#39;s MAXCONNECTIONS property have no effect on current sessions; these changes apply only to new sessions. For example, if you change user&#39;s connection mode from DATABASE to NODE, current node connections are unaffected. This change applies only to new sessions, which are reserved on the invoking node.&lt;/p&gt;
&lt;h2 id=&#34;managing-tcp-keepalive-settings&#34;&gt;Managing TCP keepalive settings&lt;/h2&gt;
&lt;p&gt;OpenText™ Analytics Database uses kernel TCP keepalive parameters to detect unresponsive clients and determine when the connection should be closed. The database also supports a set of equivalent KeepAlive parameters that can override TCP keepalive parameter settings. By default, all KeepAlive parameters are set to 0, which signifies to use TCP keepalive settings. To override TCP keepalive settings, set the equivalent parameters at the database level with &lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-db/#&#34;&gt;ALTER DATABASE&lt;/a&gt;, or for the current session with &lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-session/#&#34;&gt;ALTER SESSION&lt;/a&gt;.

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
TCP keepalive Parameter&lt;/th&gt; 

&lt;th &gt;
Database Parameter&lt;/th&gt; 

&lt;th &gt;
Description&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
tcp_keepalive_time&lt;/td&gt; 

&lt;td &gt;
KeepAliveIdleTime&lt;/td&gt; 

&lt;td &gt;
Length (in seconds) of the idle period before the first TCP keepalive probe is sent to ensure that the client is still connected.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
tcp_keepalive_probes&lt;/td&gt; 

&lt;td &gt;
KeepAliveProbeCount&lt;/td&gt; 

&lt;td &gt;
Number of consecutive keepalive probes that must go unacknowledged by the client before the client connection is considered lost and closed&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
tcp_keepalive_intvl&lt;/td&gt; 

&lt;td &gt;
KeepAliveProbeInterval&lt;/td&gt; 

&lt;td &gt;
Time interval (in seconds) between keepalive probes.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use the database KeepAlive parameters to override TCP keepalive parameters as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;After 600 seconds (ten minutes), the first keepalive probe is sent to the client.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Consecutive keepalive probes are sent every 30 seconds.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the client fails to respond to 10 keepalive probes, the connection is considered lost and is closed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To make this the default policy for client connections, use &lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-db/#&#34;&gt;ALTER DATABASE&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER DATABASE DEFAULT SET KeepAliveIdleTime = 600;
=&amp;gt; ALTER DATABASE DEFAULT SET KeepAliveProbeInterval = 30;
=&amp;gt; ALTER DATABASE DEFAULT SET KeepAliveProbeCount = 10;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To override database-level policies for the current session, use &lt;a href=&#34;../../../en/sql-reference/statements/alter-statements/alter-session/#&#34;&gt;ALTER SESSION&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; ALTER SESSION SET KeepAliveIdleTime = 400;
=&amp;gt; ALTER SESSION SET KeepAliveProbeInterval = 72;
=&amp;gt; ALTER SESSION SET KeepAliveProbeCount = 60;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Query system table CONFIGURATION_PARAMETERS to verify database and session settings of the three database KeepAlive parameters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT parameter_name, database_value, current_value FROM configuration_parameters WHERE parameter_name ILIKE &amp;#39;KeepAlive%&amp;#39;;
     parameter_name     | database_value | current_value
------------------------+----------------+---------------
 KeepAliveProbeCount    | 10             | 60
 KeepAliveIdleTime      | 600            | 400
 KeepAliveProbeInterval | 30             | 72
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;limiting-idle-session-length&#34;&gt;Limiting idle session length&lt;/h2&gt;
&lt;p&gt;If a client continues to respond to &lt;a href=&#34;#tcpkeepalive&#34;&gt;TCP keepalive probes&lt;/a&gt;, but is not running any queries, the client&#39;s session is considered idle. Idle sessions eventually time out. The maximum time that sessions are allowed to idle can be set at three levels, in descending order of precedence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;As dbadmin, set the &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-user/&#34;&gt;IDLESESSIONTIMEOUT&lt;/a&gt; property for individual users. This property overrides all other session timeout settings.&lt;/li&gt;
&lt;li&gt;Users can limit the idle time of the current session with &lt;a href=&#34;../../../en/sql-reference/statements/set-statements/set-session-idlesessiontimeout/#&#34;&gt;SET SESSION IDLESESSIONTIMEOUT&lt;/a&gt;. Non-superusers can only set their session idle time to a value equal to or lower than their own IDLESESSIONTIMEOUT setting. If no session idle time is explicitly set for a user, the session idle time for that user is inherited from the node or database settings.&lt;/li&gt;
&lt;li&gt;As dbadmin, set configuration parameter &lt;a href=&#34;../../../en/sql-reference/config-parameters/security-parameters/&#34;&gt;DEFAULTIDLESESSIONTIMEOUT&lt;/a&gt;. on the database or on individual nodes. This You can limit the default database cluster or individual nodes, with configuration parameter &lt;a href=&#34;../../../en/sql-reference/config-parameters/security-parameters/&#34;&gt;DEFAULTIDLESESSIONTIMEOUT&lt;/a&gt;. This parameter sets the default timeout value for all non-superusers.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All settings apply to sessions that are continuously idle—that is, sessions where no queries are running. If a client is slow or unresponsive during query execution, that time does not apply to timeouts. For example, the time that is required for a streaming batch insert is not counted towards timeout. The server identifies a session as idle starting from the moment it starts to wait for any type of message from that session.&lt;/p&gt;
&lt;h2 id=&#34;viewing-session-settings&#34;&gt;Viewing session settings&lt;/h2&gt;
&lt;p&gt;The following sections demonstrate how you can query the database for details about the session and connection limits.&lt;/p&gt;
&lt;h3 id=&#34;session-length-limits&#34;&gt;Session length limits&lt;/h3&gt;
&lt;p&gt;Use &lt;a href=&#34;../../../en/sql-reference/statements/show-db/#&#34;&gt;SHOW DATABASE&lt;/a&gt; to view the session length limit for the database:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW DATABASE DEFAULT DEFAULTIDLESESSIONTIMEOUT;
           name            | setting
---------------------------+---------
 DefaultIdleSessionTimeout | 2 day
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Use &lt;a href=&#34;../../../en/sql-reference/statements/show/#&#34;&gt;SHOW&lt;/a&gt; to view the length limit for the current session:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW IDLESESSIONTIMEOUT;
        name        | setting
--------------------+---------
 idlesessiontimeout | 1
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;connection-limits&#34;&gt;Connection limits&lt;/h3&gt;
&lt;p&gt;Use &lt;a href=&#34;../../../en/sql-reference/statements/show-db/#&#34;&gt;SHOW DATABASE&lt;/a&gt; to view the connection limits for the database:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SHOW DATABASE DEFAULT MaxClientSessions;
       name        | setting
-------------------+---------
 MaxClientSessions | 50
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Query &lt;a href=&#34;../../../en/sql-reference/system-tables/v-catalog-schema/users/#&#34;&gt;USERS&lt;/a&gt; to view the connection limits for users:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT user_name, max_connections, connection_limit_mode FROM users
     WHERE user_name != &amp;#39;dbadmin&amp;#39;;
 user_name | max_connections | connection_limit_mode
-----------+-----------------+-----------------------
 SuzyX     | 3               | database
 Joe       | 10              | database
(2 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;closing-user-sessions&#34;&gt;Closing user sessions&lt;/h2&gt;
&lt;p&gt;To manually close a user session, use &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/session-functions/close-user-sessions/#&#34;&gt;CLOSE_USER_SESSIONS&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CLOSE_USER_SESSIONS (&amp;#39;Joe&amp;#39;);
                             close_user_sessions
------------------------------------------------------------------------------
 Close all sessions for user Joe sent. Check v_monitor.sessions for progress.
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;example&#34;&gt;Example&lt;/h3&gt;
&lt;p&gt;A user executes a query, and for some reason the query takes an unusually long time to finish (for example, because of server traffic or query complexity). In this case, the user might think the query failed, and opens another session to run the same query. Now, two sessions run the same query, using an extra connection.&lt;/p&gt;
&lt;p&gt;To prevent this situation, you can limit how many sessions individual users can run, by modifying their MAXCONNECTIONS user property. This can help minimize the chances of running redundant queries. It also helps prevent users from consuming all available connections, as set by the database For example, the following setting on user &lt;code&gt;SuzyQ&lt;/code&gt; limits her to two database sessions at any time:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE USER SuzyQ MAXCONNECTIONS 2 ON DATABASE;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Limiting Another issue setting client connections prevents is when a user connects to the server many times. Too many user connections exhausts the number of allowable connections set by database configuration parameter &lt;a href=&#34;../../../en/sql-reference/config-parameters/general-parameters/&#34;&gt;MaxClientSessions&lt;/a&gt;.

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

No user can have a MAXCONNECTIONS limit greater than the MaxClientSessions setting.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;cluster-changes-and-connections&#34;&gt;Cluster changes and connections&lt;/h2&gt;
&lt;p&gt;Behavior changes can occur with client connection limits when the following changes occur to a cluster:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You add or remove a node.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A node goes down or comes back up.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Changes in node availability between connection requests have little impact on connection limits.&lt;/p&gt;
&lt;p&gt;In terms of honoring connection limits, no significant impact exists when nodes go down or come up in between connection requests. No special actions are needed to handle this. However, if a node goes down, its active session exits and other nodes in the cluster also drop their sessions. This frees up connections. The query may hang in which case the blocked sessions are reasonable and as expected.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Admin: Drain client connections</title>
      <link>/en/admin/managing-client-connections/drain-client-connections/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-client-connections/drain-client-connections/</guid>
      <description>
        
        
        &lt;p&gt;Eon Mode only&lt;/p&gt;

&lt;p&gt;Draining client connections in a subclusters prepares the subcluster for shutdown by marking all nodes in the subcluster as draining. Work from existing user sessions continues on draining nodes, but the nodes refuse new client connections and are excluded from load-balancing operations. If clients attempt to connect to a draining node, they receive an error that informs them of the draining status. Load balancing operations exclude draining nodes, so clients that opt-in to connection load balancing should receive a connection error only if all nodes in the load balancing policy are draining. You do not need to change any connection load balancing configurations to use this feature. dbadmin can still connect to draining nodes.&lt;/p&gt;
&lt;p&gt;To drain client connections before shutting down a subcluster, you can use the &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/eon-functions/shutdown-with-drain/#&#34;&gt;SHUTDOWN_WITH_DRAIN&lt;/a&gt; function. This function performs a &lt;a href=&#34;../../../en/eon/managing-subclusters/starting-and-stopping-subclusters/#Graceful_Shutdown&#34;&gt;Graceful Shutdown&lt;/a&gt; that marks a subcluster as draining until either the existing connections complete their work and close or a user-specified timeout is reached. When one of these conditions is met, the function proceeds to shutdown the subcluster. OpenText™ Analytics Database provides several meta-functions that allow you to independently perform each step of the SHUTDOWN_WITH_DRAIN process. You can use the &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/eon-functions/start-drain-subcluster/#&#34;&gt;START_DRAIN_SUBCLUSTER&lt;/a&gt; function to mark a subcluster as draining and then the &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/eon-functions/shutdown-subcluster/#&#34;&gt;SHUTDOWN_SUBCLUSTER&lt;/a&gt; function to shut down a subcluster once its connections have closed.&lt;/p&gt;
&lt;p&gt;You can use the &lt;a href=&#34;../../../en/sql-reference/functions/management-functions/eon-functions/cancel-drain-subcluster/#&#34;&gt;CANCEL_DRAIN_SUBCLUSTER&lt;/a&gt; function to mark all nodes in a subcluster as not draining. As soon as a node is both UP and not draining, the node accepts new client connections. If all nodes in a draining subcluster are down, the draining status of its nodes is automatically reset to not draining.&lt;/p&gt;
&lt;p&gt;You can query the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/draining-status/#&#34;&gt;DRAINING_STATUS&lt;/a&gt; system table to monitor the draining status of each node as well as client connection information, such as the number of active user sessions on each node.&lt;/p&gt;
&lt;p&gt;The following example drains a subcluster named analytics, then cancels the draining of the subcluster.&lt;/p&gt;
&lt;p&gt;To mark the analytics subcluster as draining, call SHUTDOWN_WITH_DRAIN with a negative timeout value:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT SHUTDOWN_WITH_DRAIN(&amp;#39;analytics&amp;#39;, -1);
NOTICE 0:  Draining has started on subcluster (analytics)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can confirm that the subcluster is draining by querying the DRAINING_STATUS system table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT node_name, subcluster_name, is_draining FROM draining_status ORDER BY 1;
node_name          | subcluster_name    | is_draining
-------------------+--------------------+--------------
verticadb_node0001 | default_subcluster | f
verticadb_node0002 | default_subcluster | f
verticadb_node0003 | default_subcluster | f
verticadb_node0004 | analytics          | t
verticadb_node0005 | analytics          | t
verticadb_node0006 | analytics          | t
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If a client attempts to connect directly to a node in the draining subcluster, they receive the following error message:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ /opt/vertica/bin/vsql -h &lt;span class=&#34;code-variable&#34;&gt;noeIP&lt;/span&gt; --password &lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt; verticadb analyst
vsql: FATAL 10611:  New session rejected because subcluster to which this node belongs is draining connections
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To cancel the graceful shutdown of the &lt;code&gt;analytics&lt;/code&gt; subcluster, you can type Ctrl+C:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT SHUTDOWN_WITH_DRAIN(&amp;#39;analytics&amp;#39;, -1);
NOTICE 0:  Draining has started on subcluster (analytics)
^CCancel request sent
ERROR 0:  Cancel received after draining started and before shutdown issued. Nodes will not be shut down. The subclusters are still in the draining state.
HINT:  Run cancel_drain_subcluster(&amp;#39;&amp;#39;) to restore all nodes to the &amp;#39;not_draining&amp;#39; state
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As mentioned in the above hint, you can run CANCEL_DRAIN_SUBCLUSTER to reset the status of the draining nodes in the subcluster to not draining:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT CANCEL_DRAIN_SUBCLUSTER(&amp;#39;analytics&amp;#39;);
              CANCEL_DRAIN_SUBCLUSTER
--------------------------------------------------------
Targeted subcluster: &amp;#39;analytics&amp;#39;
Action: CANCEL DRAIN

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To confirm that the subcluster is no longer draining, you can again query the &lt;a href=&#34;../../../en/sql-reference/system-tables/v-monitor-schema/draining-status/#&#34;&gt;DRAINING_STATUS&lt;/a&gt; system table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT node_name, subcluster_name, is_draining FROM draining_status ORDER BY 1;
node_name          | subcluster_name    | is_draining
-------------------+--------------------+-------
verticadb_node0001 | default_subcluster | f
verticadb_node0002 | default_subcluster | f
verticadb_node0003 | default_subcluster | f
verticadb_node0004 | analytics          | f
verticadb_node0005 | analytics          | f
verticadb_node0006 | analytics          | f
(6 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Admin: Connection load balancing</title>
      <link>/en/admin/managing-client-connections/connection-load-balancing/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/admin/managing-client-connections/connection-load-balancing/</guid>
      <description>
        
        
        &lt;p&gt;Each client connection to a host in the OpenText™ Analytics Database cluster requires a small overhead in memory and processor time. If many clients connect to a single host, this overhead can begin to affect the performance of the database. You can spread the overhead of client connections by dictating that certain clients connect to specific hosts in the cluster. However, this manual balancing becomes difficult as new clients and hosts are added to your environment.&lt;/p&gt;
&lt;p&gt;Connection load balancing helps automatically spread the overhead of client connections across the cluster by having hosts redirect client connections to other hosts. By redirecting connections, the overhead from client connections is spread across the cluster without having to manually assign particular hosts to individual clients. Clients can connect to a small handful of hosts, and they are naturally redirected to other hosts in the cluster. Load balancing does not redirect connections to draining hosts. For more information see, &lt;a href=&#34;../../../en/admin/managing-client-connections/drain-client-connections/#&#34;&gt;Drain client connections&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;native-connection-load-balancing&#34;&gt;Native connection load balancing&lt;/h2&gt;
&lt;p&gt;Native connection load balancing is a feature built into the database server and client libraries as well as &lt;a class=&#34;glosslink&#34; href=&#34;../../../en/glossary/vsql/&#34; title=&#34;For more information, see Installing the vsql Client and the more general topic, Using vsql.&#34;&gt;vsql&lt;/a&gt;. Both the server and the client need to enable load balancing for it to function. If connection load balancing is enabled, a host in the database cluster can redirect a client&#39;s attempt to connect to it to another currently-active host in the cluster. This redirection is based on a load balancing policy. This redirection only takes place once, so a client is not bounced from one host to another.&lt;/p&gt;
&lt;p&gt;Because native connection load balancing is incorporated into the database client libraries, any client application that connects to the database transparently takes advantage of it simply by setting a connection parameter.&lt;/p&gt;
&lt;p&gt;How you choose to implement connection load balancing depends on your network environment. Since native load connection balancing is easier to implement, you should use it unless your network configuration requires that clients be separated from the hosts in the database by a firewall.&lt;/p&gt;
&lt;p&gt;For more about native connection load balancing, see &lt;a href=&#34;../../../en/admin/managing-client-connections/connection-load-balancing/about-native-connection-load-balancing/&#34;&gt;About Native Connection Load Balancing.&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;workload-routing&#34;&gt;Workload routing&lt;/h2&gt;
&lt;p&gt;Workload routing lets you &lt;a href=&#34;../../../en/sql-reference/statements/create-statements/create-routing-rule/&#34;&gt;create rules&lt;/a&gt; for routing client connections to particular subclusters based on their workloads.&lt;/p&gt;
&lt;p&gt;The primary advantages of this type of load balancing is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Database administrators can associate certain subclusters with certain workloads (as opposed to client IP addresses).&lt;/li&gt;
&lt;li&gt;Clients do not need to know anything about the subcluster they will be routed to, only the type of workload they have.&lt;/li&gt;
&lt;li&gt;Database administrators can change workload routing policies at any time, and these changes are transparent to all clients.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, see &lt;a href=&#34;../../../en/admin/managing-client-connections/connection-load-balancing/workload-routing/#&#34;&gt;Workload routing&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
