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
    2
    ·
    edit-2
    7 hours ago

    //Edit: terminology improvements

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

    • placebo@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 hours ago

      a breach of one container means access to the data of all containers

      How so? Each service uses its own database with credentials that provide access only to that database. Unless on top of a breach in your container there is some zero-day in your DBMS - which I find highly improbable - no other data will be affected.