I’m self hosting a lot of small apps that require databases to function. So far, each stack has its own database, but I’m wondering if it would be better to centralise the data into one single database instance

All the apps are low traffic (it’s just me), and security concerns are minimal (no sensitive data)

Does anyone have any advice on this?

  • parityboy@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 hours ago

    I use one per container that requires one (containers are all about isolation after all) , but since I use Ansible to maintain my Docker hosts, management is really simple.

  • calm.like.a.bomb@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    10 days ago

    You will most probably hit the problem that I had: one app moved to a new (major) version of postgres and some other apps didn’t support it. So in the end I’m using a DB for each service/app.

  • ascend@lemmy.radio
    link
    fedilink
    arrow-up
    2
    ·
    10 days ago

    I did the opposite, I started with one database instance but kept having issues and the maintainer told me to use multiple so now I have a ton of separate ones

  • sorter_plainview@lemmy.today
    link
    fedilink
    arrow-up
    2
    ·
    9 days ago

    Resource overhead when using multiple instances is negligible. But the benefit is if an app move to a nee major version of the db, then you can migrate easily. Also you don’t have to worry about permissions, multi tenancy, roles, etc.

    Only benefit of using a centralised db is easier back ups. But that is not enough for a centralised db IMO.

  • dtrain
    link
    fedilink
    arrow-up
    2
    ·
    9 days ago

    I use just one.

    I have multiple services on it (docker containers, custom data tracking) and have not had an issue.

    I consistently surprised at how low my memory usage is on one instance 330 mb.

    The maintenance of keeping up a db each docker just isn’t worth it or necessary.