将副本添加到 Azure Cache for Redis(预览版)Add replicas to Azure Cache for Redis (Preview)

本文介绍如何使用 Azure 门户设置包含附加副本的 Azure 缓存实例。In this article, you'll learn how to set up an Azure Cache instance with additional replicas using the Azure portal.

Azure Cache for Redis 标准和高级层通过将每个缓存托管在两个专用虚拟机 (VM) 上来提供冗余。Azure Cache for Redis Standard and Premium tiers offer redundancy by hosting each cache on two dedicated virtual machines (VMs). 这些 VM 配置为主 VM 和副本。These VMs are configured as primary and replica. 当主 VM 变得不可用时,副本将检测到该情况并自动担当新的主 VM。When the primary VM becomes unavailable, the replica detects that and takes over as the new primary automatically. 你现在可以将高级缓存中的副本数增加到三个,总共提供四个 VM 来支持缓存。You can now increase the number of replicas in a Premium cache up to three, giving you a total of four VMs backing a cache. 具有多个副本比单个副本能够提供更高的复原能力。Having multiple replicas results in higher resilience than what a single replica can provide.

重要

此预览版在提供时没有附带服务级别协议,不建议将其用于生产工作负荷。This preview is provided without a service level agreement, and it's not recommended for production workloads. 有关详细信息,请参阅适用于 Azure 预览版的补充使用条款For more information, see Supplemental Terms of Use for Azure Previews.

先决条件Prerequisites

备注

此功能目前为预览版 - 如有兴趣,可联系我们This feature is currently in preview - contact us if you're interested.

创建缓存Create a cache

若要创建缓存,请执行以下步骤:To create a cache, follow these steps:

  1. 登录到 Azure 门户,然后选择“创建资源”。Sign in to the Azure portal and select Create a resource .

  2. 在“新建”页上选择“数据库”,然后选择“Azure Cache for Redis”。On the New page, select Databases and then select Azure Cache for Redis .

    选择 Azure Cache for Redis。

  3. 在“基本信息”页面上,配置新缓存的设置。On the Basics page, configure the settings for your new cache.

    设置Setting 建议的值Suggested value 说明Description
    订阅Subscription 选择订阅。Select your subscription. 要在其下创建此新的 Azure Cache for Redis 实例的订阅。The subscription under which to create this new Azure Cache for Redis instance.
    资源组Resource group 选择一个资源组,或者选择“新建”并输入新的资源组名称。Select a resource group, or select Create new and enter a new resource group name. 要在其中创建缓存和其他资源的资源组的名称。Name for the resource group in which to create your cache and other resources. 将所有应用资源放入一个资源组可以轻松地统一管理或删除这些资源。By putting all your app resources in one resource group, you can easily manage or delete them together.
    DNS 名称DNS name 输入任何全局唯一的名称。Enter a globally unique name. 缓存名称必须是包含 1 到 63 个字符的字符串,只能包含数字、字母或连字符。The cache name must be a string between 1 and 63 characters that contains only numbers, letters, or hyphens. 该名称必须以数字或字母开头和结尾,且不能包含连续的连字符。The name must start and end with a number or letter, and can't contain consecutive hyphens. 缓存实例的主机名将是 <DNS name>.redis.cache.chinacloudapi.cnYour cache instance's host name will be <DNS name>.redis.cache.chinacloudapi.cn .
    位置Location 选择一个位置。Select a location. 选择与要使用该缓存的其他服务靠近的区域Select a region near other services that will use your cache.
    缓存类型Cache type 选择高级层缓存。Select a Premium tier cache. 定价层决定可用于缓存的大小、性能和功能。The pricing tier determines the size, performance, and features that are available for the cache. 有关详细信息,请参阅用于 Redis 的 Azure 缓存概述For more information, see Azure Cache for Redis Overview.
  4. 在“高级”页面上,选择“副本计数” 。On the Advanced page, choose Replica count .

    副本计数。

  5. 将其他选项保留默认设置。Leave other options in their default settings.

    备注

    多副本支持当前仅适用于非群集缓存。Multi-replica support only works with non-clustered caches currently.

  6. 单击“创建”。Click Create .

    创建缓存需要花费片刻时间。It takes a while for the cache to create. 可以在 Azure Cache for Redis 的“概述”页上监视进度。 You can monitor progress on the Azure Cache for Redis Overview page. 如果“状态”显示为“正在运行”,则表示该缓存可供使用。 When Status shows as Running , the cache is ready to use.

    备注

    创建后,缓存中的副本数无法更改。The number of replicas in a cache can't be changed after it's created.

后续步骤Next Steps

了解有关 Azure Cache for Redis 功能的详细信息。Learn more about Azure Cache for Redis features.