Databases are designed to consume all memory, CPU and IO available to them. Is there are good/bad reasons Docker should not be used for databases in production?
May be this question applies to other tools like MOMs Apache Kafka, Apache ActiveMQ etc.
Docker is not a full-scale virtual machine (at least when run on Linux), this is just another process, running on the same kernel, as host machine. Moreover, all docker
container processes can be seen in a host machine with ps aux
.
The only additional load Docker
gives is loading another OS on top of your kernel, but actually most containers are deployed with extremely lightweight stuff like alpine
Linux, so I dont think it really has to be taken into consideration.
From another point, having Database (or any other high load service) in a containers gives you following advantages:
k8s
)So deploying containerized services today is a right practice.