Tips & Tricks

Check load balancing


In an ideal environment, all clients connecting to the database will request a load balanced connection; as well as having load balancing enabled on the database. This quick tip shows how to see the request distribution across a cluster.

As of 7.0, Vertica has had native load balancing. This feature is enabled very simply through the SET_LOAD_BALANCE_POLICY function. The client connection must also request a load balanced connection (see end of this post). However, it’s very common to see clients not request load balanced sessions which can adversely affect resource load across the cluster.

The following query will return the number of requests, as well as the percent of total requests per node:

This will return something like:

Although this result comes from a sandbox environment, it clearly illustrates how the requests should not be distributed. If request labels are being used, it’s also easy to identify their distribution just by adding request_label to the predicate.

Requesting a load balanced connection from a client:

About the author / 

Norbert Krupa

Norbert is the founder of and a Solutions Engineer at Talend. He is an HP Accredited Solutions Expert for Vertica Big Data Solutions. He has written the Vertica Diagnostic Queries which aim to cover monitoring, diagnostics and performance tuning. The views, opinions, and thoughts expressed here do not represent those of the user's employer.


  1. Adrian April 7, 2015 at 3:08 PM -  Reply

    Nice !

  2. shrawan December 5, 2016 at 10:34 AM -  Reply

    is there a way to set load balancing in vertica-hadoop connector

  3. ng January 26, 2017 at 12:05 PM -  Reply

    how to see current value of LOAD_BALANCE_POLICY in database?

    • Norbert Krupa January 26, 2017 at 12:44 PM -  Reply


  4. Wayne June 29, 2017 at 5:55 AM -  Reply

    Hi Norbert,i need your help to confirm a way of enabling Native Connection Load Balancing in VSQL.
    i used following command:
    vsql –enable-connection-load-balance -h -w  

    Is that all what I need to do when want to enable Native Connection Load Balancing in VSQL?

  5. Jim Knicely July 7, 2017 at 10:05 AM -  Reply

    Use the -C connection to load balance your vsql session:

    [dbadmin@localhost ~]$ vsql -U jim -w **** -Cc “select node_name from sessions where user_name = ‘jim’;”
    (1 row)

    [dbadmin@localhost ~]$ vsql -U jim -w **** -Cc “select node_name from sessions where user_name = ‘jim’;”
    (1 row)

    [dbadmin@localhost ~]$ vsql -U jim -w **** -Cc “select node_name from sessions where user_name = ‘jim’;”
    (1 row)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Upcoming Events

  • No upcoming events
AEC v1.0.4

Subscribe to Blog via Email

Enter your email address to subscribe and receive notifications of new posts by email.

Read more use cases here.


This site is not affiliated, endorsed or associated with HPE Vertica. This site makes no claims on ownership of trademark rights. The author contributions on this site are licensed under CC BY-SA 3.0 with attribution required.
%d bloggers like this: