Ask HN: Would you run your production SQL Server on docker?
2 points| james_anderson | 8 years ago
I've been thinking about this recently and what would be involved. Some of my thoughts / ideas are listed below.
Would need orchestration, probably K8s Windows containers or Linux containers? Possible to scale out reads by dynamically adding Always On Availability Group read-only replicas? Licensing would restrict large scale outs
BrentOzar|8 years ago
I've seen a lot of development problems that containers help solve, like quickly building out Development Edition VMs for continuous integration testing. Since Dev Edition is free, rapidly building/destroying containers makes sense. However...
> dynamically adding Always On Availability Group read-only replicas
Readable AG replicas require SQL Server Enterprise Edition, which is $7k USD per core. That pricing tends to dwarf the hardware it's running on, so it usually makes more sense to run bare metal on these if it's a long-term scale requirement. (I have indeed done temporary scale-out reads on VMs, it's just usually for things like Black Friday workloads for short periods of time.)
(And then at the end, I went to add a disclaimer about what I do and why I'm answering, and then I went, "Oh, wow, it's James Anderson asking this." OK, so we both know each other, but here's my answer anyway for the rest of the HN community.) So source: Microsoft SQL Server consultant.
james_anderson|8 years ago
I'd love to hear from anyone who is even just thinking of doing this.
> dynamically adding Always On Availability Group read-only replicas
Yeah I doubt scaling SQL Server out dynamically will ever make monetary sense, but it might be cool to just get it working.
I'm thinking of creating a Helm chart for K8s that allows you to dynamically scale the SQL Server pod up and down. I think I'll need to use some undocumented DBCC commands (or call the API) to freeze IO, so I can replicate the data files to the new secondary as it spins up.
Horizontally scaling SQL Server would be cool. Maybe if the hosts were licensed so we could run as many containers as we wanted, it could make sense...
teddyuk|8 years ago
When sql releases were every 2-3 years you would upgrade the hardware at the same time, annually/semi-annually? Less likely.
Being able to change up a version within minutes is a significant improvement over the whole msi install thing even if you did script it.
james_anderson|8 years ago
Are you planning to do that in production?