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.

  • IratePirate@feddit.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    25 days ago

    One per service. Not just because it’s easy, but because it allows you to minimise blast radius. If you’re running one DB per container and one container gets compromised, only that one DB is compromised. With one centralised DB for all containers, a breach of one container means access to the data of all containers that use this database without the need for any lateral movement.