Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It depends on the client, different client do different things to deal with this, but with most drivers you can supply several contact points.</p> <p><strong>Astyanax</strong> uses token discovery to keep track of various nodes in the cluster. <a href="https://github.com/Netflix/astyanax/wiki/Configuration" rel="nofollow"><em>Full docs here</em></a>.</p> <blockquote> <p>The host supplier associates the connection pool with a dynamic host registry. The connection pool will frequently poll this supplier for the current list of hosts and update its internal host connection pools to account for new or removed hosts.</p> </blockquote> <p>This is configured during when you are setting up your context:</p> <pre><code>AstyanaxContext&lt;Keyspace&gt; context = new AstyanaxContext.Builder() ... .withAstyanaxConfiguration(new AstyanaxConfigurationImpl() .setDiscoveryType(NodeDiscoveryType.RING_DESCRIBE) .setConnectionPoolType(ConnectionPoolType.TOKEN_AWARE) ) ... context.start(); </code></pre> <p>The DataStax java driver handles failure well as long as you've supplied multiple contact points. If you have 3 nodes with a SimpleStrategy for replication and replication factor of 3 (aka all data is present on all 3 nodes) than you can query as long as one of the 3 nodes is alive.</p> <pre><code>Cluster cluster = Cluster.builder() .addContactPoint("127.0.0.1") .addContactPoint("127.0.0.2") .addContactPoint("127.0.0.3") .build(); Session session = cluster.connect(); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload