Traefik proxy limitations ? reddit / selfhosted ---------------------------------------------------------------------- HauteDense · 2023-11-20 01:03 There is a limit on how many host can handle ? ---------------------------------------------------------------------- jrwren · 2023-11-20 01:10 would be limited based on the memory of the server running it. I can't say for sure, but I'll bet you'd start hitting problems around the 100,000 mark. Are you planning for anything that large? ---------------------------------------------------------------------- HauteDense · 2023-11-20 01:22 No , in how many host you can have , because i just add another docker container and wasn't working, i had stop another and then works. I have to recheck all of my containers. ---------------------------------------------------------------------- HauteDense · 2023-11-20 01:50 Do you know how to debug traefik because appear as app- something both but when i stop one , works , i have done is just copy and paste another folder with the same docker compose file and i change the host line. It's strange , i have been doing this for all my developments. ---------------------------------------------------------------------- thekrautboy · 2023-11-20 02:02 Maybe you could provide details? Your exact Traefik config? The compose of traefik, the compose of the containers your try to proxy? Things that are important to solve the problem. But this here is not a techsupport sub anyway, you should ask subs like /r/Traefik, thats what its for. ---------------------------------------------------------------------- thekrautboy · 2023-11-20 02:04 > i have done is just copy and paste another folder with the same docker compose file and i change the host line. You need to change more than that. Follow the Traefik documentation and learn how the basics of Docker work. /r/Traefik and /r/Docker ---------------------------------------------------------------------- HauteDense · 2023-11-20 02:07 Service one `labels:` `- "traefik.enable=true"` `- "traefik.http.services.nginx.loadbalancer.server.port=80"` `- "traefik.http.routers.nginx.entrypoints=web"` `- "traefik.http.routers.nginx.rule=Host(\`cms.localhost\`)"` `networks:` `- traefik_default` `networks:` `traefik_default:` `external: true` Service two `labels:` `- "traefik.enable=true"` `- "traefik.http.services.nginx.loadbalancer.server.port=80"` `- "traefik.http.routers.nginx.entrypoints=web"` `- "traefik.http.routers.nginx.rule=Host(\`mixologia.localhost\`)"` `networks:` `- traefik_default` `networks:` `traefik_default:` `external: true` ​ this two service that i notice is that they are loading the ssh service but like you see , there are not any service called ssh on traefik ---------------------------------------------------------------------- TrackAccomplished607 · 2023-11-20 02:57 Hi, sometimes when you add applications to traefik you have to specify what network the app should be proxied against. ​ If you leave it on a default network or application specified network. Eg for applications that have databases or stuff that you are not exposing with stuff that you are exposing. That can and has confused traefik to route incorrectly. ​ [https://stackoverflow.com/questions/45187330/traefik-with-docker- networks](https://stackoverflow.com/questions/45187330/traefik-with- docker-networks) ​ \- "traefik.docker.network=traefik-net" ​ You've also missed several points on how traefik fundamentally works. ​ traefik.http.routers.${app\_name}.entrypoints ​ app\_name should be unique. ​ If you're curious why it's been working it's because you've been very lucky. When you stand stuff up using docker-compose it adds other labels to the containers which helps change its service name. Quite honestly it's undefined behavior as far as the traefik is concerned. ​ I can assure you traefik can easily handle 10,000 virtual hosts (because I do this very thing). I can even go as far to test my luck and use traefik with coder to generate dynamic development environments that are proxied through the same traefik system coder v2 is being proxied through. ​ coder v2 has it's own reverse proxy system but it's very limited in terms of tuning so for some applications you have to do it other ways such as web based desktops. ---------------------------------------------------------------------- thekrautboy · 2023-11-20 03:13 Again i point you to /r/Traefik... ---------------------------------------------------------------------- HauteDense · 2023-11-20 03:53 Thanks man , but i switched to Nginx Proxy Manager , easier and fast. ---------------------------------------------------------------------- psychowood · 2023-11-20 14:07 "nginx" is the identifier of your service/router, you are reusing it twice thus overwriting each other. Service one ``` labels: - "traefik.enable=true" - "traefik.http.services.cms.loadbalancer.server.port=80" - "traefik.http.routers.cms.entrypoints=web" - "traefik.http.routers.cms.rule=Host(`cms.localhost`)" ``` Service two ``` labels: - "traefik.enable=true" - "traefik.http.services.mixologia.loadbalancer.server.port=80" - "traefik.http.routers.mixologia.entrypoints=web" - "traefik.http.routers.mixologia.rule=Host(`mixologia.localhost`)" ``` ---------------------------------------------------------------------- HTTP_404_NotFound · 2023-11-20 17:15 I mean.... I have run 500+ endpoints behind it, without issue... I also use it in front of publicly exposed websites, some of which, have hits measured by the millions... So, that being said, traefik can handle it, as long as your host has the proper resources. network mode = host, will reduce some of the docker/networking overhead. ---------------------------------------------------------------------- andrasbacsai · 2023-11-21 07:16 I have a popular OSS PaaS solution where Traefik is the default proxy configured automatically. Based on the last 3 years and 10k+ instances installed, the only limitation my users (and me) found is regarding web socket connections. With 10k connections the CPU usage was pretty high, and connections started to slow down. This is a dockerized Traefik. About the host(you mean services) limitations, there is no such thing. I once ran 5000 test services on a single server, but the bottleneck was not Traefik. 😅