There’s this push to use ever thinner and lighter weight computing techniques. We moved from mainframes to servers to blades to VMs, and now many developers are looking at containers more and more. What started as a Linux idea popularized by Docker has come to Windows, with container support in Windows Server 2016. Just recently SQL Server 2016 Developer edition was announced as a container, which makes deploying a SQL Server easy, with no install.
Is this a good idea, though? Containers certainly make sense for many applications. Got a flaky Java app that crashes? Put it in a container, avoid dependencies on the OS, and if there’s an issue, restart it quickly. Got a service that needs to scale? Put it in a container and run multiple instances. Messaging, endpoint services, middle and front end apps, all of these can make fantastic use of containers.
Containers fit in quite a few spaces, but do they make sense for databases? I’m not sure. After all, one of the advantages of containers is that they are stateless. Drop one, restart another. That’s not something we want to do with databases, as we need the data to persist. Containers also help when the application is unstable and may need restarting, but SQL Server, along with most database platforms, is very stable to run.
Where do containers make sense? I think for development and test environments, containers have value. These are places where we may need to stop and recreate an environment quickly. Certainly a container with a small amount of data, say a curated set of test data, is a great way to try or test code, then destroy the container, modify something, and repeat. A DevOps process, repeatable with containers.
In production, however, I’m not sure that there is much of a place. Perhaps Express makes sense on laptops, where we can avoid the install of a SQL Server, but certainly the data needs to persist outside of the container. We’ve seen how to do this with WinDocks, and I’m sure some vendors will deploy containers in this way once they are available on laptop OSes. However, on servers? I don’t see the place where a SQL Server container makes sense, but please, let me know if you have a place for a containerized database.