-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for load balance connection options in Vertica 7.0? #27
Comments
I think it could be supported because the logic is straightforward. The problem is that the protocol is not documented anywhere; so I wouldn't know what actually goes over the wire. If you can somehow dump the TCP traffic between the JDBC client and the server when going through this, that would be a great start |
I took some verbose dumps with tcpdump, hopefully this is helpful. I'd definitely be willing to help in any way I can, so let me know if theres anything more I can do. Node-Vertica.connect();
JDBC Connect w/o the load-balanced option
JDBC Connect w/ the load-balanced option set to true
|
Unfortunately this dump does not contain the contents of the packets :( |
Sorry about that! I ran some new tcpdump tests and hopefully these contain the full contents, but I'm not sure if I did this right this time around either. I included the command I used so if theres something simple I can tweak to get the right info here, I'd be glad to run them again. Let me know, thanks: |
I've been staring at the TCP dump for a while, but I don't find anything different between the node dump and the ODBC dump that could indicate how it works. Unfortunately, the ODBC example doesn't actually connect to a different host during the process. The ODBC driver does a lot of extra initialization after the connection has been established, but that would be too late. The only thing that could make a difference is the connection options that the ODBC driver sends. Vertica could do something based on the version number that it receives from the client. The node driver doesn't specify any client name, version or OS. |
Have you tried to de-compile the JDBC driver? The last time I had to figure out how something was done, I used this decompiler http://jd.benow.ca/ on the client jar file and just read what the java client did. The decompiled code is very readable, it should be easier than trying to reverse the protocol based on the tcp dumps. |
I don't have a Vertica 7 cluster available to me, so it's unlikely I will put in more effort to make this work any time soon. Feel free to post any additional information here. |
In Vertica 7.0 theres support for in-database load balancing of queries (https://my.vertica.com/docs/7.0.x/HTML/Content/Authoring/AdministratorsGuide/LoadBalancing/AboutNativeConnectionLoadBalancing.htm) in a clustered setup. There seems to be a bunch of additional logic built in to the odbc/jdbc/ado drivers related to actually making the connection to the right machine, but at the core it seems to be a new connection option that results in the server communicating back with what server in the cluster that should be utilized for the next query. Is there any way that this could be supported in this library? I'd be willing to help out in any way I can, but I'm not really sure how I would get started on building that support in. Any pointers on how to map stuff that the ODBC/JDBC drivers are doing with Vertica, to actions I could take over the socket connection?
The text was updated successfully, but these errors were encountered: