cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Ellis <jbel...@gmail.com>
Subject Re: Connecting to the cluster with failover (was: data modeling question)
Date Mon, 07 Dec 2009 19:43:29 GMT
Gary Dusbabek already did this, only better:
https://issues.apache.org/jira/browse/CASSANDRA-535,
http://issues.apache.org/jira/browse/CASSANDRA-596

On Mon, Dec 7, 2009 at 1:40 PM, Mark Robson <markxr@gmail.com> wrote:
> 2009/12/7 Ramzi Rabah <rrabah@playdom.com>
>>
>>                TSocket socket = new TSocket(hostName, port);
>>                TBinaryProtocol binaryProtocol = new
>> TBinaryProtocol(socket, false, false);
>>                Cassandra.Client client = new
>> Cassandra.Client(binaryProtocol);
>>                socket.open();
>>                Map<String,String> tokenToHostMap = (Map<String,String>)
>>                        new
>>
>> JSONTokener(client.get_string_property(CassandraServer.TOKEN_MAP)).nextValue();
>>
>> this will return a list of servers in the cluster (both up or down).
>>
>> You will obviously need to connect to a live node in the cluster to be
>> able to run this.
>
> Right, and an application could connect to a known live node (seed node,
> etc) periodically and store the result (retaining the previous values if it
> was unable to connect).
>
> That wouldn't solve the problem of being able to connect to a node which is
> available, *right now*. To do that reliably and with minimal latency you'd
> need something which Cassandra doesn't easily have, a load-balancer/ high
> availability setup.
>
> Personally I'd like to see Cassandra implement a "Front-end-only" node,
> which could run as a thrift protocol server but not join the ring itself
> hence not requiring persistent storage. This would mean that app servers
> could run a local front-end-only server and just talk to that.
>
> Mark
>

Mime
View raw message