We’re building a platform https://dflow.sh, Open source alternative to Railway, Vercel & Heroku where users can bring there own servers and deploy Applications, Databases
customer servers will be added to our private network.
we’re exposing traefik instance (reverse proxy) from our side for proxying request to customer machines.
Application level proxy (http/https) was good using traefik.
But proxy at Database level we don’t have tls termination support at database level.
We’ve checked if there’s any other way proxy (TCP/UDP connections) via dynamic port configuration. We got a limitation of static entrypoint configuration and traefik restart.
Restarting traefik causes down-time to our application.
It would be nice if this is feature got added in future versions
The challenge is that you need HostSNI to be enabled by the database protocol. I think only MongoDB does that, but MySQL, MariaDB and Postgres does not support HostSNI.
Options: use a different TCP port for every database with HostSNI(`*`). If you want this dynamic, you could implement it, Traefik is open source.
Having 10000s of ports open is probably not a good idea, as each will create an overhead of CPU and RAM usage.
Not sure if a database packet router could be implemented inside Traefik.
You probably need to use a different reverse proxy for the database connections with database routing enabled. Maybe check haproxy or envoy.