For highly configurable applications like the one I am working on, needs highly configurable backed. The database schema differs from Client to Client, deployment to deployment. Number of entities and properties differs from Client to Client.
When any schema changes happen, as a developer we need to verify and test those changes by creating a new database instance. Newly created instance contains only default workflows and initial data.
With on-prem, creating new databases does not add any extra cost.Cloud version of our application supports Azure SQL as a backed. Creating new database instance of Azure SQL adds additional cost.
For example, for minimum configuration like 2vCores and 32GB storage size, estimated cost per month is 417 USD.
What can we do to save this cost?
Answer is Azure SQL Database serverless compute tier. It bills for compute used per second.For example, for minimum 2 vCores and 32 GB storage, estimated cost per month is around 5 USD. Hence there is a huge cost saved.
Other advantages of Serverless computer tier are.
1. Automatically scales compute based on workload demand.
The minimum vCores and maximum vCores are configurable parameters that define the range of compute capacity available for the database.
2. Automatically pauses databases during inactive periods.
During inactive periods database is paused and only storage is billed. Database is resumed when activity returns. This feature helps to save costs.
As in above example one hour of inactivity pauses databases. Auto pausing can be disabled.The latency to autoresume and autopause a serverless database is generally order of 1 minute to autoresume and 1–10 minutes to autopause.
This set up suits for development or testing purpose as there is delay in compute warm-up after idle usage periods.
In the above figure , Status Changes to “ Paused “ if the database is in active for 1 hour .