Azure SQL Database Serverless – Facts!!
October 20, 2020
Serverless is a compute tier for single databases in Azure SQL Database that automatically scales compute based on workload demand and bills for the amount of compute used per second. The serverless compute tier also automatically pauses databases during inactive periods when only storage is billed and automatically resumes databases when activity returns.https://docs.microsoft.com/en-us/azure/azure-sql/database/serverless-tier-overview
Few facts you should know before you decide to put your production database into serverless tier.
- Only supported in the General Purpose tier on Generation 5 hardware in the vCore purchasing model.
- Three configurable parameters are:
- minimum vCores
- maximum vCores
- autopause delay
- Expect some delay in computing when computing resumes after auto-pause.
- Billing is per second compared to per hour for provisioned compute.
- Occasionally, load balancing automatically occurs if the machine cannot satisfy resource demand within a few minutes. For example, if the resource demand is 4 vCores, but only 2 vCores are available, it may take up to a few minutes to load balance before 4 vCores are provided. The database remains online during load balancing except for a brief period at the end of the operation when connections are dropped.
- To control cost, memory for serverless databases is reclaimed more frequently than for provisioned compute databases.
- Auto pausing does not support:
- Geo-replication (active geo-replication and auto-failover groups)
- Long-term backup retention (LTR)
- Using SSMS versions earlier than 18.1 and opening a new query window for any database in the server will resume any auto-paused database in the same server. This behavior does not occur if using SSMS version 18.1 or later.
- Connectivity-If a serverless database is paused, then the first login will resume the database and return an error stating that the database is unavailable with error code 40613. Once the database is resumed, the login must be retried to establish connectivity. Database clients with connection retry logic should not need to be modified.
- Latency-The latency to auto-resume and autopause a serverless database is generally in order of 1 minute to auto-resume and 1-10 minutes to autopause.
- app_cpu_billed metric tracks vCore seconds spent by the database.
Ref: Azure SQL Database serverless
Assuming your pause period is 50% of the time (12 hours in a day), to avoid some of the restrictions mentioned above, you can disable ‘Auto-Pause’ for $4.38/day. See details in my post ‘Azure SQL Database Serverless -Disable Auto Pause Cost?‘.
Leave a Reply