Which Redis instance will the read operation go if I use geo primary url to instantiate a Redis client

Ruoteng Wang 0 Reputation points
2023-02-02T21:08:55.61+00:00

Say I have Redis geo replications in two regions, say eus2(primary) and scus(secondary). I use the geo primary url to create a Redis client in my service and the service is deployed in scus.

When my backend receives a request and needs to send an operation to Redis, which region will the operation go?

I assume the operation should be sent to the nearest region, in this case scus. Is this correct?

Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
217 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 16,641 Reputation points Microsoft Employee
    2023-02-03T20:57:14.2933333+00:00

    Hi @Ruoteng Wang Thank you for reaching out.

    My understanding is that you have created geo-replications in two regions and used a geo primary url to create a redis client where the servie is deployed in the secondary regions.

    When your backend receives a request and needs to send an operation to Redis, it'll go to the cache named in the connection string your service uses to connect to Redis.

    Generally, the Redis cache used by a service should always be in the same Azure region as the service instances making requests. And geo-secondary caches are read-only.

    Hope that helps.

    Regards,

    Oury