Azure SQL Database Serverless Compute Tiers

Azure SQL Database serverless is a compute tier for single databases, elastic pools, and data warehouses that automatically scales compute based on workload demand and then pauses compute to automatically save costs during idle periods.

The serverless compute tier is ideal for workloads with intermittent or spiky usage patterns, and for smaller databases with variable usage demands. It offers a cost-effective solution by automatically pausing compute when the database is not in use, thereby eliminating costs associated with idle compute resources.

Key Features of Serverless Compute Tiers

How Serverless Works

When a serverless database is active, Azure SQL Database provisions and manages the compute resources, dynamically adjusting them as needed. When the database becomes inactive for a defined period, the compute resources are automatically paused. This pausing process involves shutting down the compute node and releasing the associated compute costs. When new activity occurs (e.g., a query is submitted), the compute node is automatically restarted, and the database becomes available again. There may be a short delay during the resume process.

Configuration Parameters

When configuring a serverless compute tier, you specify:

Use Cases

Performance Considerations: While serverless offers great cost savings, it's important to be aware that the auto-resume process might introduce a small latency for the first query after a period of inactivity. For mission-critical applications requiring consistent low latency, consider a provisioned compute tier.

Managing Serverless Compute

You can manage serverless compute tiers through the Azure portal, Azure CLI, PowerShell, and ARM templates.

Example: Creating a Serverless Database (Azure CLI)

az sql db create \
    --resource-group "myResourceGroup" \
    --server "myserver" \
    --name "mydatabase" \
    --edition "GeneralPurpose" \
    --family "Gen5" \
    --capacity "2" \
    --auto-pause-delay 60 \
    --min-capacity 0.5 \
    --max-capacity 4

In this example:

Benefits

Limitations

For more detailed information on specific configuration options, pricing, and performance best practices, please refer to the official Azure SQL Database Serverless Documentation.