Read-only replicas?
First of all, great library! Thank you for open sourcing it!
I'm interested in using it for a project but I'm wondering how could I go about adding support for read-only replicas to scale reads.
I understand there's an option to allow follower nodes to reply to reads with stale data, trading freshness for performance, but what I'm wondering is whether I could have "non-quorum nodes" to scale out reads. Imagine a regular cluster with 3-nodes where one of them is the master as usual and they do elections and quorum between them, but where you can also add an infinite number of readonly nodes who receive WALs from the cluster and update its internal state just the same but do not participate in quorums and elections and whose only function is to scale out (stale) read operations, so whenever I need a consistent read I query the 3 main nodes, and whenever stale data is ok, I read the many read replicas.
Would it be hard to add support for that? Can you give me some pointers on how to go about that?
Thanks!
Hi Daniel,
Uhaha doesn't currently support Read-only replica, but I actually think would be pretty nice if it did.
Uhaha uses the hashicorp/raft library, which allows for adding Nonvoter nodes. Which I think can be used for read scaling, along with warm standby.