Hacker News new | ask | show | jobs
by calpas 3109 days ago
Hello Andymoe, thank you for your quick answer.

Azure container instances look good, I'll take a closer look at that. What would the implementation then look like? I need two containers for the apps and then one for the MySQL database. So in the end I would have 3 container instances, correct?

Is it cheaper to use Azure MySQL or to run MySQL in a container instance?

Thanks in advance

2 comments

I'd just use the hosted MySQL service.

It will take a lot of time configuring MySQL to be production ready with backups, etc. Layer on top of that the complexity of running it in a container... How do you patch the DB software if you run it in a container? Make a new container stop the existing container and reattach the data volume correctly and then you have to deal with downtime or a cluster of containers running the DB if you don't want downtime. You're going to have a bad time unless you really know what you are doing and I still would not run MySQL in a container instance.

Be advised that Azure container instances are very expensive to run 24/7. This is not the intended use.

ACI current pricing as of Dec 2017

1 create request x 1GB memory x 1 month (2592000 seconds) x $0.0000125 (GB/sec) = $32

1 create request x 1 CPU Core x 1 month (2592000 seconds) x $0.0000125 (GB/sec) = $32

Total ~ $64 / month.

I think you might be better off running an Ubuntu VM with Docker for your services and then add Azure Databases for MySQL for persistence. That is how I deploy inside azure.

I have not yet fully understood the principle of "create requests".

It is also possible, if I consider your suggestion to run MySQL directly on the VM - then the two containers above. This would be cheaper, wouldn't it?

"create requests" only means something in ms land

using a vm you'd save about 30usd/mo

i could provide a configuration that you can run directly on your machine. drop me a line if you need help, i'm @andreicon on twitter

Deploying a configuration sounds very good.

Would you be ready for a moment what exactly this configuration contains? I'm new to Docker and still at the beginning... this will be my first implementation.

Many thanks for all the help. You can contact me at "calpas@protonmail.com".