Search code examples
azurecloudazure-aksazure-billing

Is it possible to avoid "bad" traffic to a public Azure site?


I did an AKS tutorial and deployed to Azure. I could have torn the site down immediately so that I wouldn't have to pay, but I decided to leave it up for a few days just to see what the cost would look like for a site with no traffic. I checked it for a few days in a row and it didn't seem to be incurring any charges (or at least not more than a some odd number of cents). Then I forgot about it and left it for the rest of the month. When I finally checked it again it had scaled up and was charging me like 4 or 5 bucks a day for the virtual machines. The site itself was basically just a hello world program, and there was no reason for anyone to be using it.

My hope was that when no real users were using the site, it could basically shut off and the charges would be close to nothing. Is this simply the cost of doing business, or are there any techniques to mitigate the cost of serving unwanted visitors?


Solution

  • I agree forgetting a running resource azure is annoying. In Azure you always Pay for VMs, associated storage, and network resources used.

    To avoid that you can create Automation Account and scheduled an automatic stop of your resource. https://www.azureblue.io/how-to-start-stop-your-aks-cluster-on-schedule/

    hope it helps ;)