sablierapp / sablier

Start your containers on demand, shut them down automatically when there's no activity. Docker, Docker Swarm Mode and Kubernetes compatible.
https://sablierapp.dev/
GNU Affero General Public License v3.0
1.36k stars 46 forks source link

Add `[TRAEFIK]` reverse proxy integration for tcp/udp entrypoints #152

Open kladderadeng opened 1 year ago

kladderadeng commented 1 year ago

Describe the reverse proxy you'd like It is just Traefik, I think well known. Probably I am doing something wrong, but after testing Sablier I got the impression that it only works for http entrypoints and not tcp/udp entrypoints.

Does the reverse proxy provides middleware/module/extension support AFAIK there are middlewares for tcp at least, but it seems to be limited. I am not sure if my request is more a Traefik question than a Sablier question?

Additional context I have Docker services listen only on tcp and / or udp ports and are not using the http protocol. If Sablier could start / stop Docker containers depending if there is / was traffic on a specific tcp / udp entrypoint, this would make it possible to spin up / down those containers too.

Maybe there is a solution and I could not find it, or this is a limitation of Traefik and nothing Sablier can do?

acouvreur commented 1 year ago

It might be related to #21

Check my comment about it https://github.com/acouvreur/sablier/issues/21#issuecomment-1083625961

kladderadeng commented 1 year ago

Thanks @acouvreur! It looks like this is more a limitation with Traefik, having limited Middleware capabilities outside of http and there is not much you can do about it. Maybe on the tcp side, but on the udp side, I think Traefik is just too limited at the moment regarding Middlewares. Time for a suggestion over at the Traefik channels I guess :-)

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

vbrandl commented 1 month ago

@kladderadeng I have the same usecase. I want do automatically shut down some TCP/UDP services on inactivity.

I wrote https://github.com/vbrandl/sablier-proxy which currently works for TCP connections. Maybe this helps you, too.

kladderadeng commented 4 weeks ago

@vbrandl That looks cool, thank you very much! I did not look into this topic for a while now, but it just went up on my priority list again when I take care of my homelab next time :-)