If you’ve got a database that doesn’t need to be on all the time, Azure SQL DB Serverless is in public preview now. It makes a lot of sense for those development databases you have to keep around, but don’t really want to pay for.
If your database doesn’t get any queries for 6 hours, it’ll pause billing, and automatically resume again when your queries kick in. Here’s how to set it up in the portal:
The gotchas list looks fair, but a few things stand out:
- This tier only has 0.5-4 cores (~2-12GB RAM)
- The minimum auto-pause duration is 6 hours (that’s some pretty doggone slow response time)
- After auto-pause, the first login attempt will fail
- Any queries whatsoever reset the clock (including login attempts, which means this won’t really work for databases exposed to the Internet, which you probably shouldn’t be doing without IP restrictions anyway)
- Not currently available in Australia Central, China East, China North, France South, Germany Central, Germany Northeast, India West, Korea South, South Africa West, UK North, UK South, UK West, and West Central US
This is a total no-brainer for non-public-facing, development-only or archive databases. For hobby apps, the 6-hour time with zero queries doesn’t really make sense: it’s just too long, especially when search engines are going to hit your site at least that often, let alone things like monitoring tools and automated builds.
Update 2019/07/08 – Microsoft just updated the minimum auto-pause duration, dropping it down to 1 hour (from 6). That makes it a much more viable option for cost savings.