Is it recommended to use Database as a container in Production environment?

Shruthi Bhaskar picture Shruthi Bhaskar · Jan 30, 2018 · Viewed 11.5k times · Source

Assuming we are using a micro service architecture for a product and we decide to use 'Database per service' model, and deploy in cloud servers by provider like AWS. It is convenient to have databases running as a container for development and test environments.

But can same be implemented for Production environment! If so, how safe it would be? Or is it proper to go with cloud solution as AWS RDS-DB instead!!

Answer

Bernard picture Bernard · Jan 30, 2018

We containerise our db in production (on-premises enterprise application). Many do. It's perfectly stable and the deployment is much simplified. Of course our db is not under stress; we're dealing with hundreds of concurrent users, not tens of thousands. We just make sure that the container has enough RAM and is monitored well.

If we did need to dedicate an entire VM to the db alone, then yes I would skip docker.