Skip to content

Route randomly between master and replica nodes #891

@ayush-sarda

Description

@ayush-sarda

I have currently configured my cluster with 3 master nodes, each having a replica. My current usecase is read heavy traffic and I face an issue where my replica nodes receive all of the traffic, if I set SendToReplicas as true. If I set them as false, my master nodes receive all the traffic. I have currently used a random function within SendToReplicas to decide between true or false. This does solve my current problem but I am planning to migrate to 3 replicas per master node. Since random function will decide if the traffic should be routed to replicas or master, load will still be uneven since there are 3 nodes when SendToReplicas return true and only one node when it returns false.
Can we add a functionality similar to go-redis' RouteRandomly config, to allow even distribution of traffic across primary and replica nodes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions