We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Load balancing on linux from python clients — Vertica Forum

Load balancing on linux from python clients

Hello!

Documentation says I have to setup both server and client properly in order to use load balancing. So I executed SELECT SET_LOAD_BALANCE_POLICY('ROUNDROBIN'); and now when i open vsql with:
vsql -C -U dbadmin test
I see message
INFO: Connected using a load-balanced connection.
And everything is ok.

But I cant find anything about connecting from clients on linux except for java's JDBC.
How can I make load balancing working from python? I have 2 libraries: pyodbc and vertica_python (pure socket base bridge from uber).
1) How can I force pyodbc to use load balancing?
2) I belive vertica_python designed much alike vsql. So I am wandering if there is loadbalance protocol specification publically available. I belive it has to be simple enaugh so any client could achieve advatage of using it. Is there loadbalance protocol specification available? Where can I find it?

Comments

  • For pyodbc turned out its enaugh to add 'ConnectionLoadBalance=1' to ODBC connection string like this:
    python -c "import pyodbc; cur = pyodbc.connect('Driver=Vertica;Servername=host;Port=5433;Database=DWH;UserName=dbadmin;password=;ConnectionLoadBalance=1'); cur.close();"

    And no luck for vertica_python. Cannot find anythong about loadbalance protocol specification or vsql protocol. Hope someone reveals it eventualy/

Leave a Comment

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