Hello,

As the title suggests, how do you manage your DBs for docker services.

Do you spin a new DB for every new docker cluster or do you have a centralized DB that is accessible to the docker clusters.

What are the pros and cons of both method?

For the moment, I spin a new DB for every services as I feel it is easier to backup the service in case of a problem.

you are viewing a single comment's thread
view the rest of the comments
[–] 28 points 4 months ago

I typically have one DB service per app service (not just ler cluster, unless multiple services need the same db).

Advantages:

  • Simple backup/data organization, each service is self-contained
  • True isolation: Unless you manually create DB accounts for each service, likely all your services have access to all data, and even with accounts there are data leaks and exploits

Disadvantages:

  • You have more services running than strictly needed, but this is a minuscule impact on performance (the overhead of the DB service is typically not noticable)
  • source