StL*_*Lia 9 mysql database docker
假设我有几个不同的容器,每个容器都使用它自己的数据库.在这种情况下,有关性能的最佳做法是什么?运行一个容器,比如MySQL服务器,其中包含所有数据库,或者每个数据库运行一个数据库服务器容器?
除了表演之外的任何其他评论都将受到欢迎.
由于Docker容器的开销在这里并不重要且可以忽略不计,因此问题更多是关于微服务范例中的架构。
性能确实是一个复杂的问题,没有一般性建议,但是也许以下内容会对您有所帮助:
Personaly i doubt that a beginnig of the project one should try to solve all possible performance problems in advance (#MVP, #agile) However, correct me, but it looks like you have not much resources (one host?) and want to be thrifty with these resources in advance.
Ok, what is your bigest concern now?
Then having two concurreent mySQL instances on same host is maybe not that good (but not a problem for different setups)
For one host i would propose to start use one Database container but create different schemas. It might involve additional work with standard container (https://forums.docker.com/t/multiple-databases-in-official-mysql-container/8324)
I would not care to much now and start with separate databases from begin on. Being able to separate your services horizontal to the databases is a huge value! I would not want to weaken this design decision because of very theoretical future performance issues.
| 归档时间: |
|
| 查看次数: |
3252 次 |
| 最近记录: |