Options

If we have several nodes in cluster, can I specify all ip addresses in the connection string in JDBC

We have several nodes in a cluster with each node having a private IP address. What is the best way to connect to the cluster from JDBC? Do I need to specify only one IP address in the connection string? Can I specify all ip addresses so if one node is not available, I can still connect? If all my nodes are behind a private network, do I need one public IP for the whole cluster or do I need one public IP per node?

Comments

  • Options
    Navin_CNavin_C Vertica Customer
    Hello May,

    I believe there exist a public network and a private network.
    So a 3 node cluster will have 3 public IP's and 3 private IP's.
    Its not recommended to use private IP for client interactions, so we always use a public IP addresses whenever specifying the jdbc url.
    Coming to your question, we can define a single IP address in a JDBC url and not more than that

    If you want your jdbc connection to connect to a any nodes in cluster then you need to ahve a load balancer, so that your request can be submitted by load balancer to appropriate node depending on the loads

    You need to create a virtual hostname or IP address which will be given by Load balancer and then this IP address can be used in the jdbc connection. This will make sure that if any node goes down, your request/query will be diverted to another node ' on the fly '

    Hope this helps
  • Options
    This really helps, thank you! Do you know if there any documentation on how to load balance the cluster?
  • Options
    Navin_CNavin_C Vertica Customer
    Hello,


    I found this documentation

    Vertica - Load Balancing.

    Hope this helps.


  • Options
    Hi all,

    Thanks Navin for answering this!

    I just wanted to call something out in the document that Navin linked to:  As of Vertica 7, Vertica's client drivers support load-balancing natively within the driver.  This feature must be enabled in both the client and the server in order to work (see the documentation); once it has been enabled, you can connect to any node in the cluster and Vertica will redirect your connection to an appropriate node automatically using that node's public IP address.  For this to work, you must of course grant access to more than one node's public IP.

    Adam
  • Options
    Thanks to all for the information. That's really helpful! How can I marked it as "answered"?
  • Options
    Navin_CNavin_C Vertica Customer
    Hi Adam,

    I was curious to know, if Vertica 7 has come up with native connection handling for ADO.net driver.
    I could not find it for ADO.net driver in the documentation.


Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file