“常规用途”服务层级 - Azure SQL 数据库General purpose service tier - Azure SQL Database

Note

基于 vCore 的购买模型中的“常规用途”服务层级在基于 DTU 的购买模型中称为“标准”服务层级。The general-purpose service tier in the vCore-based purchasing model is called the standard service tier in the DTU-based purchasing model. 有关基于 vCore 购买模型与基于 DTU 购买模型的比较,请参阅 Azure SQL 数据库购买模型和资源For a comparison of the vCore-based purchasing model with the DTU-based purchasing model, see Azure SQL Database purchasing models and resources.

Azure SQL 数据库基于 SQL Server 数据库引擎体系结构,该体系结构已根据云环境做出调整,以确保即使在发生基础结构故障时,也仍能提供 99.99% 的可用性。Azure SQL Database is based on SQL Server database engine architecture adapted for the cloud environment in order to ensure 99.99% availability even in the cases of infrastructure failures. Azure SQL 数据库中使用了三个服务层级,每个服务层级具有不同的体系结构模型。There are three service tiers that are used in Azure SQL Database, each with different architectural models. 这些服务层级为:These service tiers are:

  • 常规用途General purpose
  • 业务关键Business critical
  • 超大规模Hyperscale

“常规用途”服务层级的体系结构模型基于计算和存储的分离。The architectural model for the general-purpose service tier is based on a separation of compute and storage. 此体系结构模型依赖于 Azure Blob 存储的高可用性和可靠性,旨在以透明的方式复制数据库文件,并确保在发生基础结构故障时不会丢失数据。This architectural model relies on high availability and reliability of Azure Blob storage that transparently replicates database files and guarantees no data loss if underlying infrastructure failure happens.

下图显示了计算层和存储层已隔离的标准体系结构模型中的四个节点。The following figure shows four nodes in standard architectural model with the separated compute and storage layers.

计算和存储隔离

“常规用途”服务层级的体系结构模型中有两个层:In the architectural model for the general-purpose service tier, there are two layers:

  • 无状态计算层:运行 sqlservr.exe 进程,仅包含暂时性的缓存数据(例如 - 计划缓存、缓冲池和列存储池)。A stateless compute layer that is running the sqlservr.exe process and contains only transient and cached data (for example - plan cache, buffer pool, column store pool). 此无状态 SQL Server 节点由 Azure Service Fabric 操作。Service Fabric 初始化进程、控制节点运行状况,并根据需要执行到另一位置的故障转移。This stateless SQL Server node is operated by Azure Service Fabric that initializes process, controls health of the node, and performs failover to another place if necessary.
  • 有状态数据层:包含存储在 Azure Blob 存储中的数据库文件 (.mdf/.ldf)。A stateful data layer with database files (.mdf/.ldf) that are stored in Azure Blob storage. Azure Blob 存储保证任何数据库文件中的任何记录不会发生数据丢失。Azure Blob storage guarantees that there will be no data loss of any record that is placed in any database file. Azure 存储具有内置的数据可用性/冗余,确保即使 SQL Server 进程崩溃,也能保留日志文件中的每条记录或者数据文件中的页面。Azure Storage has built-in data availability/redundancy that ensures that every record in log file or page in data file will be preserved even if SQL Server process crashes.

每当升级数据库引擎或操作系统、底层基础结构的某个部件发生故障,或者在 SQL Server 进程中检测到某个严重问题时,Azure Service Fabric 会将无状态 SQL Server 进程移到另一个无状态计算节点。Whenever database engine or operating system is upgraded, some part of underlying infrastructure fails, or if some critical issue is detected in SQL Server process, Azure Service Fabric will move the stateless SQL Server process to another stateless compute node. 发生主节点故障转移时,将有一组备用节点等待运行新的计算服务,以尽量减少故障转移时间。There is a set of spare nodes that is waiting to run new compute service if a failover of the primary node happens in order to minimize failover time. Azure 存储层中的数据不受影响,数据/日志文件将附加到新初始化的 SQL Server 进程。Data in Azure storage layer is not affected, and data/log files are attached to newly initialized SQL Server process. 此进程保证 99.99% 的可用性,但可能会对正在运行的重型工作负荷造成一定的性能影响,原因是转换时间较长,并且新 SQL Server 节点从冷缓存启动。This process guarantees 99.99% availability, but it might have some performance impacts on heavy workload that is running due to transition time and the fact the new SQL Server node starts with cold cache.

何时选择此服务层级When to choose this service tier

“常规用途”服务层级是 Azure SQL 数据库中的默认服务层级,专为大多数常规工作负荷而设计。General Purpose service tier is a default service tier in Azure SQL Database that is designed for most of the generic workloads. 若需要 SLA 达 99.99% 且存储延迟在 5 到 10 毫秒之间的完全托管数据库引擎,且在大多数情况下与 Azure SQL IaaS 匹配,可以选择“常规用途”层级。If you need a fully managed database engine with 99.99% SLA with storage latency between 5 and 10 ms that match Azure SQL IaaS in most of the cases, General Purpose tier is the option for you.

后续步骤Next steps