Can multiple Azure Redis caches in the same resource group connect to the same automatic private DNS zone without issues?

Fortress Abioye 40 Reputation points
2023-08-15T15:23:31.4166667+00:00

I am trying to set up an additional standard Redis server within my resource group, but when I connect the private endpoint to the private DNS zone that was previously automatically created (privatelink.redis.cache.windows.net) and already connected to my first Redis cache, the private IP of the new cache does not resolve correctly. It resolves to a public IP, even though public access is disabled.

Is it because I am trying to connect to the same private DNS zone? Azure says, "Existing Private DNS Zones tied to a single service should not be associated with two different Private Endpoints as it will not be possible to properly resolve two different A-Records that point to the same service."

If I create a new private DNS zone, I cannot reuse the recommended name (privatelink.redis.cache.windows.net) due to repetition within the same resource group. If I use another naming format, it won't automatically connect with my private endpoint.

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
694 questions
Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
260 questions
Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
518 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 26,526 Reputation points Microsoft Employee
    2023-08-16T04:33:49.5233333+00:00

    @Fortress Abioye

    Thank you for reaching out.

    Based on my understanding of your question above you are trying to set up an additional standard Redis server within your resource group, but when you connect the private endpoint to the private DNS zone that was previously automatically created (privatelink.redis.cache.windows.net) and already connected to your first Redis cache, the private IP of the new cache does not resolve correctly. It resolves to a public IP, even though public access is disabled. You are wondering if this is because they are trying to connect to the same private DNS zone and if they can create a new private DNS zone to connect to the new Redis cache. However, they are unable to reuse the recommended name (privatelink.redis.cache.windows.net) due to repetition within the same resource group. If they use another naming format, it won't automatically connect with their private endpoint.

    I think there is no need to deploy another DNS zone in this case as you have deployed a new Redis Cache resource with its unique name. In your scenario above you can add a A record for your 2nd Redis Cache in the same privatelink.redis.cache.windows.net zone which is pointing to its private endpoint IP address.

    So for example the record will be like.

    Name: Rediscache2 (Name of your new Redis Cache resource )

    Type: A

    TTL: 10

    Value: (Private IP of the 2nd private endpoint).

    The statement you were referring to above

    "Existing Private DNS Zones tied to a single service should not be associated with two different Private Endpoints as it will not be possible to properly resolve two different A-Records that point to the same service."

    This suggest that you cannot have two different A records for two different private endpoints which resolves to the same service. For example, two A records with the same name abcd.privatelink.redis.cache.windows.net pointing to two different private endpoint IPs.

    Although you can have two A records in a private DNS zone with two different names abcd.privatelink.redis.cache.windows.net and efghi.privatelink.redis.cache.windows.net pointing to their respective private endpoint IPs.

    Hope this helps! Please let me know if you have any additional questions. Thank you!


    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.