11
votes

For a small personal coding project I recently created a SQL database in Azure. For the past weeks I have been hardly using the database, out of 2 GB available space I have been using only 13 MB.

However, the database costs me 6,70 EUR per day and I don't understand why this is the case. Read a few topics/posts stating that the costs with similar use should be around 5-7 EUR per month, not per day.

This is the configuration for the database:

  • No elastic pool
  • General purpose, Gen5, 2 vCores
  • West Europe

Does anyone have an idea about what could be causing the costs per month to be so high?

4
Check out AWS, they have a free tier that you can use for 12 months or so. Not sure if it supports Azure Sql. As to getting an answer to your question that won't happen on Stack Overflow as it is very much off topic. - Igor

4 Answers

11
votes

You choosed the General purpose, Gen5, 2 vCores price tier. Here is the cost every month: enter image description here

This means that you must pay for it no matter how many space you used. As you said you just used only 13M. So you must change the Pricing tier.

What I suggest you is configure you database price to Bacic which only cost you 4.99 USD per month. Basic price tier provides 5 DTUs and Max size 2GB for you. enter image description here

You can change the price tier on the database overview site: enter image description here

Hope this helps.

4
votes

It seems you don't know Azure offers a free tier. Please refer to this StackOverflow thread for details on how to take advantage of the free tier that supports databases of 32 MB of space.

2
votes

You're paying for the entire infrastructure is why. It really only saves on upfront cost. A dedicated server, Windows Server + SQL Server Web will run you, at least $5K. Performance wise, a dedicated server at a colo center will be a lot cheaper to run once you get the hardware. I know, I've switched several companies off of Azure and, instead of paying $2500/mo, they pay $200/mo (after the server) for 4U at a colo + $100/mo basic maintenance and 1TB/mo bandwidth, so it adds up. For example, I built 2 custom 1U servers (12 core/32GB) for $8500 and an opensource router for another $500 (pfSense), including OSes & SQL Server Web. Initial setup of both servers including SQL and the router for 16 IP Addresses was about $1K. Total cost was $10K up front. The equivalent horsepower and storage from Azure was $2500/mo. In 1 year on Azure it ran $30K! 1 year on colo (hosting + maintenance) was $13600, the following year was $3600. So far in 5 years, they saved ~$122,000. There was only 15mins of downtime during the entire period. Cloud hosting is a great idea, but it will never save you time nor money at the rates these company's charge. As far as downtime, I have been hosting for 2 decades and the worst downtime happened due to a network failure (that also took out multiple cloud providers) and it was 13 hours. The only other one was due to a fried router (about 3 hours). Just my take on it - Cloud hosting is still way too expensive for what you actually get & redundancy is nice but you can buy a new server every 2 months for the price difference (just get good equipment w/redundant power supplies and hot swap drives - in a 55 degree colo center, failures are rare)

0
votes

If it is a small project you can run it on Ubuntu Linux and it's $3.80/month or $0.0052/hour. On top of this, you can install MySql or SQL Express. I personally find MySql easier to access/configure