Multiple docker containers for mysql or one instance with multiple databases

后端 未结 1 745
自闭症患者
自闭症患者 2021-02-02 07:59

I have a question regarding best practices using docker containers.

I need one database for each application I develop. Now my question is whether I should use one mysql

相关标签:
1条回答
  • 2021-02-02 08:28

    Docker is especially suited to the deployment of microservices. The following links discuss two strategies with regard to the use of databases:

    1. Database per service
    2. Shared database

    I personally favour the use of a single database per service and extend that to the deployment of separate instances of a database server. This ensures services are loosely coupled, should one service suffer a DB outage, it won't impact another.

    0 讨论(0)
提交回复
热议问题