升级和缩放 Azure API 管理实例Upgrade and scale an Azure API Management instance

客户可通过添加和删除单位来缩放 Azure API 管理 (APIM) 实例。Customers can scale an Azure API Management (APIM) instance by adding and removing units. “单位”由专用的 Azure 资源构成,具有以每月 API 调用次数表示的承载容量 。A unit is composed of dedicated Azure resources and has a certain load-bearing capacity expressed as a number of API calls per month. 此数字不表示调用限制,而是粗略容量规划允许的最大吞吐量值。This number does not represent a call limit, but rather a maximum throughput value to allow for rough capacity planning. 实际吞吐量和延迟因多种因素而异,例如并发连接的数量和速率、配置策略的类型和数量、请求和响应大小以及后端延迟。Actual throughput and latency vary broadly depending on factors such as number and rate of concurrent connections, the kind and number of configured policies, request and response sizes, and backend latency.

每个单位的容量和价格取决于该单位所在的“层” 。Capacity and price of each unit depends on the tier in which the unit exists. 可以在以下四个层中进行选择:开发人员基本标准高级You can choose between four tiers: Developer, Basic, Standard, Premium. 如果需要提高层中服务的容量,应添加单位。If you need to increase capacity for a service within a tier, you should add a unit. 如果当前在 APIM 实例中选择的层不允许添加更多单位,则需要升级到更高级别的层。If the tier that is currently selected in your APIM instance does not allow adding more units, you need to upgrade to a higher-level tier.

每个单位的价格和可用的功能(例如多区域部署)取决于为 APIM 实例选择的层。The price of each unit and the available features (for example, multi-region deployment) depends on the tier that you chose for your APIM instance. 定价详细信息一文介绍了每个单位的价格,以及每个层提供的功能。The pricing details article, explains the price per unit and features you get in each tier.

Note

定价详细信息一文说明了每个层中单位容量的大致数字。The pricing details article shows approximate numbers of unit capacity in each tier. 若要获取更准确的数字,需要分析所用 API 的实际方案。To get more accurate numbers, you need to look at a realistic scenario for your APIs. 请参阅 Azure API 管理实例的容量一文。See the Capacity of an Azure API Management instance article.

先决条件Prerequisites

若要执行本文中的步骤,必须:To follow the steps from this article, you must:

升级和缩放Upgrade and scale

可以在以下四个层中进行选择:开发人员基本标准高级You can choose between four tiers: Developer, Basic, Standard and Premium. 应将“开发人员”层用于评估服务;不应将其用于生产 。The Developer tier should be used to evaluate the service; it should not be used for production. “开发人员”层不附带 SLA,无法缩放此层(添加/删除单位) 。The Developer tier does not have SLA and you cannot scale this tier (add/remove units).

“基本”、“标准”和“高级”是附带 SLA 的生产层,可以缩放 。Basic, Standard and Premium are production tiers that have SLA and can be scaled. “基本”层是附带 SLA 的最便宜层,最多可以扩展 2 个单位,“标准”层最多可以扩展到四个单位 。The Basic tier is the cheapest tier which has SLA and it can be scaled upto 2 units, Standard tier can be scaled to up to four units. 可将任意数目的单位添加到“高级”层 。You can add any number of units to the Premium tier.

使用“高级”层可在任意数目的所需 Azure 区域中分配单个 Azure API 管理实例 。The Premium tier enables you to distribute a single Azure API Management instance across any number of desired Azure regions. 最初创建 Azure API 管理服务时,实例仅包含一个单位,并驻留在单个 Azure 区域中。When you initially create an Azure API Management service, the instance contains only one unit and resides in a single Azure region. 初始区域被指定为“主要”区域 。The initial region is designated as the primary region. 可以轻松添加更多区域。Additional regions can be easily added. 添加区域时,需指定想要分配的单位数。When adding a region, you specify the number of units you want to allocate. 例如,可在“主要”区域中包含一个单位,在另外某个区域中包含五个单位 。For example, you can have one unit in the primary region and five units in some other region. 可以定制用于处理每个区域中的流量的单位数。You can tailor the number of units to the traffic you have in each region. 有关详细信息,请参阅如何将 Azure API 管理服务实例部署到多个 Azure 区域For more information, see How to deploy an Azure API Management service instance to multiple Azure regions.

可在任意两个层之间来回升级和降级。You can upgrade and downgrade to and from any tier. 请注意,升级或降级可能会删除某些功能,例如,从“高级”层降级到“标准”或“基本”层时,会删除 VNET 或多区域部署。Note that upgrading or downgrading can remove some features - for example, VNETs or multi-region deployment, when downgrading to Standard or Basic from the Premium tier.

Note

升级或缩放过程可能需要 15 到 45 分钟才能完成。The upgrade or scale process can take from 15 to 45 minutes to apply. 完成时会收到通知。You get notified when it is done.

使用 Azure 门户进行升级和缩放Use the Azure portal to upgrade and scale

在 Azure 门户中缩放 APIM

  1. Azure 门户中导航到自己的 APIM 实例。Navigate to your APIM instance in the Azure portal.
  2. 从菜单中选择“规模和定价” 。Select Scale and pricing from the menu.
  3. 选择所需的层。Pick the desired tier.
  4. 指定想要添加的“单位”数 。Specify the number of units you want to add. 可以使用滑块,或键入单位数。You can either use the slider or type the number of units.
    如果选择“高级”层,则首先需要选择一个区域 。If you choose the Premium tier, you first need to select a region.
  5. 按“保存” 。Press Save.

纵向扩展和纵向缩减过程中的停机时间Downtime during scaling up and down

若要从开发人员层缩放或缩放到开发人员层,将会出现停机时间。If you are scaling from or to the Developer tier, there will be downtime. 否则,不会出现停机时间。Otherwise, there is no downtime.

后续步骤Next steps