NC download speed slower through traefik

I am new in this comunity, so I hope I am using it correctly :slight_smile:
I have installed nextcloud 21 using docker image linuxserver/nextcloud, using mariaDB and traefik 2.0.
Everything is working fine, but I have noticed a performance “problem” and I am not sure if it could be a traefik problem or a nextcloud configuration problem:
When I connect from WAN to nextcloud directly (direct forwarding in router to nextcloud container port) I get a nice bandwith of 30MB/s for downloading files. But when connecting to nextcloud through traefik (connecting to port 443 and letting traefik to proxy to nextcloud container), I “only” get 10MB/s.
It is not a bad speed, but a third of speed got connecting without traefik. I use as a server a Raspberry Pi 4 (4Gb) and mem and cpu is ok in both cases. Do you have any idea where to search to make sure if I have a problem configuring traefik or nextcloud container?

Thanks and BR

I have no idea regarding Raspi - my Nextcloud with MariaDB behind Traefik running as Docker on x86 Intel Celeron based Qnap-453 NAS reaches 200+ Mbit/s when moving big files around (movies, .iso files etc.) with the client, when the client is on Wi-Fi. Browser up-/download in fact seems to be limited at 100-150 MBit/s = 10-20MB/s… Maybe the limit is related to Wi-Fi (unfortunately all my LAN ports are used now…) Interesting fact I have to investigate deeper.

the screenshot shows parallel upload and download of >500MB file to my local NC instance over Wi-Fi. It looks the connection in limited somewhere - but at least the system is capable to handle more than 100MBit/s in both directions. I will run wired tests as well - maybe some limit exists in Traefik.

It’s not enough to judge about your setup - maybe you measure different things? like enforced https for Traefik connection and plain http for direct NC connection? is there a difference in upload vs. download? Can you share bandwidth measures from internal LAN as well?

1 Like

Thnks a lot for answering.
I think we are measuring the same thing, the download speed I can get from my nextcloud server for big files (3Gb file).

In my case, when I download through traefik I get a 100Mbps limit. It doesn’t matter if I connect from the internet (using my domain) or directly from the LAN.

Then, if I download the same file connecting directly to nextcloud docker (exposed port 9443 using https) I reach my wifi limit (around 320Mbps). This speed is the same if I connect from the internet (using my domain address) or from the LAN.


So it seems clear that in my case, bottleneck could be traefik and not nextcloud (obviously not the HD read speed). No idea if it is a pure traefik issue/limit or it could be the way nextcloud is configured to interact with traefik.

Thanks for reading and sharing your tests.

It looks not really unknown Huge bandwith/download performance issue

and adding the issue you open in traefik forum My traefik2.0 configuration slows down nextcloud download speed for reference

1 Like

In the meanwhile I moved my docker to PC (Debian 10 on i3 6th Gen+16GB RAM+spinning disk). While the speed is unchanged with WiFi, with LAN connection I get much higher throughput. Browser transfer is >100MBIt/s for 1GB file and client sync goes over 500MBit/s (spikes to >800MBit/s). My conclusion is the problem is not related to Traefik itself as my tests proof it CAN handle faster transfers.