[ 
https://issues.apache.org/jira/browse/CALCITE-5581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17707131#comment-17707131
 ] 

Vaibhav Joshi commented on CALCITE-5581:
----------------------------------------

*Summary of changes so far.*

We have added following new properties to support client side load balancing.
 * USE_CLIENT_SIDE_LB - Boolean flag to indicate if we need to use client side 
Load balancing. 
 * 
LB_URLS - List of URLs which we should consider for load balancing.
 * 
LB_STRATEGY - LB strategy to be used. Out of box we have provided following 
strategies
 ** org.apache.calcite.avatica.ha.RandomSelectLBStrategy ( default).
 ** org.apache.calcite.avatica.ha.RoundRobinLBStrategy
 * 
LB_CONNECTION_FAILOVER_RETRIES - Number of times we need to retry (other URLs) 
if we get connection failures.

We have also added following generic property for connection timeout.
 * 
HTTP_CONNECTION_TIMEOUT - Http connection Timeout in milliseconds.

So sample JDBC connection string will look like below.
{code:java}
jdbc:phoenix:thin:
url=http://host1:port;
serialization=PROTOBUF;
authentication=SPNEGO;
principal=<Kerboros_principal>;
keytab=<path_to_keytab>;
use_client_side_lb=true;
lb_urls=<comma separated urls>;
truststore=<path to jks file>;
truststore_password=<truststore password> {code}

> Implement Basic client side load balancing in Avatica Driver
> ------------------------------------------------------------
>
>                 Key: CALCITE-5581
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5581
>             Project: Calcite
>          Issue Type: New Feature
>          Components: avatica
>    Affects Versions: 1.33.0
>            Reporter: Vaibhav Joshi
>            Assignee: Vaibhav Joshi
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: Avatica Basic client side load balancing.docx
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Implement mechanism to support Client side load balancing by configuring 
> connection properties for load balancing  
> {code:java}
> jdbc:phoenix:thin:
> url=https://<host>:<port>;
> serialization=PROTOBUF;
> authentication=BASIC;
> avatica_user=<userName>;
> avatica_password=<userPw>
> useClientSideLB: [true/false]
> lbStrategy: [RandomDistribution/Sequential/RoundRobin]
> lbURLs: <comma separated URls e.g. URL1, URL2,URL3,...URLn> {code}
> Client should connect to any of the URLs specified in lbURLs ( depending on 
> LB strategy selected).  Please refer to [^Avatica Basic client side load 
> balancing.docx]for more details
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to