Availability questions

  1. When range leader node dies, would reads be unavailable till data is replicated to another node and new range leader selected? Or reads be serviced in that time because no new writes could have succeeded without quorum in that window?

  2. Same question as above but during auto rebalancing, what is the read availability?

  3. What is the recommended option if the node that the SQL client is connected to becomes unreachable? As I understand one can connect to any node but it would be nice if clients auto connected to some other node.

@spencer (from this thread)

@spencer’s response from google group:

  1. When range leader node dies, would reads be unavailable till data is replicated to another node and new range leader selected? Or reads be serviced in that time because no new writes could have succeeded without quorum in that window?

    When the range leader dies, getting consistent reads requires a new range leader. This requires waiting out the remainder of the range leader’s lease, which right now defaults to 1s.

  2. Same question as above but during auto rebalancing, what is the read availability?

    There should be no issues with read availability during auto rebalancing (assuming there aren’t node failures).

  3. What is the recommended option if the node that the SQL client is connected to becomes unreachable? As I understand one can connect to any node but it would be nice if clients auto connected to some other node.

    The problem here lies with the SQL driver being used to access CockroachDB. Right now we haven’t written our own forks of any, so we’re limited by what they already do, which isn’t anything fancy. They’re typically written with the belief that the database has a single connection point. If your application handles re-opening a database, you could serve your gateway nodes through a load balancer and connect that way.

    Another interesting idea is to run an instance of your application server on the same node as an instance of CockroachDB. The roach nodes will speak to each other to do all the necessary replication and rebalancing, while your app server only needs to speak to the local roach node via localhost:26257. This is how we’re already running a CockroachDB-based service we’ve stood up.