Tips & Tricks

Check load balancing

4

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 vertica.tips 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.

4 Comments

  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

      SELECT LOAD_BALANCE_POLICY FROM V_CATALOG.DATABASES;

Leave a Reply

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.

Notice

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: