Search code examples
azureazure-database-mysql

Is it possible to set up a mysql environment on Azure that stays within the $50 credit budget for Vs Pro subscription?


TL;DR: Is there a cheap way to set MySql up in Azure, so that i can keep the sandbox environment going monthly within those $50? (App Service + MySql db server)

I've been trying to set up a .Net MySql sandbox environment on Azure for the credits that comes along with my VS pro subscription.

Currently it looks like this: enter image description here

The "Azure Database for MySql" is set to lowest settings possible (a basic Gen 5, with 1 core, 1024GB) There is 6 databases running on the mysql server,

The App Service plan is set to the lowest standard pricing tier (S1), to be able to mess around with deployment slots.

And then i have two App Services set up, on that App Service plan.

But after about 1 week (maybe a few more days), its already drained most of the $50 (350DKK). There is a scheduler invoking some code every minute, but other than that, its have just done some light testing with local instance on my pc, connected to that mysql db. So I'm puzzled, that it has already drained those $50 (350dkk). enter image description here

Is there a cheaper way to set MySql up in Azure, so that i can keep the sandbox environment going monthly within those $50? I can live with lowering the app service plan, to a free basic, so that I dont have the Deployment Slots, but that would seemingly only have postponed the draining of the $50.

Edit: This is what the compute vs storage distribution looks like: enter image description here


Solution

  • You could use MySQL in-app. In this scenario, MySQL server runs on the same resources side by side with your web app. This is recommended for development purposes and has no additional cost.

    You specify the option during provisioning. E.g. search the marketplace for 'MySQL', pick the 'Web App + MySQL option', click Create, and make sure you switch the database provider from 'Azure Database for MySQL' to 'In-App MySQL'.

    It's not intended for production and autoscaling won't work, but there is a one-click option to export MySQL databases created this way to a production server.

    See https://blogs.msdn.microsoft.com/appserviceteam/2017/03/06/announcing-general-availability-for-mysql-in-app/ for more details.