Since the overhead of the Docker container is insignificant and insignificant here, the question is about the architecture in the microservices paradigm.
Performance is a really tricky question and there are no general tips, but maybe the following will help you:
Personally, I doubt that at the beginning of the project you should try to solve all possible performance problems in advance (#MVP, #agile) However, correct me, but it seems that you have few resources (one host?) And you want to be economical with these resources in advance.
Well, what do you care most about right now?
Memory?
Then having two matching mySQL instances on the same host is probably not very good (but not a problem for different settings)
For one host, I suggest starting to use one database container, but creating different schemas. This may require additional work with a standard container ( https://forums.docker.com/t/multiple-databases-in-official-mysql-container/8324 )
No memory
I would not want to start with separate databases from the very beginning now. The ability to share your services horizontally with databases is of utmost importance! I would not want to weaken this design decision due to very theoretical future performance issues.
source share