Read only nodes?

Hi Roachers,

I’m trying to find some information about read-only nodes. If I want to have 20 droplets for unlimate redundency, I would love not to have to wait for the cluster to find consensus between all 20 servers.

I once heard that there are plans for “read-only” nodes.

Is there anything more that can be said about this feature at this point?

thank you all for your hard work on CRDB

Hi @makeshyft-tom,

We currently have no plans for read-only nodes. Something we’re considering for
the future is to allow reads from nodes which are not the leaseholder
(“follower reads”), which is tentatively slated for our 2.1 release in October.

With respect to your question, the cluster doesn’t need consensus to serve a
read, but without follower reads, reads cannot be served from any node which is
not the leaseholder. This means that as the replication factor goes up, there
shouldn’t be any impact on read latency due to consensus, but there also won’t
be any real benefit in terms of throughput or latency to increasing your
replication factor in this way. Writes, however, do need to go through
consensus, and so your write latency will be affected.

Does this answer your question?

Thank you for your in-depth answer…I guess it solves the problem for me if the read times are not effected by the number of nodes (totally makes sense now that I think about it)… I’m ok with the write latency. I haven’t read the architecture papers so I thought that the consensus also has to happen on reads…which doesn’t make sense now that I think about it more :slight_smile:

Yes, that answers my question.

Thanks again

If you’re using a consensus protocol like raft or paxos directly, then you’re right that you have to use consensus on reads as well to ensure consistency. But cockroach implements a mechanism called leases on top of consensus to make reads safe without needing consensus. I’d recommend checking out our architecture docs if you want to learn more: