incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From graham sanderson <gra...@vast.com>
Subject Re: binary protocol server side sockets
Date Wed, 09 Apr 2014 16:39:51 GMT
Thanks, but I would think that just sets keep alive from the client end; I’m talking about
the server end… this is one of those issues where there is something (e.g. switch, firewall,
VPN in between the client and the server) and we get left with orphaned established connections
to the server when the client is gone.

On Apr 9, 2014, at 2:48 AM, DuyHai Doan <doanduyhai@gmail.com> wrote:

> Hello Graham
> 
>  You can use the following code with the official Java driver:
> 
>  SocketOptions socketOptions = new SocketOptions();
>  socketOptions.setKeepAlive(true);
> 
>  Cluster.builder().addContactPoints(contactPointsList)
>                         .withPort(cql3Port)
>                         .withCompression(ProtocolOptions.Compression.SNAPPY)
>                         .withCredentials(cassandraUsername, cassandraPassword)
>                         .withSocketOptions(socketOptions)
>                         .build();
> 
>  or :
> 
>  alreadyBuiltClusterInstance.getConfiguration().getSocketOptions().setKeepAlive(true);
> 
> 
>  Althought I'm not sure if the second alternative does work because the cluster is already
built and maybe the connection is already established...
> 
>  Regards
> 
>  Duy Hai DOAN
> 
> 
> On Wed, Apr 9, 2014 at 12:59 AM, graham sanderson <graham@vast.com> wrote:
> Is there a way to configure KEEPALIVE on the server end sockets of the binary protocol.
> 
> rpc_keepalive only affects thrift.
> 
> This is on 2.0.5
> 
> Thanks,
> 
> Graham
> 


Mime
View raw message