Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP alias for database #5096

Open
1 task done
r3ps4J opened this issue May 9, 2024 · 0 comments
Open
1 task done

IP alias for database #5096

r3ps4J opened this issue May 9, 2024 · 0 comments
Labels
feature request A request for a new feature.

Comments

@r3ps4J
Copy link

r3ps4J commented May 9, 2024

Is there an existing feature request for this?

  • I have searched the existing issues before opening this feature request.

Describe the feature you would like to see.

Right now you can define an IP alias for allocations on nodes, but not for databases. I'd like to request having it there too. Why is this useful? Let me explain.

A database is often located on the same server as the panel or wings, and from there you would use 127.0.0.1 to connect to it or perhaps use "database" if you're database container is called that in a docker compose set up. This results in 127.0.0.1 being shown to users as the endpoint. Obviously they can't connect with that, as it's only reachable on the local network with that ip.

The ideal ip to use for a database on the same network as wings would be to use host.docker.internal. This resolves to the host ip and let's you access services on the host as described here: https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host. Since wings spins up docker containers, this would be great to use for the configuration in a server. However, this will not allow the panel to connect to it, so this would be an additional field. Is this something that is achievable?

Describe the solution you'd like.

Ideally, to split up the database connection field in three fields.

  • How the panel should connect to it (say a local ip like 10.0.0.42 if your panel is hosted on a different server on the same network).
  • How servers can connect to it (host.docker.internal when you have a database on the same server as a wings node). It might be too big of a request, but perhaps even specifying it per node, or limiting access to the database per node. Since you could use a database from one node on another node, but I would say you could also add a note beneath the field to let people use common sense and not try to connect to the database from another node when using host.docker.internal.
  • How users should connect to the database (usually a fqdn pointing to the node and port)

Additional context to this request.

I've set up a database on each node to reduce the round trip time from a server to their database.

Found this related issue, but it's not exactly the same and was fixed by just allowing a fqdn in the host field: #982

If you have any questions, ask away!

@r3ps4J r3ps4J added the feature request A request for a new feature. label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request for a new feature.
Projects
None yet
Development

No branches or pull requests

1 participant