Score:0

How to expose multiple databases in local network for other applications to connect with them

aw flag

I am following up this question here, in which I made the incorrect assumption of being able to access a database using HTTP.

Because I seem to lack conceptual knowledge, I would like to ask a more general question first:

What's a good way to expose multiple databases in a local network, where multiple applications connect with them?

I am already able to use a Host (domain / IP ) with a mapped port to access a database. What I dont like about this appraoch is that there can be very many ports that one needs to keep track of as sys admin. Is there a better way, or is that just part of it?

I was thinking about exposing my databases on a url like data.example.com/project/database on port 80 and then forwarding it to the respective database container (using proxy such as Traefik).

Can this work?


Some more context info:

The problem I am trying to solve is to make it as easy and sacalable as possible to make database endpoints accessible in my company. For example for other apps to connect to and read/write data. This is coming from sort of docker-microservice-architecture appraoch (in the simplest form) where many databases must co-exist (each in their own docker containers).

Romeo Ninov avatar
in flag
Do we talk about multiply databases or one database with many instances?
linus avatar
aw flag
thanks for reaching out! It's about multiple databases, usually for multiple applications either. eacht database has its own docker container.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.