@valkey/valkey-glide
    Preparing search index...

    Type Alias ReadFrom

    ReadFrom:
        | "primary"
        | "preferReplica"
        | "AZAffinity"
        | "AZAffinityReplicasAndPrimary"

    Represents the client's read from strategy.

    Type Declaration

    • "primary"

      Always get from primary, in order to get the freshest data.

    • "preferReplica"

      Spread the requests between all replicas in a round robin manner. If no replica is available, route the requests to the primary.

    • "AZAffinity"

      Spread the requests between replicas in the same client's Aviliablity zone in a round robin manner. If no replica is available, route the requests to the primary.

    • "AZAffinityReplicasAndPrimary"

      Spread the read requests among all nodes within the client's Availability Zone (AZ) in a round robin manner, prioritizing local replicas, then the local primary, and falling back to any replica or the primary if needed.