Azure Database for MySQL 定价层Azure Database for MySQL pricing tiers

Note

将要查看的是 Azure Database for MySQL 的新服务。You are viewing the new service of Azure Database for MySQL. 若要查看经典 MySQL Database for Azure 的文档,请访问此页To view the documentation for classic MySQL Database for Azure, please visit this page.

可以在以下三个不同的定价层之一中创建 Azure Database for MySQL 服务器:“基本”、“常规用途”和“内存优化”。You can create an Azure Database for MySQL server in one of three different pricing tiers: Basic, General Purpose, and Memory Optimized. 定价层的差异表现在可以预配的 vCore 中的计算量、每个 vCore 的内存,以及用于存储数据的存储技术。The pricing tiers are differentiated by the amount of compute in vCores that can be provisioned, memory per vCore, and the storage technology used to store the data. 所有资源都在 MySQL 服务器级别预配。All resources are provisioned at the MySQL server level. 一个服务器可以有一个或多个数据库。A server can have one or many databases.

基本Basic 常规用途General Purpose 内存优化Memory Optimized
计算的代Compute generation 第 4 代、第 5 代Gen 4, Gen 5 第 4 代、第 5 代Gen 4, Gen 5 第 5 代Gen 5
vCore 数vCores 1, 21, 2 2, 4, 8, 16, 32, 642, 4, 8, 16, 32, 64 2, 4, 8, 16, 322, 4, 8, 16, 32
每个 vCore 的内存Memory per vCore 2 GB2 GB 5 GB5 GB 10 GB10 GB
存储大小Storage size 5 GB 到 1 TB5 GB to 1 TB 5GB 到 4TB5 GB to 4 TB 5GB 到 4TB5 GB to 4 TB
存储类型Storage type Azure 标准存储Azure Standard Storage Azure 高级存储Azure Premium Storage Azure 高级存储Azure Premium Storage
数据库备份保留期Database backup retention period 7 到 35 天7 to 35 days 7 到 35 天7 to 35 days 7 到 35 天7 to 35 days

可以从下表着手来选择定价层。To choose a pricing tier, use the following table as a starting point.

定价层Pricing tier 目标工作负荷Target workloads
基本Basic 需要轻型计算和 I/O 性能的工作负荷。Workloads that require light compute and I/O performance. 示例包括用于开发或测试的服务器,或不常使用的小型应用程序。Examples include servers used for development or testing or small-scale infrequently used applications.
常规用途General Purpose 大多数业务工作负荷。此类工作负荷需要均衡的计算和内存以及可缩放的 I/O 吞吐量。Most business workloads that require balanced compute and memory with scalable I/O throughput. 相关示例包括用于托管 Web 和移动应用的服务器,以及其他企业应用程序。Examples include servers for hosting web and mobile apps and other enterprise applications.
内存优化Memory Optimized 高性能数据库工作负荷。此类工作负荷需要内存中性能来实现更快的事务处理速度和更高的并发性。High-performance database workloads that require in-memory performance for faster transaction processing and higher concurrency. 相关示例包括用于处理实时数据的服务器,以及高性能事务性应用或分析应用。Examples include servers for processing real-time data and high-performance transactional or analytical apps.

创建服务器后,只需数秒即可增加或减少 vCore 数、硬件生成和定价层(来回调整基本定价层除外)。After you create a server, the number of vCores, hardware generation, and pricing tier (except to and from Basic) can be changed up or down within seconds. 也可在不关闭应用程序的情况下,独立调整存储容量(向上调整)和备份保留期(上下调整)。You also can independently adjust the amount of storage up and the backup retention period up or down with no application downtime. 创建服务器之后,不能更改备份存储类型。You can't change the backup storage type after a server is created. 有关详细信息,请参阅缩放资源部分。For more information, see the Scale resources section.

计算代数和 vCore 数Compute generations and vCores

计算资源以 vCore 的形式提供,代表基础硬件的逻辑 CPU。Compute resources are provided as vCores, which represent the logical CPU of the underlying hardware. 中国东部、中国北部利用基于 Intel E5-2673 v3 (Haswell) 2.4-GHz 处理器的第 4 代逻辑 CPU。China East , China North utilize Gen 4 logical CPUs that are based on Intel E5-2673 v3 (Haswell) 2.4-GHz processors. 所有其他区域均利用基于 Intel E5-2673 v4 (Broadwell) 2.3-GHz 处理器的第 5 代逻辑 CPU。All other regions utilize Gen 5 logical CPUs that are based on Intel E5-2673 v4 (Broadwell) 2.3-GHz processors.

存储Storage

预配的存储是指可供 Azure Database for MySQL 服务器使用的存储容量。The storage you provision is the amount of storage capacity available to your Azure Database for MySQL server. 此存储用于数据库文件、临时文件、事务日志和 MySQL 服务器日志。The storage is used for the database files, temporary files, transaction logs, and the MySQL server logs. 预配的总存储量也定义了可供服务器使用的 I/O 容量。The total amount of storage you provision also defines the I/O capacity available to your server.

基本Basic 常规用途General Purpose 内存优化Memory Optimized
存储类型Storage type Azure 标准存储Azure Standard Storage Azure 高级存储Azure Premium Storage Azure 高级存储Azure Premium Storage
存储大小Storage size 5 GB 到 1 TB5 GB to 1 TB 5GB 到 4TB5 GB to 4 TB 5GB 到 4TB5 GB to 4 TB
存储增量大小Storage increment size 1 GB1 GB 1 GB1 GB 1 GB1 GB
IOPSIOPS 变量Variable 3 IOPS/GB3 IOPS/GB
至少 100 IOPSMin 100 IOPS
最大 6000 IOPSMax 6000 IOPS
3 IOPS/GB3 IOPS/GB
至少 100 IOPSMin 100 IOPS
最大 6000 IOPSMax 6000 IOPS

在创建服务器的过程中和之后,可以添加更多的存储容量,这样系统就可以根据工作负荷的存储使用情况自动增加存储。You can add additional storage capacity during and after the creation of the server, and allow the system to grow storage automatically based on the storage consumption of your workload.

Note

存储只能增加,不能减少。Storage can only be scaled up, not down.

“基本”层不提供 IOPS 保证。The Basic tier does not provide an IOPS guarantee. 在“常规用途”和“内存优化”定价层中,IOPS 与预配的存储大小按 3:1 的比例缩放。In the General Purpose and Memory Optimized pricing tiers, the IOPS scale with the provisioned storage size in a 3:1 ratio.

可以通过 Azure 门户或 Azure CLI 命令监视 I/O 使用情况。You can monitor your I/O consumption in the Azure portal or by using Azure CLI commands. 要监视的相关指标是存储上限、存储百分比、已用存储和 IO 百分比The relevant metrics to monitor are storage limit, storage percentage, storage used, and IO percent.

达到存储限制Reaching the storage limit

对于预配存储不到 100 GB 的服务器,如果可用存储低于 512MB 或 5% 的预配存储大小,则会将该服务器标记为只读。Servers with less than 100 GB provisioned storage are marked read-only if the free storage is less than 512MB or 5% of the provisioned storage size. 对于预配存储超出 100 GB 的服务器,当可用存储不到 5 GB 时,会将该服务器标记为只读。Servers with more than 100 GB provisioned storage are marked read only when the free storage is less than 5 GB.

例如,如果已预配 110 GB 的存储,而实际使用量超过 105 GB,则会将服务器标记为只读。For example, if you have provisioned 110 GB of storage, and the actual utilization goes over 105 GB, the server is marked read-only. 或者,如果已预配 5 GB 的存储,则当可用存储少于 256 MB 时,服务器会标记为只读。Alternatively, if you have provisioned 5 GB of storage, the server is marked read-only when the free storage reaches less than 256 MB.

当服务试图将服务器标记为只读时,会阻止所有新的写入事务请求,现有的活动事务将继续执行。While the service attempts to make the server read-only, all new write transaction requests are blocked and existing active transactions will continue to execute. 当服务器设置为只读时,所有后续写入操作和事务提交均会失败。When the server is set to read-only, all subsequent write operations and transaction commits fail. 读取查询将继续不间断工作。Read queries will continue to work uninterrupted. 增加预配的存储后,服务器将准备好再次接受写入事务。After you increase the provisioned storage, the server will be ready to accept write transactions again.

我们建议你启用存储自动增长或设置警报,以便在服务器存储接近阈值时通知你,避免进入只读状态。We recommend that you turn on storage auto-grow or to set up an alert to notify you when your server storage is approaching the threshold so you can avoid getting into the read-only state. 有关详细信息,请参阅有关如何设置警报的文档。For more information, see the documentation on how to set up an alert.

存储自动增长Storage auto-grow

存储自动增长可防止服务器耗尽存储空间并变为只读。Storage auto-grow prevents your server from running out of storage and becoming read-only. 如果启用了存储自动增长,存储会在不影响工作负荷的情况下自动增长。If storage auto grow is enabled, the storage automatically grows without impacting the workload. 对于预配的存储小于 100 GB 的服务器,可用存储小于预配的存储的 10% 时,预配的存储大小就会增加 5 GB。For servers with less than 100 GB provisioned storage, the provisioned storage size is increased by 5 GB when the free storage is below 10% of the provisioned storage. 对于预配的存储大于 100 GB 的服务器,可用存储空间小于预配的存储大小的 10% 时,预配的存储大小就会增加 5%。For servers with more than 100 GB of provisioned storage, the provisioned storage size is increased by 5% when the free storage space is below 10% of the provisioned storage size. 适用上面指定的最大存储限制。Maximum storage limits as specified above apply.

例如,如果已预配 1000 GB 的存储,而实际使用量超过 900 GB,则服务器存储大小会增加到 1050 GB。For example, if you have provisioned 1000 GB of storage, and the actual utilization goes over 900 GB, the server storage size is increased to 1050 GB. 或者,如果已预配 10 GB 的存储,则当可用存储少于 1 GB 时,存储大小会增加到 15 GB。Alternatively, if you have provisioned 10 GB of storage, the storage size is increase to 15 GB when less than 1 GB of storage is free.

请记住,存储只能增加,不能减少。Remember that storage can only be scaled up, not down.

BackupBackup

服务自动对服务器进行备份。The service automatically takes backups of your server. 备份的最短保留期为七天。The minimum retention period for backups is seven days. 可以设置长达 35 天的保留期。You can set a retention period of up to 35 days. 可以在服务器的生存期内随时对保留期进行调整。The retention can be adjusted at any point during the lifetime of the server. 可以在本地冗余备份和异地冗余备份之间进行选择。You can choose between locally redundant and geo-redundant backups. 异地冗余备份也存储在创建服务器时所在区域的异地配对区域中。Geo-redundant backups also are stored in the geo-paired region of the region where your server is created. 这种冗余可以在发生灾难时提供一定级别的保护。This redundancy provides a level of protection in the event of a disaster. 也可获得将服务器还原到任何其他 Azure 区域的功能,前提是该区域提供的服务带有异地冗余备份。You also gain the ability to restore your server to any other Azure region in which the service is available with geo-redundant backups. 创建服务器后,无法在这两个备份存储选项之间进行更改。It's not possible to change between the two backup storage options after the server is created.

缩放资源Scale resources

创建服务器之后,可以独立地更改 vCore 数、硬件生成、定价层(基本层的操作除外)、存储量和备份保留期。After you create your server, you can independently change the vCores, the hardware generation, the pricing tier (except to and from Basic), the amount of storage, and the backup retention period. 创建服务器之后,不能更改备份存储类型。You can't change the backup storage type after a server is created. 可以向上或向下调整 VCore 数。The number of vCores can be scaled up or down. 备份保留期可以从 7 天到 35 天进行上下调整。The backup retention period can be scaled up or down from 7 to 35 days. 存储大小只能增加。The storage size can only be increased. 可以通过门户或 Azure CLI 缩放资源。Scaling of the resources can be done either through the portal or Azure CLI. 有关使用 Azure CLI 进行缩放的示例,请参阅使用 Azure CLI 监视和缩放 Azure Database for MySQL 服务器For an example of scaling by using Azure CLI, see Monitor and scale an Azure Database for MySQL server by using Azure CLI.

更改 vCore 数、硬件生成或定价层时,将会使用新的计算分配创建原始服务器的副本。When you change the number of vCores, the hardware generation, or the pricing tier, a copy of the original server is created with the new compute allocation. 启动并运行新服务器后,连接将切换到新服务器。After the new server is up and running, connections are switched over to the new server. 在系统切换到新服务器的短暂期间,无法建立新的连接,所有未提交的连接将会回退。During the moment when the system switches over to the new server, no new connections can be established, and all uncommitted transactions are rolled back. 此时段不定,但大多数情况下短于一分钟。This window varies, but in most cases, is less than a minute.

缩放存储和更改备份保留期是真正的联机操作。Scaling storage and changing the backup retention period are true online operations. 不会造成停机,应用程序不会受影响。There is no downtime, and your application isn't affected. 当 IOPS 随已预配存储的大小缩放时,可以通过扩大存储来增加提供给服务器的 IOPS。As IOPS scale with the size of the provisioned storage, you can increase the IOPS available to your server by scaling up storage.

定价Pricing

有关最新定价信息,请参阅服务的定价页For the most up-to-date pricing information, see the service pricing page. 若要查看所需配置的具体成本,可以单击 Azure 门户的“定价层”选项卡,系统就会根据选定的选项显示每月成本。 To see the cost for the configuration you want, the Azure portal shows the monthly cost on the Pricing tier tab based on the options you select. 如果没有 Azure 订阅,可使用 Azure 定价计算器获取估计的价格。If you don't have an Azure subscription, you can use the Azure pricing calculator to get an estimated price. Azure 定价计算器网站上,选择“添加项” ,展开“数据库” 类别,选择“Azure Database for MySQL” 自定义选项。On the Azure pricing calculator website, select Add items, expand the Databases category, and choose Azure Database for MySQL to customize the options.

后续步骤Next steps